Fence Calculator (Posts, Pickets and Rails)
Enter the total fence length, post spacing, number of gates and your picket width and spacing.
How it works
Sections = length ÷ post spacing, rounded up. Posts = sections + 1 to end the run + 1 per gate. Pickets = length (in) ÷ (picket width + space), rounded up, then the allowance. Rails = sections × rails per section. This follows the Lowe's fence worksheet method.
Worked example: Lowe's worksheet: 120 ft at 8 ft spacing = 15 sections; posts = 15 + 1 + 1 gate = 17. Pickets: 1,440 in ÷ 5.5 in = 262 (289 with 10%). With 2 in spaces, 1,440 ÷ 7.5 = 192 pickets.
Assumptions
- One straight run measured end to end. For several sides, add the lengths; this may count a few more posts than you need where runs share a corner post.
- Gate openings are not subtracted from the picket count (Lowe's worksheet does not either), which leaves a little extra.
- Picket width is the actual width; Lowe's example uses 5.5 in. Allowance default 10%, which Lowe's worksheet recommends for pickets.
- Rails per section follow Lowe's: 2 for a 4 ft fence, 3 for a 6 ft fence. Post size, depth and concrete are not covered; see the concrete calculator for post holes.
- Fence height, setbacks, pool barriers and property lines are set by local rules and HOAs. Check local codes and call 811 before you dig.
Frequently asked questions
How many fence posts do I need?
Divide the fence length by the post spacing (rounded up) to get sections, then add 1 post to end the run and 1 per gate. Lowe's example: 120 ft ÷ 8 ft = 15 sections; 15 + 1 + 1 gate = 17 posts.
How many pickets do I need for 100 feet of fence?
With 5.5 in pickets and no gaps: 1,200 in ÷ 5.5 = 218.2, so 219 pickets, or 241 with a 10% allowance.
How many rails does a fence section need?
Lowe's worksheet uses 2 backer rails per 6 or 8 ft section for a 4 ft fence and 3 for a 6 ft fence.
Related calculators
- Deck board calculator
- Concrete calculator (bags and cubic yards)
- Board foot calculator
- Paint calculator
Sources
Formulas and reference values are from these sources. Page content last updated 2026-10-19.