Fence Calculator

Calculate fence posts and rails for a board fence run.

Fence Posts
posts
Plus rails.

Usage Tip

Set the end and corner posts first and run a string line between them, then space the line posts evenly so the panels come out equal.

THE MATH
posts = round up( length ÷ spacing ) + 1
rails = (posts − 1) × rails per section
A fence run is divided into sections between evenly spaced posts. Post count is the length over the spacing plus one for the end; rails are the sections times the rails per section.
Enter the fence length, the post spacing, and the rails per section (2 for short fences, 3 for tall ones).
Post count rounds up.
Scroll to Top

The calculators and tools on Formula Factory are provided for general guidance and informational purposes only. Results are estimates based on standard formulas and the values you enter — they do not constitute professional engineering, electrical, or architectural advice. Always verify calculations with a qualified professional before making decisions for any safety-critical, code-compliance, or commercial application. Formula Factory makes no representations or warranties as to the accuracy or completeness of any result, and accepts no liability for errors, omissions, or any outcomes arising from reliance on this information.