🏠
🏠 Home & living

Fence Posts, Panels & Rails Calculator

Results update as you type.

Your numbers

Understanding the fence calculator — concept and principle

This calculator estimates the posts, panels (or bays), rails and post concrete needed for a straight fence. Enter the total fence length, the panel or bay width, and the number of horizontal rails per bay. It is used to price a garden or boundary fence and to order materials before digging the first hole.

Fence bays and posts30 m in 1.8 m bays is 16.67, rounded up to 17 bays; a straight run needs 18 posts, 34 rails and 36 bags of concrete.17 bays need 18 posts30 m ÷ 1.8 m = 16.67 → 17 bays1.8 m2 rails per bay~2 × 25 kg concrete per postposts 17 + 118panels17rails 17 × 234bags 18 × 236
A straight run always has one more post than bays: 17 bays, 18 posts.

How it is calculated

Lengths are in metres. Rounding up means the last bay may be shorter than the others and will need a panel cut to size.

The principle

This is the classic fencepost problem: a straight line divided into n sections needs n + 1 posts, because every section needs a post at each end and neighbouring sections share one. Rails span between posts, so each bay gets its own set. Concrete scales with the number of holes; two 25 kg bags per post is a typical planning figure for a standard garden fence post.

Worked example

Default inputs: length 30 m, bay width 1.8 m, 2 rails per bay.

  1. Bays = 30 ÷ 1.8 = 16.67, rounded up to 17.
  2. Posts = 17 + 1 = 18.
  3. Rails = 17 × 2 = 34.
  4. Concrete = 18 × 2 = 36 bags (25 kg).
How Posts changes with Panel / bay width (m)How Posts changes with Panel / bay width0204060800.450.91.351.82.252.73.6Example: 18Panel / bay width (m)
Each point is the calculator re-run with only “Panel / bay width (m)” changed; the gold point is the default example. Change the inputs above and this chart follows your numbers.
Panel / bay width (m)Posts
0.4568
0.935
1.3524
1.818
2.2515
2.713
3.610

How to read the result

For an L-shaped or multi-sided fence, calculate each side separately, because each side rounds up its own last bay; the corner post is shared, so a connected fence with open ends needs the total bays + 1 posts. Gates need stronger posts and often a separate bay calculation. If you enter the panel width only, remember that posts also take up width: with 1.83 m panels and 100 mm posts the post-to-post spacing is about 1.93 m. Taller fences, exposed sites and soft ground need deeper holes and more concrete.

Common mistakes

Keep in mind: These are estimates. Post depth and footing size depend on fence height, wind exposure and soil; check local rules on boundary fence height and, for tall or retaining fences, consult a qualified professional.

Frequently asked questions

How deep should fence posts be?

A common rule of thumb is about one quarter to one third of the post's above-ground height, but local conditions and product guidance take priority.

How many posts do I need for a 30 m fence?

With 1.8 m bays, 17 bays and 18 posts for a straight run.

How many rails per bay?

Two rails suit lower fences; taller close-board fences often use three.

Sources: BS 1722 — Fences (series of British Standards)

Checked 8 Nov 2026. Typical coverage rates and standard formulas. Always check the product label and local building rules; buy 5–10% extra for waste.

🏠 All home & living tools →🌍 Calculators by country →