How to calculate fence materials
A board fence breaks into three counts: pickets, posts and rails. Pickets come from the total length divided by how wide each picket plus its gap is; posts and rails come from how many sections you split the run into.
- Pickets = (length × 12) ÷ (picket width + gap), rounded up
- Sections = length ÷ post spacing, rounded up
- Posts = sections + 1
- Rails = sections × rails per section
The "+1" on posts accounts for the fence having a post at both ends — five sections need six posts, not five.
A fence is only as straight as its posts
Set your fence posts too shallow and the first hard freeze heaves them up and leans the whole fence. Set each post about a third of its length deep and below your local frost line, in concrete — that's what keeps a fence plumb and tight for years.
Get your post count and spacing right here (6 to 8 feet on center is typical), then dig deep — it's the part you can't fix later.
Pro move: crown the concrete slightly above grade and slope it away from the post so water sheds instead of pooling at the wood.
How far apart should fence posts be?
| Fence type | Typical post spacing |
|---|---|
| Wood privacy fence | 6–8 ft |
| Picket fence | 6–8 ft |
| Chain-link | 8–10 ft |
| Heavy / windy exposure | 6 ft |
Eight feet matches common rail and panel lengths, which keeps waste down. Tighten the spacing to six feet on slopes or where wind load is a concern.
How many rails does a fence need?
Most fences use two rails per section — one near the top, one near the bottom. Tall privacy fences, six feet and up, often add a third middle rail to keep the pickets from bowing. The calculator lets you set the count per section.
Fence calculator FAQ
- Why is it posts = sections + 1?
- Every section spans between two posts, and adjacent sections share a post — except the two ends. So a straight run always has one more post than it has sections.
- How deep should posts be set?
- Bury at least a third of the post length, below the frost line in cold climates. A 6-ft fence usually means 8-ft posts set about 2 feet in concrete.
- Should I include a gate?
- Subtract the gate opening from the fence length before figuring pickets, and count gate posts separately — they take heavier hardware and a tighter set.