Smart Build Calculators

Fence Calculator

Work out the number of posts and panels for a fence run, allowing for gates and a waste margin.

Units

No results yet.

Formula and method

Gate widths are subtracted from the total fence length. Posts are counted from the remaining length divided by the post spacing plus one, and panels from the length with waste divided by the panel width.

Posts and rails scale with spacing, panels do not

A fence is quoted by the metre but built from posts, rails and panels, and only the panels scale directly with length. Posts come every 2 to 3 m, so a 30 m run is 11 posts at 3 m spacing but 16 at 2 m. Moving from 3 m to 2 m costs 45 % more posts and adds no extra panel, which is why the spacing question matters more than the total length.

Rails are counted per bay and usually two per bay for a panel fence, three for a closeboard fence. A bay is the space between posts, so a 30 m run at 2.5 m gives twelve bays and twelve panels, but posts are only thirteen including both ends.

Height, wind and the post that fails first

A 1.8 m closeboard fence catches a lot of wind: at 20 m/s the load on a 30 m run is measured in tonnes, and it is transferred entirely through the posts into the ground. That is why post depth matters more than post spacing on an exposed site, and why a concrete spur or a metpost in soft ground fails before the panel does.

Lowering the fence to 1.2 m reduces the wind load by roughly half. It is the cheapest engineering decision available, and it is made before the first hole is dug.

Gravel boards, gates and the gaps between

Gravel boards and concrete plinths are counted by the running metre, gates by the piece, and both are usually excluded from a panel quote. A single gate replaces a panel plus one bay, and its posts need to be heavier than the line posts because the gate hangs and swings on them.

Leave a gap under the panels for air and drainage. A fence built tight to the ground rots at the bottom rail within a few years, and replacing a bottom rail on a standing fence costs more than the gap ever would have.

How to measure the inputs

  1. Measure the total fence run in a straight line, corner by corner.
  2. Decide the post spacing — 1.8 to 2.5 m is typical for panels.
  3. Measure gate openings and count how many there are.

Worked example

Fence length 164.04 ft; Post spacing 13.12 ft; Post section (optional) 4.72 in; Panel width (optional) 7.55 ft; Gate count 1; Gate width 9.84 ft; Waste 12 % → Posts required: 13

Reference data

Posts and rails for a 10 m fence
Post spacing, mPostsRails, m
2620
2.5520
3420

Two rails per span. Posts are counted with the end post, so a 10 m run at 2 m spacing needs six.

Practical tips

  • Set the corner and end posts first, then line up the intermediates.
  • Use a string line and a spirit level so the panels stay straight and level.
  • Concrete post footings in one go for stability.

Sources

  • EN 335 — Durability classes of wood

Checked and updated October 22, 2026