Post and Rail Fence Calculator
Plan rail positions for one straight, level run. Gates, corners, slopes, fixings and structural design are excluded.
The diagram appears here after a calculation with a run length entered.
Use the post and rail fence calculator to count supports and horizontal rails for a straight run. Enter your run length with either maximum spacing or a known section count. You can add stock length and a cut basis when you’re ready to estimate how many rail sticks to buy.

How the post and rail fence calculator works
The calculator first establishes sections and post positions, then multiplies the sections by your rails per section. It keeps installed rail positions separate from purchased rail sticks. That distinction matters because one rail position is a space to fill, while a stock stick is a piece you can buy and cut.
Choose spacing and rails per section
Your chosen fence system determines both spacing and the number of rails in each section. A three-rail paddock fence needs a different quantity from a two-rail boundary, even when their run lengths match. If you already know your section count, you can enter it directly and check the resulting span against the stock you intend to buy.
Proprietary connections still need their own details.
Post and rail quantity formulas
Sections = ceiling(run length ÷ maximum spacing). For an open straight run, posts = sections + 1. Rail positions = sections × rails per section.
Under the explicit centre-span planning assumption, assumed cut length = run length ÷ sections. Actual cuts can differ because rails may overlap posts, fit brackets or enter mortices at each end.
Worked example: 96 feet with three rails
A 96-foot run with an 8-foot maximum spacing has 12 sections and 13 posts. Three rails per section gives 36 rail positions. With suitable 8-foot stock and the centre-span cut assumption, the conservative allowance is 36 sticks before waste.
Add 5% to get 37.8, then round up to 38 sticks.

When the tool can estimate rail purchases
You can estimate purchases once the stock length and cut basis describe how your rails will fit. The conservative allowance doesn’t optimize offcut reuse across the job, and a short stick can’t fill a longer span without a supported splice. That’s why the splicing option needs its own details instead of silently treating two short pieces as a suitable structural rail.
Check the plan before ordering
Your corners and gates need separate assemblies because this tool covers a straight run. The supplier’s connection details also affect post faces, rail engagement and bracket space. A quantity result doesn’t establish livestock containment or structural strength, so you’ll still need the appropriate installation specification.
Keeping the dimensions beside the result makes it easier to check a quote against the rail positions you actually need.
Frequently Asked Questions
Is each rail position one rail to buy?
Only when the stock and connection details make that possible. The calculator labels positions separately from its purchase allowance.
Does the tool reuse offcuts?
It does not optimize an offcut cutting schedule. Review reusable pieces separately before placing your order.
Can I count a gate as a section?
Gates need separate assemblies because loads and hardware differ.
Sources & References
Method notes · Checked 10 November 2026
Published references
- Lowe’s: How to Build a Wood Fence. Published wood-fence construction example, including board measurements and assembly details. Its spacing and rail schedule are application-specific.
- NIST: International foot and metric conversion. The international foot is exactly 0.3048 metres. Calculations use consistent units before area and volume conversion.
Our calculation and planning assumptions
The centre-span cut basis is an explicit planning assumption. The conservative stock allowance does not optimize offcuts, establish connection engagement or design splices.
Results are preliminary planning estimates. Confirm the actual fence system, local requirements and installation conditions before construction.