StatGardenREF. DESK
Calculators/Home & build/Fencing & decking materials
Home & build

Fencing & decking materials calculator

Posts, rails and boards for a run of fence or deck.

Published 6 August 2026 · Updated 25 September 2026

What this calculator does

A 24 metre fence at 2.4 metre post spacing needs 11 posts, because a run of ten bays has a post at each end. Forgetting the last post is the classic fencing error.

Board counts come from the height divided by the board width plus the gap. At 140 mm boards with a 5 mm gap, a 1.8 metre high fence takes 13 rows, and across 24 metres that is 130 boards of 2.4 metres. The gap matters: widening it to 20 mm drops the count to 12 rows.

The formula

FormulaPosts = ⌈length/spacing⌉ + 1; Boards = length / (board width + gap)

Posts are the length divided by the spacing, rounded up, plus one for the closing end. Rows of boards are the height divided by the board width plus the gap. The board count multiplies the rows by the number of standard lengths needed to span the run, and rails assume three per bay.

TermMeaning
BayThe span between two adjacent posts.
Post spacingCentre to centre. 2.4 m is common because it matches standard rail lengths.
GapThe space between boards, which allows for timber movement and affects the row count.
RailsHorizontal members between posts that the boards fix to. Three is usual for a 1.8 m fence.

The inputs explained

FieldWhat to enter
Total length (m)Total fence length in metres.
Post spacing (m)Post spacing, centre to centre. 2.4 m suits standard rail lengths.
Board width (mm)Board width in millimetres.
Gap between boards (mm)Gap between boards. Some gap is needed for timber movement even on a close-boarded fence.
Height (rows of boards) (m)Fence height, which sets the number of board rows.

When to use it

Ordering fencing materials

Posts, rails and boards are bought separately and each has its own count.

Comparing post spacings

Wider spacing uses fewer posts but needs stronger rails and sags more over time.

Estimating a decking frame

The same board and gap arithmetic applies to a deck surface.

Worked examples

Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.

How does post spacing change the count?

The same fence at a range of post spacings.

24 m fence, 1.8 m high, 140 mm boards
Post spacingPostsRails (3 per bay, 2.4 m)Rows of boards
1.8 m154213
2.4 m113013
3 m92413
Post spacing changes the posts and rails but not the boards, which stay at 13 rows because the height and board width never change. Going from 1.8 m to 3 m spacing saves 6 posts and 18 rails, though a wider bay needs stronger rails to avoid sagging.

Questions

How far apart should fence posts be?

Commonly 2.4 metres centre to centre, because that matches standard rail lengths and keeps sag manageable. Going wider saves posts but needs heavier rails. In exposed or windy locations, closer spacing is worth the extra posts.

Why do I need one more post than bays?

Because each bay needs a post at both ends and adjacent bays share one. Ten bays therefore need eleven posts. Forgetting the final post is the most common error in fence estimating and leaves you a post short on the last day.

Should there be a gap between boards?

Yes, even on a close-boarded fence. Timber swells when wet, and boards fitted tight will buckle or split. A 5 mm gap is common. A deliberately larger gap gives a hit-and-miss or slatted fence, which is more wind-permeable and often more stable.

How deep should the posts go?

A common rule is a third of the above-ground height, so a 1.8 m fence needs about 600 mm in the ground. Exposed sites and gate posts need more. The depth matters more than the concrete volume for resisting wind load.

For post hole concrete, see the post hole concrete calculator. For the depth to dig, see the fence post depth calculator.