Fence Calculator
ConstructionCalculate the number of fence posts and horizontal rails you need for a straight fence run. Enter fence length, post spacing, and rails per section.
Number of Posts
What is a Fence?
A Fence Calculator estimates the number of fence posts and horizontal rails needed to build a straight fence run, based on the total fence length, the spacing between posts, and how many rails each section requires. Rather than counting posts by hand or estimating on paper, you get an exact material count that scales with your project's actual dimensions.
Fence installation is one of the most common outdoor construction projects for homeowners and contractors in the US, and getting the post count wrong is a costly mistake โ too few posts means an unstable fence prone to sagging, while over-ordering wastes money on materials you don't need. This calculator applies the standard construction rule that a fence with n sections requires n+1 posts, giving you an accurate count before you head to the lumber yard.
If you're fencing a rectangular yard or lot, the Rectangle Fence Perimeter Calculator helps you first determine the total linear footage you need to enclose.
How to use this Fence calculator
- Measure your total fence run and enter it in the Fence Length field, in feet.
- Set the Post Spacing slider to match your fence style โ typically 6 to 8 feet for residential wood fences.
- Choose the Rails per Section value based on your fence height and design, usually 2 or 3 for standard residential fencing.
- Review the Number of Posts result to know exactly how many posts to buy.
- Check the Total Rails result to determine your horizontal rail lumber needs.
- Adjust the spacing or rails-per-section sliders to compare how different fence designs affect your total material count and cost.
Formula & Methodology
The calculator uses the standard construction relationship between fence length, sections, and posts: Number of Posts = โFence Length รท Post Spacingโ + 1 Number of Sections = Number of Posts โ 1 Total Rails = Number of Sections ร Rails per Section Worked example: For a 150-foot fence with 8-foot post spacing and 3 rails per section: - Number of Posts = โ150 รท 8โ + 1 = 19 + 1 = 20 posts - Number of Sections = 20 โ 1 = 19 sections - Total Rails = 19 ร 3 = 57 rails So this fence run needs 20 posts and 57 rails.
Frequently Asked Questions