Fence calculator
A straight run needs one more post than it has sections — the classic off-by-one. A fence that closes on itself does not, because the last post is the first one.
Centre to centre. Panel fencing is usually set by the panel width.
Optional, for a board count. Leave blank for panel fencing.
In millimetres. Zero for close-boarded.
Usually two or three.
For cuts and rejects.
Result
- Posts
- 14
- Sections
- 13
- Rails
- 26
- Total rail length
- 62.4 m
How this is calculated
Sections are the gaps between posts, so a straight run always has one more post than sections — the fencepost problem, which is where the name comes from. Close the run into a loop and the first and last posts are the same, so the counts match.
- section
- — one span between two adjacent posts
- rail
- — a horizontal member spanning one section
- closed loop
- — a fence that returns to its starting point
Worked example
A 30 m run at 2.4 m spacing needs 12.5 spans, so 13 sections — and 14 posts, because a straight fence is posted at both ends. With two rails a section that is 26 rails. Fence the same 30 m as a closed enclosure and you need only 13 posts: the final post is the one you started from. Getting that single post wrong is a hole in the ground and a return trip.
How to use it
- Enter the total run and the spacing you intend between posts.
- Say whether the fence closes on itself — it changes the post count by one.
- Add a board width and gap only for board fencing; leave them blank for panels.
Limitations and assumptions
- Corners and gates are not modelled. Each corner usually needs a stronger post, and a gate needs posts on both sides sized for the load.
- The last section is a part-span if the length does not divide evenly. In practice that span is either narrowed or the spacing is adjusted across the run.
- Concrete, fixings, caps and gravel boards are not estimated. Post concrete depends on the post size and hole depth.
- Post spacing is a specification question. It depends on the fence height, the material and the wind exposure, and this tool does not recommend one.
Questions
How many posts do I need?
One more than the number of sections for a straight run, and exactly as many as sections for a fence that closes in a loop. For 13 sections that is 14 posts straight, or 13 closed.
What spacing should I use between posts?
It depends on the fence height, the material and how exposed the site is. Panel fencing is set by the panel width; for board fencing, ask your supplier rather than taking a default.
Does the calculator include the gate?
No. Gates need their own posts, sized for the hanging load, and the opening is usually not a standard section. Work out the fence runs either side of the gate separately.
Related calculators
This page has not yet had an editorial review.
