How to use this calculator
- Enter or choose straight section lengths.
- Enter or choose maximum post spacing.
- Enter or choose fence line.
- Enter or choose rails per bay.
- Enter or choose spare allowance.
- The posts updates as you type. Use Copy result or Share to keep it.
Method
Bays = Σ ⌈Lᵢ ÷ s⌉; Posts = Bays + 1 (open run) or Bays (closed loop); Rails = Bays × rails per bay
- Lᵢ
- length of each straight section
- s
- maximum post spacing
Worked example
- Bays: ⌈10 ÷ 2.4⌉ = 5, ⌈20 ÷ 2.4⌉ = 9, ⌈10 ÷ 2.4⌉ = 5 → 19.
- Open run: posts = 19 + 1 = 20 (corners shared).
- Rails = 19 × 2 = 38.
A 40 m fence in three straight runs with posts at most 2.4 m apart needs 20 posts and 38 rails.
What the result means
Corner and end posts usually need to be heavier and braced, so order them separately from the line posts.
Assumptions and limits
- Posts are evenly spaced within each section, at or below the maximum spacing.
- Adjacent sections share a corner post.
- Gates, gate posts, post concrete and fixings are not counted.
Questions
Why does each section round up separately?
A corner must have a post, so each run is divided on its own; leftover length cannot carry over a corner.
How deep should posts go?
Depth depends on post height, wind exposure and soil; follow the fence supplier’s guidance.
Please note: Quantities are estimates. Confirm requirements with your engineer or supplier before ordering materials.