Fence calculator
Posts, bays and rails for a fence of a given length.
Fill in the fields and the result will appear here automatically.
Estimates a straight fence run from total length and the chosen maximum bay size. Bays round upward and actual spacing distributes them evenly. One extra post per entered opening is a convention of this budget model. Gate widths and positions, corners, loads and support construction are not supplied.
How it works
Formula and logic
Bays n=⌈L/s⌉; posts=n+1+g; actual spacing=L/n. Rail metres=n·s·r, a full-length stock allowance rather than installed r·L. Cladding area=L·H without subtracting gates. L, s and H are positive and finite; r is an integer 1–5 and g a nonnegative safe integer.
Example
40 m in 2.5 m bays with two rails and one gate needs 18 posts and 80 m of rail.
Fields and units
- Fence length — m
- Bay width — m
- Fence height — m
- Rails per bay — unitless
- Gates and openings — unitless
How to use
- — Enter the total run of the fence.
- — Enter the bay width you plan between posts.
- — Enter the height and how many rails each bay carries.
- — Openings are a count; the extra post is a budgeting rule, not a gate design.
Method and limitations
- Calculation method
- Formula and logic
- Limitation
- One extra post per entered opening is a convention of this budget model. Gate widths and positions, corners, loads and support construction are not supplied.
FAQ
Why one more post than bays?
Because posts stand at the ends of bays, not in the middle. Four bays have five posts, the same way four fence panels need five supports.
Why does a gate add a post?
It is the retained budget rule: one extra post per entered opening. A real layout can need a different support count; without gate widths and positions it cannot be determined.
What bay width should I use?
Use your design and the chosen system specifications. The calculator does not prescribe a universally safe span or check rail deflection or strength.
Why is the actual spacing different from the bay width I entered?
Because the length rarely divides evenly. The bays are made equal by shrinking them slightly, which is what the actual spacing line shows.
Is the cladding included?
Only as an area. What that area costs depends on whether you are fitting boards, mesh or corrugated sheet.