A fence is bought as a pile of parts — posts, rails, panels or pickets, and concrete — and under-ordering any one of them stops the job cold. This calculator turns a fence run into an exact materials list (sections, posts, rails, concrete bags) with an optional cost breakdown, accounting for gates before it counts anything.
How the Count Works
The engine works on a single straight run and does the arithmetic in the order a builder thinks:
Defaults match standard practice: 8 ft post spacing, 3 rails per section (top, middle, bottom of a 6 ft privacy fence), 2 bags of concrete per post, 4 ft gate width. The sections figure doubles as the panel count if you are buying pre-built panels instead of rails and pickets. Enter per-unit prices for posts, rails, and bags and the tool prices each category and the total.
| Input | Default | Meaning | | --- | --- | --- | | Fence length | — | Total run length in feet | | Post spacing | 8 ft | Distance between post centers | | Rails per section | 3 | Horizontal rails between each pair of posts | | Bags per post | 2 | Concrete bags per post hole | | Gates / gate width | 0 / 4 ft | Openings subtracted from the run |
Worked Example
A 120 ft backyard run, 8 ft spacing, 3 rails per section, one 4 ft gate:
- Net length: 120 − 4 = 116 ft
- Sections: ⌈116 ÷ 8⌉ = ⌈14.5⌉ = 15 sections (and 15 panels, if panel-built)
- Posts: 15 + 1 + 1 = 17 posts — the +1 closes the run, the second +1 is the gate's extra post
- Rails: 15 × 3 = 45 rails
- Concrete: 17 × 2 = 34 bags
The rounding-up deserves a word: 14.5 sections cannot exist, so the run becomes 15 slightly-shorter sections (about 7.7 ft each) rather than 14 full ones plus a stub — real fences redistribute the spacing evenly, which is also why posts land on measured positions, not on every nominal 8 ft mark.
Planning Beyond the Count
Multiple runs and corners. The formula models one straight run, which carries one closing post (+1). A four-sided yard is four runs: calculate each side separately and remember corner posts are shared between sides — summing four independent runs over-counts corners by one post each. Post depth: bury a third to a half of the above-ground height — for a 6 ft fence, holes 24–36 inches deep, extending below the frost line; gate and corner posts earn an extra bag of concrete (raise bags-per-post or add the difference manually). Spacing: 8 ft suits most wood and vinyl fences because rails come in 8 and 16 ft lengths; drop to 6 ft in high-wind areas or under heavy privacy panels to stop sag. Waste: order 5–10% extra lumber for cuts, warped boards, and the inevitable mis-measure — the calculator gives exact counts, not a buffer. Finally, the non-materials checklist that actually delays fence projects: property-line confirmation, utility locating before digging, HOA and permit rules on height and style, and gate hardware (hinges, latches) which the materials count does not include.
Frequently Asked Questions
Why does the post count add gates on top of sections + 1?
A gate interrupts the run: the opening needs a post on its hinge side and a post on its latch side, and only one of those is already counted by the section arithmetic. Each gate therefore adds one extra post — and with it, extra concrete.
Does this work for panel fences?
Yes — that is what the sections number is. For pre-built panels, sections = panels, post count and concrete stay the same, and rails drop out of your order (rails per section is what the panel replaces). Enter the panel price in place of a rail price only if you want a rough cost sense; the cost lines price posts, rails, and bags as separate items.
Should posts be 6 ft or 8 ft apart?
Eight feet is the default because lumber lengths make it economical and most fences stand fine at that span. Choose 6 ft when the fence is tall, solid (wind load acts like a sail), in a high-wind corridor, or built from weaker rails — the extra posts and concrete are cheaper than a leaning fence.