How to use the fence calculator
- Measure the fence line. Enter the total length you want to fence, including gate openings. Stake the corners and run a string line rather than pacing it out. If the fence has corners, see the note on corners below.
- Set the post spacing. 8 ft on center is standard for wood privacy fences because it matches 8 ft rails. Closer spacing (6 ft) makes a stiffer fence in windy spots. The calculator treats spacing as a maximum, so a 100 ft run at 8 ft spacing gets 13 sections, not 12½.
- Enter the picket's actual width. Lumber is sold by nominal size: a "1×6" picket is about 5½ in wide and a "1×4" is about 3½ in. Leave the gap at 0 for a privacy fence, or enter the spacing for a picket fence.
- Add your gates. Each gate's width comes off the fenced length, and each gate splits the fence into separate runs. Each run is rounded up to whole sections and gets its own end posts, and the calculator assumes the gates divide the fence into equal runs. The calculator doesn't count gate pickets or frame lumber. Gates are often built from a kit or with a few spare pickets.
- Set the post and hole size. The calculator sizes the hole at three times the post width and fills it with concrete to the full depth, minus the volume of the post.
Fence formulas
Runs = number of gates + 1
Sections = runs × (fenced length ÷ runs ÷ post spacing, rounded up)
Posts = sections + runs
Pickets = fenced length (in) ÷ (picket width + gap), rounded up, plus extra
Rails = sections × rails per section
Concrete per post = (π × (3 × post width)² ÷ 4 − post width²) × hole depth
A straight run always needs one more post than it has sections. A gate opening ends one run and starts another, so each side of the gate is its own run with its own end posts, and each run is rounded up to whole sections separately. Rounding the whole length at once can leave you a post short. The calculator assumes your gates split the fence into runs of equal length. If they don't (say, a gate near one end), or for exact numbers, calculate each straight run between gates separately with no gates entered and add the results. Corners work the same way: for an L- or U-shaped fence, calculate each straight side separately, since each side rounds up on its own. A quicker way is to add one post per corner as a margin. Gate posts take the most strain, so many builders use a larger post (a 6×6) or set them deeper.
Worked example: 100 ft privacy fence with one gate
A 6 ft fence, 100 ft long, with one 4 ft gate, 8 ft post spacing, 3 rails, tight-fitted 1×6 pickets (5.5 in), 4×4 posts in 24 in holes, and 5% extra pickets:
- Fenced length: 100 − 4 = 96 ft. The gate splits it into two 48 ft runs of 48 ÷ 8 = 6 sections each, so 12 sections.
- Posts: 12 sections + 1 end post for each of the 2 runs = 14 posts. Each needs to be at least 6 + 2 = 8 ft long.
- Pickets: 96 × 12 = 1,152 in ÷ 5.5 = 209.5, which rounds up to 210. Adding 5% gives 220.5, so buy 221 pickets.
- Rails: 12 × 3 = 36 rails (8 ft 2×4s).
- Concrete: the hole is 3 × 3.5 = 10.5 in across. Its area is 0.601 sq ft, less 0.085 sq ft for the post, times 2 ft deep = 1.03 cu ft per post. Fourteen posts need 14.46 cu ft. At 0.6 cu ft per 80 lb bag, that's 24.1, so buy 25 bags.
Why each run rounds up separately
Shorten the same fence to 90 ft. That leaves 86 ft of fence, and 86 ÷ 8 = 10.75 suggests 11 sections and 13 posts. But the gate splits it into two 43 ft runs, and each one needs 43 ÷ 8 = 5.4, so 6 sections. That's 12 sections and 14 posts (with 36 rails), one more post than rounding the total would give.
Lumber and concrete reference
Actual sizes below are standard for dressed softwood lumber. Fence pickets vary more than framing lumber, so measure one at the store. Bag yields are typical and printed on the bag.
| Item | Nominal | Actual size |
|---|---|---|
| Picket | 1×4 | about 3½ in wide |
| Picket | 1×6 | about 5½ in wide |
| Rail | 2×4 | 1½ × 3½ in |
| Post | 4×4 | 3½ × 3½ in (hole ≈ 10½ in) |
| Post | 6×6 | 5½ × 5½ in (hole ≈ 16½ in) |
| Concrete | 80 lb bag | ≈ 0.60 cu ft |
| Concrete | 50 lb fast-setting | ≈ 0.375 cu ft |
Post depth and the frost line
A commonly cited rule is to bury one-third to one-half of the post's above-ground height: 24–36 in for a 6 ft fence and 16–24 in for a 4 ft fence. In cold climates, posts should also go below the local frost line, or freezing soil can heave them out of the ground over a few winters. Your building department can tell you the frost depth. Many builders also put a few inches of gravel in the bottom of each hole for drainage, which slightly reduces the concrete you need. For a single post or a different hole shape, use the concrete calculator.
Picket gaps
Privacy fences are usually built with pickets touching or nearly touching. Pressure-treated pickets are often sold wet and shrink as they dry, which opens small gaps on its own. Spaced picket fences commonly use a gap of 1–2½ in, often a bit less than the picket width. Pool barriers have strict rules on openings and height, so check your local pool code before you choose a gap.
Ordering tips
- Buy posts long enough. Post length = height above ground + hole depth. If the fence steps down a slope, some posts need to be longer.
- Pick through the pile. Pickets are often a lower grade of lumber. The extra-picket allowance covers boards you reject or split while nailing.
- Use exterior fasteners. Hot-dip galvanized or stainless nails and screws are commonly recommended for pressure-treated lumber, which can corrode plain steel.
- Stain later. Wet pressure-treated wood usually needs to dry before it will take stain. The paint calculator can estimate the gallons.
Frequently asked questions
How many posts do I need for a 100 ft fence?
With posts every 8 ft, 100 ÷ 8 = 12.5, which rounds up to 13 sections, so a straight run needs 14 posts. Gates and corners split the fence into separate runs, and each run rounds up and needs its own end posts. Enter your gates in the calculator, and calculate each side of a corner separately (or add one post per corner as a margin).
How many pickets do I need for 100 ft of fence?
With 5½ in wide 1×6 pickets fitted tight, 1,200 in ÷ 5.5 = 218.2, so 219 pickets, plus about 5% extra for bad boards. With gaps between pickets, add the gap to the picket width before dividing.
How deep should fence posts be?
A common rule is one-third to one-half of the height above ground. That means 24–36 in for a 6 ft fence. In freezing climates, go below the frost line. Local code or your fence supplier may set a minimum.
How many bags of concrete per fence post?
A 4×4 in a 10½ in hole 2 ft deep takes about 1.03 cu ft of concrete, just under two 80 lb bags. At 3 ft deep it takes about 1.55 cu ft, or about three bags.
How far apart should fence posts be?
Usually 8 ft on center for wood fences, which suits standard 8 ft rails. Use 6 ft spacing for heavy or tall fences and windy sites. Vinyl and metal panels come in fixed widths, so follow the panel maker's spacing.