Fence Calculator
Enter your total fence length, post spacing, and picket width to calculate exactly how many posts, rails, and pickets to buy.
Posts needed
—
Enter your fence length to calculate.
How the Fence formula works
Posts, sections, and pickets:
Sections = ceil(Total length / Post spacing) Posts = Sections + 1 Rails = Sections × Rails per section Pickets = ceil( (Total length × 12) / (Picket width + gap) )
Step-by-step calculation
- Divide total fence length by post spacing and round up to get the number of sections.
- Add 1 to the section count to get the total number of posts (a fence with 5 sections needs 6 posts).
- Multiply sections by how many horizontal rails each section uses (commonly 2–3) for total rails.
- Convert fence length to inches and divide by picket width plus gap spacing to estimate picket count.
Worked example
A 96 ft fence with posts every 8 ft, 3 rails per section, and 5.5-inch pickets with a 0.5-inch gap: Sections = 96/8 = 12. Posts = 13. Rails = 12 × 3 = 36. Pickets = (96×12)/6 = 192.
Frequently asked questions
What's a typical post spacing?
6 to 8 feet is standard for most residential wood fences — closer spacing (6 ft) adds strength and rigidity, while wider spacing (8 ft) uses fewer posts but requires sturdier rails.
How many rails should each section have?
2 rails is common for shorter fences (under 4 ft), while 3 rails is typical for taller privacy fences (6 ft+) to keep pickets from bowing.