# Fence Post Quantity Calculator

> Count fence posts, bays and rails for one or more straight fence sections at a maximum post spacing, for an open run or a closed loop.

Category: Construction · Applies to: Worldwide · Last updated: 2026-10-29
Interactive calculator: https://calculators.geekmidst.com/calculators/fence-post-quantity-calculator

Each straight section needs enough bays to keep posts within the maximum spacing. Corners share a post, and a closed loop needs one post fewer than an open run.

Also called: Fence calculator, Fence post spacing calculator.

## Inputs
- Straight section lengths (unit m; default 10, 20, 10)
- Maximum post spacing (unit m; default 2.4)
- Fence line (options: Open run, Closed loop; default open)
- Rails per bay (default 2)
- Spare allowance (unit %; default 0; optional)

## Results
- Posts
- Bays
- Rails
- Fence length
- End and corner posts (included)

## Formula

```
Bays = Σ ⌈Lᵢ ÷ s⌉;  Posts = Bays + 1 (open run) or Bays (closed loop);  Rails = Bays × rails per bay
```

Where:
- Lᵢ: length of each straight section
- s: maximum post spacing

## Worked example
1. Bays: ⌈10 ÷ 2.4⌉ = 5, ⌈20 ÷ 2.4⌉ = 9, ⌈10 ÷ 2.4⌉ = 5 → 19.
2. Open run: posts = 19 + 1 = 20 (corners shared).
3. Rails = 19 × 2 = 38.

**Result:** 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.

## Related calculators
- [Wall Stud Quantity Calculator](https://calculators.geekmidst.com/calculators/wall-stud-quantity-calculator)
- [Concrete Calculator](https://calculators.geekmidst.com/calculators/concrete-calculator)
- [Length Converter](https://calculators.geekmidst.com/calculators/length-converter)

_Quantities are estimates. Confirm requirements with your engineer or supplier before ordering materials._

Source: GM¹X CalcVerse — https://calculators.geekmidst.com/calculators/fence-post-quantity-calculator
