Fencing calculator

Enter the fence length, the post spacing and any gates. You get the number of posts and sections. Add rails per section or a paling width and you'll get those quantities too. Every fence design differs, so the calculator only counts what your inputs define.

All measurements are metric. Fields marked optional can be left blank.

Centre to centre. Panel fences use the panel width; timber fences follow the design or your builder.

Optional: horizontal rails between posts.

Optional: for a paling or picket fence.

Your results

Enter your measurements and the results appear here as you type.

An estimate of quantities only, from the measurements you enter. Check with your supplier or a professional before ordering.

How it’s calculated

The calculator treats the fence as one straight run with any gates set into it. Gate openings are taken off the length first.

Sections = fenced length ÷ post spacing, rounded up. Posts = sections + 1, plus one more for each gate, because a gate splits the run and each side needs its own end post.

Rails are the fenced length × rails per section. Palings are how many paling-plus-gap widths fit along the fenced length.

Worked example

A 24 m boundary fence with posts at 2.4 m, one 1 m pedestrian gate, 3 rails and 150 mm palings close-boarded.

  1. Fenced length: 24 m − 1 × 1 m = 23 m.
  2. Sections: 23 m ÷ 2.4 m = 9.58, rounded up to 10.
  3. Posts: 10 sections + 1 + 1 for the gate opening = 12.
  4. Rails: 23 m × 3 rails = 69 m.
  5. Palings: (23,000 + 0) mm ÷ (150 + 0) mm, rounded up = 154.

Result: posts 12; sections 10.

What affects accuracy

  • Corners and changes of direction need an extra post each, and a fence that ends against a wall or another fence may need one fewer. Run each straight side separately for an L-shaped or U-shaped fence.
  • Gate posts are usually heavier than line posts, and gates need their own hardware and framing.
  • Boundary fences may involve your neighbour under the Fencing Act 1978, and pool fences have their own barrier rules. Check before you start.

Common questions

What post spacing should I use?

It depends on the fence type, the rails and the ground. Panel fences use the panel width; for timber fences follow the design, the supplier or your fencing contractor.

Does this include concrete for the posts?

No. Use the concrete calculator for one post hole (as a small square) and multiply by the number of posts, or follow the post-mix bag's guidance.