Posts hold the whole fence up, so you want the right number in the right places. This calculator counts line, corner and gate posts, and shows the even spacing that avoids one short, odd section at the end.
Your shopping list
How to use the Fence Post Calculator
- Enter the full length of your fence.
- Choose the spacing you want between posts. Use 8 ft for wood, or your panel width for panels.
- Say if the fence is a straight line or a closed loop, like a yard fenced on every side.
- Enter your corners and gates. Read the post counts and the even spacing.
The math behind it
Run = length – (gates x gate width)
Sections = run / spacing, rounded up
Open fence posts = sections + 1. Closed loop posts = sections
Gate posts = 2 for each gate
Even spacing = run / sections
A worked example
What we typed in
What we got
Tips from the job site
- Use stronger posts at corners and gates. A 6×6 is a good choice for a 4×4 fence.
- Set the corner and gate posts first, then space the line posts between them.
- Dig the same depth for every post so the top rail stays level.
Common questions
Why does a closed loop need fewer posts?
A loop has no loose end, so the last section joins the first post. That saves one post.
What is the best post spacing?
Wood fences use 6 to 8 ft. Closer posts make a stronger fence.
How deep should posts go?
About one third of the post length, and below your local frost line if you have frost.
Do corners need extra posts?
Corners are counted inside the total. Odd angles may add one, so keep a spare.