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

  • Last updated
  • Formula tested against reference values

Your numbers

One length per straight run, separated by commas.

Example value. Use the panel width or the spacing your fence system specifies.

Fence line

Result

Posts
—

Calculating…

Bays
—
Rails
—
Fence length
—
End and corner posts (included)
—

How to use this calculator

  1. Enter or choose straight section lengths.
  2. Enter or choose maximum post spacing.
  3. Enter or choose fence line.
  4. Enter or choose rails per bay.
  5. Enter or choose spare allowance.
  6. 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

  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.

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.