How to use the fence calculator
- Enter the total fence length and the number of straight runs (each corner starts a new run).
- Set the post spacing, rails per section, and your picket width and gap.
- Add any gates and their width.
- Enter the post hole size and bag size to get the concrete.
Fence formulas
Sections = Fence length ÷ Post spacing → round up Posts = Sections + Straight runs + Gates Rails = Sections × Rails per section Pickets = (Fence length − Gate widths) ÷ (Picket width + Gap) Concrete per post = π × (hole ÷ 2)² × concrete depth − post area × concrete depth
Worked example
A straight 100 ft privacy fence, 4 × 4 posts every 8 ft, two rails, 5½ in boards with no gap, 10 in holes 30 in deep with 6 in of gravel:
- Sections = 100 ÷ 8 = 12.5 → 13; posts = 13 + 1 = 14
- Rails = 13 × 2 = 26 (8 ft long)
- Pickets = 1,200 in ÷ 5.5 in = 218.2 → 219
- Concrete per post = 1.09 − 0.17 = 0.92 ft³ → 12.9 ft³ total → 22 bags of 80 lb
Common fence layouts
| Fence type | Typical post spacing | Rails | Boards |
|---|---|---|---|
| 6 ft privacy (wood) | 6–8 ft | 3 | 1 × 6 boards, no gap |
| 4 ft picket | 8 ft | 2 | 1 × 4 pickets, 2–3 in gap |
| Shadowbox / board-on-board | 6–8 ft | 3 | Overlapping boards on both sides |
| Horizontal slat | 4–6 ft | — | Boards fixed to posts |
For shadowbox or board-on-board fences, roughly double the board count, because boards go on both sides of the rails.
Buying lumber for the fence
Posts for a 6 ft fence with 2 ft in the ground need to be 8 ft long; a 4 ft fence uses 6 ft posts. Rails are usually 2 × 4s cut to span from post to post, so with 8 ft spacing buy 8 ft rails (or 16 ft rails to span two sections and stagger the joints). Buy about 5–10% extra pickets for split or warped boards.
Fence building tips
- Check property lines and permits before you dig, and call 811 (US) to locate buried utilities.
- Set corner and end posts first, then run a string line between them for the line posts.
- Crown the concrete at the top of the hole so water runs away from the post.
- Use ground-contact rated lumber for posts, and galvanized or stainless fasteners.
- Gate posts carry the most load — use 6 × 6 posts or set them deeper.
- Leave a gap at the bottom of boards (about 2 in) so they don’t sit in wet soil and rot.