Fence calculator
This counts materials for a straight run at the spacing and picket size you enter. It does not add posts for corners or gates, size the post footing, or set post depth for frost or wind — those are down to your layout and your local code. Walk the line and mark the openings before you buy.
Enter the length of the fence and your post spacing, and the tool splits the run into sections, counts the posts that bracket them, multiplies out the rails, and divides the run into pickets. Rails per section, picket width and the gap are all yours to set for the fence you are actually building.
Worked example
A 96 ft run at 8 ft spacing is 96 ÷ 8 = 12 sections, so 13 posts close the line. Three rails a section is 12 × 3 = 36 rails. With 5½-inch pickets and a ⅜-inch gap, each picket eats 5.875 inches, so 96 ft (1152 in) ÷ 5.875 ≈ 197 pickets. Add a post for each corner and gate on top.
The formula
posts = ⌈length ÷ spacing⌉ + 1 · pickets = ⌈length ÷ (picket + gap)⌉
Dividing the run by the spacing and rounding up gives the sections; a straight run always has one more post than it has sections, because the last section still needs an end post. Rails scale straight off the section count. A picket plus its gap is the repeating unit along the run, so the run divided by it, rounded up, is the count.
Questions
- How many posts do I need for a fence?
- Divide the run length by your post spacing and round up to get the number of gaps, then add one for the closing post. A 96 ft fence at 8 ft spacing is 12 gaps, so 13 posts. Corners and gates need their own posts on top of that — add them to the count yourself, because only you know where they fall.
- What spacing should fence posts be?
- Eight feet on centre is the common default for wood fencing and is what this tool starts with, because it matches standard rail and panel lengths. Windy sites, heavy panels or chain link often go tighter; open wire can go wider. Set the spacing to your material and the post count follows.
- How many rails and pickets will a fence take?
- Rails are the number of sections times the rails per section — two for a short fence, three for a taller privacy fence. Pickets are the run length divided by one picket plus its gap, rounded up. Enter the picket width and the gap you want and the tool counts them; a butted board fence just uses a gap of zero.
- Does this include gates and corners?
- No — it counts the posts, rails and pickets for a straight run. Every corner and every gate opening adds a post, and a gate leaf is pickets you would otherwise have spanned, so treat those as separate line items. The tool gives you the run; you place the openings.
Related tools
New tools, now and then
We add calculators most weeks. Drop your email and get a short note when a new one lands — nothing else, no selling your address, one-click out.