About this calculator
This fence calculator turns the length of your fence line into a materials list for a standard wood fence: posts set at a regular spacing, horizontal rails between them and vertical pickets across the face. It handles privacy fences with no gaps and spaced picket fences alike.
For the concrete to set the posts, use the fence post concrete calculator.
How to use it
- Measure the total length of the fence line. Measure each straight run and add them together.
- Choose the post spacing — 8 ft on center is standard and matches 8 ft rails.
- Enter the fence height. The calculator picks the rails per section from it: two up to 4 ft, three for 6 ft, four for 8 ft fences.
- Enter the picket width and the gap between pickets, and add a post for each corner or end beyond the first run.
The formula
Sections = fence length ÷ post spacing, rounded up
Posts = sections + 1 + extra corner posts
Rails per section = 2 up to 4 ft tall, 3 for 5–6 ft, 4 for 7–8 ft
Rails = sections × rails per section
Rail spacing = (fence height − 2 × 4 in) ÷ (rails per section − 1)
Pickets = fence length ÷ (picket width + gap) × (1 + extra%)
A 100 ft fence with 8 ft spacing has 13 sections (the last one is shorter) and needs 14 posts. With 5½ in pickets and no gap, the fence face needs 219 pickets before the allowance for defects. At 6 ft tall it takes 3 rails per section, 39 in all, about 32 in apart.
Worked example
These are the calculator’s starting values and the results they produce:
| Total fence length | 100 ft |
|---|---|
| Post spacing | 8 ft |
| Fence height | 6 ft |
| Rails per section | Match the fence height |
| Picket width | 5.5 in |
| Gap between pickets | 0 in |
| Corners and ends | 0 |
| Extra pickets for defects | 5 % |
Tips before you buy
- Check property lines and call 811 (in the US) to have utilities marked before you dig.
- Many towns require a permit and limit fence height — typically 4 ft in front yards and 6 ft in back.
- Gates need sturdier posts (often 6×6) and a dedicated section width; plan gate openings before setting posts.
- Use pressure-treated posts rated for ground contact, even if the rest of the fence is cedar.
Frequently asked questions
How many posts do I need for a 100 ft fence?
With posts every 8 ft, 100 ft needs 13 sections and 14 posts, plus one extra post for each corner or gate.
How many pickets for 8 ft of fence?
With 5½ in pickets and no gap, an 8 ft (96 in) section needs about 17.5 pickets — buy 18. With a 2½ in gap it needs 12.
How many rails for an 8 ft wood fence?
An 8 ft tall fence takes 4 rails per section, so 100 ft of it with posts 8 ft apart needs 13 sections × 4 = 52 rails, each an 8 ft 2×4. If you mean one 8 ft section of a 6 ft privacy fence, that takes 3 rails; a 4 ft fence takes 2. Set the top and bottom rails 4 in from the picket ends; on 8 ft pickets the four rails end up about 29⅓ in apart.
How far apart should fence posts be?
Wood fence posts are usually set 6–8 ft apart on center. 8 ft is the most common because rails are sold in 8 ft lengths; use closer spacing for tall fences or windy locations.
Sources
Areas and volumes are standard geometry. The published figures this calculator relies on come from these sources; other defaults (waste allowances, typical densities and prices) are common trade figures worth checking with your supplier.
- Lowe's wood fence installation instructions (backer rails): rails per section by fence height and the 4 in rail inset
- Call 811: call before you dig: having buried utilities marked before you dig post holes