Skip to main content
Fence Calculator

Fence rail calculator

Work out how many horizontal rails a fence run needs from its length, post spacing and rails per section, with the math shown.

Rails needed

Enter your measurements and the result updates as you type.

Overview

Rails are the horizontal members a wooden fence hangs its pickets on, and the common question is deceptively simple: how many boards do I buy? The answer is sections times rails per section, where sections come from your run length divided by post spacing.

Rails per section is a height decision: 2 rails on a low fence, 3 on the usual 5 to 7 foot range, 4 on an 8 foot fence, and split-rail or ranch styles fix the rail count per section by design. Type your numbers and the rail count, sections and total linear feet of rail all update at once.

Common mistakes

  • Multiplying the run length directly by rails per section instead of computing sections first, which overstates rails by one section on runs that do not divide evenly.
  • Using 2 rails on a 6 foot privacy fence where 3 is the safer, common choice for the board load.
  • Forgetting that rails are sold in stock lengths (commonly 8, 12 or 16 feet) and that you cannot use every inch of every board.

In-depth guides

Frequently asked questions

How many rails does a 6 foot fence need?

Three rails per section is the common suggestion for a fence between 5 and 7 feet tall. A 100 foot run at 8 foot spacing has 13 sections, so it needs 39 rails in three-rail configuration.

How do I calculate rails for a fence run?

Divide the run length by your post spacing and round up to get sections, then multiply by the rails per section you plan. This calculator does both steps and shows the sections so you can verify the arithmetic.

Why is rail count based on sections and not feet?

Because a rail belongs to a section: one horizontal member per rail slot per span between posts. Counting feet alone does not tell you how many boards to buy, especially when a run ends in a partial section.

What lengths do fence rails come in?

8, 12 and 16 feet are the common stock lengths at lumber yards. Buy long boards and cut to fit; you cannot use the waste, so buy for the sections plus a cut allowance.

How many rails run between two posts?

The number that matches your height and design: commonly 2 on a 4 foot fence, 3 on a 6 foot fence, and 4 on an 8 foot fence. Every post section carries that many rails.

Do vinyl or composite fences use rails the same way?

Pre-assembled panel systems carry their own rails built into the panels, so this calculator is for board-and-rail construction. It applies as-is to wood and to board-style composite that is assembled like wood.

How much rail footage should I buy for a 100 foot fence?

At 8 foot spacing you have 13 sections, and at 3 rails per section that is 39 boards to span roughly 104 feet of run, plus waste allowances. The calculator returns sections and total rails; match those to a stock length and a cut allowance.

Do corner and end posts change the rail count?

No. Rails span each section between posts regardless of whether a post is a corner or terminal post. Corners mainly affect how a rail is cut and joined at the corner, not how many boards to buy.