Fence Calculator

Enter your total fence length, post spacing and rails per section and we work out the posts, linear rail metres, and material cost — works for timber, post-and-rail, or closeboard fencing.

#construction#fence#fencing#diy

2.4 m (≈ 8 ft) is the typical residential spacing; UK closeboard often uses 1.83 m or 3.0 m bays.

£
£

Total material cost

£584.40

Posts needed
14
Sections (bays)
13
Rail length (m)
93.6
Rail length (ft)
307.09
Posts subtotal
£210.00
Rails subtotal
£374.40
Cost per metre
£19.48

Sections = ⌈length ÷ spacing⌉. Posts = sections + 1 (two end posts plus one per bay). Rail length = sections × spacing × rails per section. Totals = (posts × price per post) + (rail length × price per rail metre).

How to use this calculator

Measure the total run of the fence in metres — if it turns a corner, treat each straight as a separate calculation. Set the post spacing: 2.4 m (≈ 8 ft) is the most common residential spacing and matches stock 8 ft panels; UK closeboard fencing per BS 1722-5 typically uses 1.83 m or 3.0 m bays. Pick the number of horizontal rails: 2 for low fences under 1.2 m, 3 for the standard 1.2–1.8 m residential fence, 4 for tall or livestock fencing. Enter the unit price of one post and the price per linear metre of rail board, and the calculator returns the posts to order, total rail length in metres and feet, and the material cost.

How the calculation works

The fence is divided into equal bays between posts. Sections = ⌈length ÷ spacing⌉, rounded up so the last bay is never longer than the spacing limit. Posts = sections + 1, because every bay sits between two posts and the two ends share posts with the adjacent bays. Linear rail metres = sections × spacing × rails per section. The post subtotal is posts × price per post, the rail subtotal is rail metres × price per rail metre, and the grand total adds the two. Cost per metre = total ÷ length, useful for comparing fence styles against each other.

Worked example

A 30 m straight fence with 2.4 m post spacing, 3 rails per section, £15 per post and £4 per linear rail metre. Sections = ⌈30 ÷ 2.4⌉ = ⌈12.5⌉ = 13. Posts = 13 + 1 = 14. Rail length = 13 × 2.4 × 3 = 93.6 m (≈ 307 ft). Posts subtotal = 14 × £15 = £210. Rails subtotal = 93.6 × £4 = £374.40. Total material cost = £584.40, or £19.48 per metre. The 0.5-bay overshoot at the end is the reason rounding up matters — if you only ordered 12 bays of materials you would be 1.2 m short at the gate end.

Frequently asked questions

What post spacing should I use?

For timber post-and-rail or closeboard fencing the standard is 2.4 m (8 ft) in North America and 1.83 m (6 ft) or 3.0 m in the UK per BS 1722-5. Wider bays save posts but need stiffer rails to avoid sag, and wider than 3 m is rarely worth the saving once you factor in the heavier rail timber. For chain-link fencing you can stretch to 3.0–3.6 m between line posts because the mesh carries the load between them. Match the spacing to the rail or panel stock you are buying — there is no point engineering 2.5 m bays if your timber merchant only sells 2.4 m rails.

Why does the post count come out higher than length ÷ spacing?

Because a fence is a sequence of bays, not a sequence of posts. A 24 m fence at 2.4 m spacing has 10 bays, but it has 11 posts: one at each end, plus 9 intermediate posts between the bays. The general rule is posts = sections + 1. The calculator also rounds the section count up, so a 25 m fence at 2.4 m spacing gives 11 bays (the last one only 0.6 m wide) and 12 posts — you cannot order 10.4 bays of materials.

How many rails do I need per section?

2 rails for a low fence under about 1.2 m, 3 rails for the standard 1.2–1.8 m residential fence, and 4 rails for tall fencing, paddock or livestock fences where animals can lean on the lower rails. BS 1722-5 §6 specifies a minimum of three rails for closeboard fencing 1.5 m and above. More rails make the fence stiffer and more secure but add proportional cost — the calculator scales the rail subtotal linearly so you can compare options quickly.

Does the calculator include pickets, panels, posts concrete, or gate hardware?

No — it costs the structural skeleton (posts and horizontal rails) only. Pickets, closeboard featheredge, mesh, or pre-made panels are sold per linear metre or per panel and depend on the specific product; multiply your total length by the panel/cladding rate and add it on. Post-setting concrete typically runs at one 20 kg bag of post-mix per 100 mm post hole (about 0.018 m³ of mixed concrete per post). Gate hardware, capping rails and any decorative trim are also extras. Get a separate quote from your supplier for these once you know the post and rail count.

What about corners and gates?

For an L-shaped or U-shaped run, calculate each straight section independently and sum the results — the corner post is shared, so subtract one post for each corner once you add the runs together. For gates, treat the gate opening as a section the gate spans (so still one bay), but order heavier gate posts than line posts (typically 125 × 125 mm timber or 75 mm box-section steel instead of 100 × 100 mm). The calculator assumes uniform line-post pricing; bump the post price upward if half your posts are gate posts.

How do I convert the rail length to feet for a US supplier?

The calculator already shows both. The exact conversion is 1 ft = 0.3048 m (NIST), so multiply metres by 3.28084 to get feet, or divide by 0.3048. A 93.6 m rail order is 307.09 ft — if your supplier sells in 8 ft lengths, that is ⌈307.09 ÷ 8⌉ = 39 boards. Always order one extra board per straight run to allow for end trims and saw cuts.