Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Posts Required
14
fence posts
Sections 13
Total Rails 39

What Is a Post and Rail Fence Calculator?

A post and rail fence is a classic horizontal-rail fence used for paddocks, boundaries, and rustic landscaping. This calculator estimates how many posts, fence sections, and rails you need based on the total run length, the spacing between posts, and the number of rails stacked in each section. It works for any unit, but the labels assume feet.

Side view of a post and rail fence showing posts, rails, total length L and post spacing S
Key parts of a post and rail fence: posts, rails, spacing S and total length L.

How to Use It

Enter the total fence length, the desired post spacing (commonly 8 ft to match standard rail lengths), the number of rails per section (often 2, 3, or 4), and the length of each rail. The tool rounds the number of sections up to the nearest whole section and adds one closing post.

The Formula

The number of sections is the length divided by the spacing, rounded up. Posts are one more than the sections (a fence needs a post at both ends):

$$\text{Posts} = \left\lceil \frac{L}{S} \right\rceil + 1$$

where \(L\) = total fence length and \(S\) = post spacing. The total number of rails is the section count times the rails per section, \(R\):

$$\text{Rails} = \left\lceil \frac{L}{S} \right\rceil \times R$$
Advertisement
Diagram showing fence sections with one extra end post illustrating posts equals sections plus one
Each section needs a post, plus one extra post to close the final end.

Worked Example

For a 100 ft fence with 8 ft spacing and 3 rails per section:

$$\text{Sections} = \left\lceil \frac{100}{8} \right\rceil = \lceil 12.5 \rceil = 13$$ $$\text{Posts} = 13 + 1 = 14$$ $$\text{Rails} = 13 \times 3 = 39$$

So you would buy 14 posts and 39 rails.

FAQ

Why one extra post? Every span of rail needs a post at each end, so the final section adds a closing post.

What spacing should I use? Match it to your rail length — 8 ft is most common so a single rail spans one section without cutting.

Does it account for gates? No. Subtract gate openings from your length or add gate posts separately.

Last updated: