Decks & Fences
Fence Calculator
Enter your total fence length to get the number of standard fence panels and posts to buy, with gates handled and an optional VAT-aware cost estimate.
Formula tested · Local units · No sign-up
Project inputs
Enter measurements
Use your preferred units. Results update automatically.
Show the calculation methodFormula, conversions, rounding, and assumptions+
Panel bays = fence length ÷ post spacing, rounded up. UK fence panels are sold in a standard 6 ft (1.83 m) width, so post centres normally match the panel — a 30 m run needs ceil(30 ÷ 1.83) = 17 bays.
Posts = bays + the number of separate runs: a single 17-bay run needs 18 posts.
Each gate occupies one bay and hangs on posts already counted, so panels to buy = bays − gates.
Real-world example
Worked example: 30 m garden fence, 6 ft (1.83 m) panels, 1 gate, 1 run
- Panel bays: 30 ÷ 1.83 = 16.39 → round up to 17 bays.
- Posts: 17 bays + 1 run = 18 posts.
- Panels to buy: 17 bays − 1 gate = 16 panels.
- Example cost: 18 posts × £15 = £270; 16 panels × £30 = £480; materials £750.
- VAT at 20%: £750 × 0.20 = £150.
Buy 18 posts and 16 panels (plus the gate, priced separately). With the example prices above the estimate is £900.00 including VAT — enter your supplier's quote.
Before you start
How to measure
- Measure each straight run along the boundary in metres and enter the total; set the number of runs so corner-to-corner end posts are counted.
- Set post spacing to the actual panel width — the nominal '6 ft panel' is 1.83 m; check your supplier's stated width, as some panels are 1.8 m exactly.
- The last bay is almost never a full panel width — the standard approach is to cut down one panel, which the rounded-up count already allows for.
Local guidance
Notes for United Kingdom
- Check who owns the fence before replacing it: your title plan or deeds may show boundary responsibility, and agreement with the neighbour avoids disputes.
- Fences above certain heights (commonly around 2 m, lower next to highways) can need planning permission — check with your local planning authority before building.
- Scan for buried services before digging post holes — hire or borrow a CAT scanner (cable avoidance tool) and consult utility plans for the street; there is no single national free marking service like the US 811.
- Concrete posts with gravel boards last longer at ground level and let panels slot in and out; timber posts look softer but sit in the wet zone — either works with this calculator, only the price changes.
- VAT at the standard 20% rate applies to most fencing supply; trade quotes are often ex-VAT.
Quick reference
Common UK panel and post options (planning values)
| Item | Common size / type |
|---|---|
| Lap or closeboard panel | 6 ft (1.83 m) wide |
| Panel heights | 3–6 ft, often with gravel board below |
| Posts | Concrete slotted or 75–100 mm timber |
| Post length | Panel height + ~600 mm in the ground |
Planning values only — match the panels and posts your merchant stocks.
Good to know
Common mistakes to avoid
- Assuming the fence is yours to replace — check the deeds and talk to the neighbour first.
- Digging without scanning for cables and pipes — a CAT scan takes minutes and post holes go deep enough to find services.
- Entering panel spacing as 2 m 'to be safe' when the panels are 1.83 m — the bays won't fit and the count will be wrong.
- Forgetting gravel boards, post mix and caps — this estimate covers posts and panels only.
- Comparing an ex-VAT trade quote against a VAT-inclusive retail price.
Need help?
Frequently asked questions
How many panels and posts for a 20 m run of 6 ft panels?
ceil(20 ÷ 1.83) = 11 bays, so 11 panels and 12 posts for a single run with no gates. The eleventh panel gets cut down to fill the final part-bay.
Concrete or timber posts?
Concrete slotted posts resist rot at ground level and let you slide panels out for replacement; timber posts are lighter and look more natural but are the usual failure point. The calculator works with either — only your entered price changes.
Do I need planning permission for a garden fence?
Often not, but height limits apply (commonly around 2 m, lower where the fence fronts a highway) and conservation areas or listed properties have extra rules. Check with your local planning authority before you order materials.
Keep planning
Related calculators
Transparency
About this calculator
- Written by:
- BuildMeasure Editorial Team
- Technically reviewed by:
- Pending independent technical reviewer (formula unit-tested; see methodology)
- Last reviewed:
- 2026-07-16
- Formula version:
- 1.0.0
- Region reviewed for:
- United Kingdom
- Spotted an error?
- Report a correction
Methodology
- Panel bays = total fence length ÷ post spacing, rounded UP to a whole bay. Lengths are converted to metres internally before dividing, so mixing feet and metres between fields is safe.
- Posts = bays + number of separate runs, because each straight run needs one more post than it has bays. Exact multiples are not bumped up an extra bay.
- Each gate is assumed to occupy one bay and hang on posts already counted, so panels to buy = bays − gates. Gates and gate hardware are never costed by this tool.
- The cost estimate multiplies the post and panel counts by the prices you enter, then applies the tax rate you enter. No prices are built in.
- The formula is covered by automated unit tests, including hand-calculated worked examples, and is versioned (see formula version on this page).
Sources & standards
- Panel width: 6 ft = 1.8288 m; UK panels are commonly sold as 6 ft / 1.83 m nominal width — confirm your supplier's exact size.
- Buried services: CAT (cable avoidance tool) scanning and utility record plans are the standard UK precautions before digging.
This tool provides a material estimate for planning purposes only. It is not a quotation, and it does not check boundary positions, wind loading, post embedment or local rules. Confirm the boundary line, any permit or approval requirements, and underground services before digging, and confirm quantities with your supplier before ordering.