How this calculator works
It works for any wood or timber fence - picket, close-board, board-on-board or pre-made panels. A fence run is divided into bays no wider than the post spacing. Each bay is one panel; posts close each bay, rails span them, and pickets or boards clad the run:
bays = ceil(run length ÷ post spacing)
posts = bays + 1
rails = bays × rails per bay
pickets = ceil(run length ÷ (picket width + gap) × wastage)
concrete = posts × bags per post
Bays round up so no gap is ever wider than your spacing - it is the post count people run short on, so the estimate stays on the generous side. Building an L-shaped, three-sided or full perimeter fence? Add a run for each straight length and the quantities pool. When a run starts off the end of the one before it, tick “Starts off the previous run at a corner” and the two runs share that corner post - so it is counted once, not twice. Leave it unticked for a detached run that needs its own posts at both ends. All math runs in exact metric internally, so switching units never changes the answer.
Worked example
This example follows the unit system you pick in the calculator above.
A 20 m run at 2.4 m post spacing, 3 rails per bay, 90 mm pickets with a 10 mm gap, 10% wastage, 2 bags of post-mix per post:
- Bays: ceil(20 ÷ 2.4) = ceil(8.3) = 9, so posts = 9 + 1 = 10 posts.
- Rails: 9 bays × 3 = 27 rails (60 m of rail).
- Pickets: 20 ÷ 0.10 × 1.10 = 200 × 1.10 = 220 pickets.
- Concrete: 10 posts × 2 = 20 bags.
Fence material guide
Stick-built or pre-made panels
The calculator builds a fence two ways - pick Construction at the top:
- Stick-built - you buy posts, rails and individual pickets/palings/boards and assemble each bay on site. This is the default, and gives you the full rail and cladding counts plus a cladding wastage allowance.
- Pre-made panels - a panel fence where the rails and infill come as one welded unit: pre-made timber lap/featheredge panels, or steel picket, tubular and garrison panels. You set the panel width and the post width, and the calculator counts whole panels (one per bay), posts, fixing brackets (per panel - or none for slotted posts) and post caps, instead of rails and pickets.
Unlike a stick fence - whose pickets run across the front of the posts, so the post width never affects the length - panels bolt to the side of the posts and sit between them. So each panel + post repeat eats up the panel width plus one post width, and the centre-to-centre post spacing is the panel width plus the post width.
Both modes share the same posts and post-mix concrete maths, and both feed the cost section below - so you can price a DIY steel-panel run by the panel, post, bracket, cap and bag, or take an installed rate per metre.
panels = ceil(run length ÷ (panel width + post width)) (one panel per bay)
posts = panels + 1 per run
brackets = panels × brackets per panel
caps = posts
How much does a fence cost?
The materials list above is what sets the price, so this calculator estimates cost from your numbers rather than a national average that drifts out of date. In the Cost estimate section, pick how you are pricing the job:
- Buy the parts (DIY) - enter a price per post, per rail, per picket/board and per bag of post-mix. Each is multiplied by the quantity already worked out, then itemised and totalled, so you can see exactly where the money goes.
- Installed price - enter a single contractor rate per foot (or per metre) of fence. A fitted quote bundles posts, rails, boards, concrete and labour into that one rate, so the cost is simply your fence length × the rate.
material cost = posts × $/post + rails × $/rail + pickets × $/picket + bags × $/bag
installed cost = total fence length × installed rate per foot
Leave any price blank to skip it - a partial list still totals, so you can price just the pickets if that is all you need. Cost figures are indicative; set each price to a real quote for your area, and add gates, hardware and any tool hire or waste removal separately.
Tips for setting out
- Set the two end posts first, run a string line between them, and space the intermediate posts off the line so the fence is dead straight.
- Dig post holes about three times the post width and a third of the fence height deep, then set each post in post-mix with a slight fall away from the timber.
- For a spaced picket fence, set the gap equal to the picket width for an even look; for privacy, set the gap to zero so boards butt or overlap.
- Add each side of a corner or stepped fence as its own run, and tick “Starts off the previous run at a corner” so the shared post at each turn is counted once.
- Buy a few spare pickets beyond the wastage allowance to replace any that split when nailing.
Fence terms where you are
In the United Kingdom, fencing is usually close-boarded (featheredge) over a gravel board, or pre-made fence panels, with posts set in fast-setting Postcrete.
For component sizes and post spacings to spec, see BS 1722, the British Standard for fences.
Fence guides
Go deeper on any part of the job: