TradeCalculator.co.uk
Post and Rail Fence Calculator — Posts, Rails & Wire
Calculate posts, rails, postcrete and wire mesh for post and rail fencing. Ideal for gardens, paddocks and rural boundaries in the UK.
Total length of fencing needed
Add wire mesh for livestock or pet containment
Adds 10% extra for cutting waste and off-cuts
10% is standard for post and rail fencing
Enter your supplier price for a cost estimate
Enter your supplier price for a cost estimate
Enter your supplier price for a cost estimate
Depth posts are buried in the ground (default 0.6m)
Weight of postcrete bags from your supplier (default 20kg)
Next up: related pages
How We Calculate This
Our post and rail calculator works by dividing your fence run length by the post spacing to get the number of bays, then adding one post for the end of the run. Rails are counted geometrically: because rails must butt-join at the centre of a post (never mid-bay), each rail can only span a whole number of bays.
The formula
Bays = Fence length ÷ Post spacing (rounded up)
Posts = Bays + 1
Bays per rail = Rail length ÷ Post spacing (rounded down, min 1)
Rails = ⌈Bays ÷ Bays per rail⌉ × Number of rail lines
Post length = Fence height + 600mm (burial depth)
For example, a 20m fence run at 1.8m spacing needs ⌈20 ÷ 1.8⌉ = 12 bays, so 13 posts. Each 3.6m rail spans two 1.8m bays (3.6 ÷ 1.8 = 2), so one rail line needs ⌈12 ÷ 2⌉ = 6 rails; with 3 rail lines that is 6 × 3 = 18 rails, every joint landing on a post. Post length for a 1.2m fence is 1.2m + 0.6m = 1.8m.
If you pick a post spacing that does not divide evenly into the rail length (for example 2.4m spacing with 3.6m rails), each rail has to be cut down to a single bay with off-cut waste, so the calculator counts one rail per bay and shows a warning. Pair 3.6m rails with 1.8m spacing, or 4.8m rails with 2.4m spacing, for waste-free joints.
Post length, depth and timber treatment
The calculator works out the post length you need to buy by adding the burial depth to your chosen fence height. The default 600mm (2ft) burial is the usual working depth for domestic post and rail fencing; taller fences, gate posts, corner posts and exposed or soft ground should go deeper (often 750mm or more), and a useful guide is to set roughly a quarter to a third of the total post length below ground. So a 1.2m fence at 600mm depth needs a 1.8m post. Any post in permanent ground contact must be pressure-treated to Use Class 4 (UC4) per BS EN 335:2013 and BS 8417 - ordinary UC3 timber buried in soil can rot off at the groundline within a few years.
Post and rail fencing tips
- Use UC4 pressure-treated timber for all ground contact posts
- Butt rail ends at the centre of a post — never leave a joint mid-bay between posts
- Stagger the joints of the top, middle and bottom rails onto different posts
- On sloping ground, use closer post spacing and step the rails
- Pre-drill nail holes in hardwood rails to prevent splitting
- For paddock fencing, place rails on the inside so stock pushes against posts
Frequently Asked Questions
The standard spacing for UK post and rail fencing is 1.8m (6ft) between post centres, because the standard 3.6m (12ft) rail then spans exactly two bays and butt-joins at the centre of a post. Suppliers such as Jacksons advise 'one post for every 1.8m of fence, plus one for the end of the run'. Wider 2.4m spacing is sometimes used with 4.8m rails (two bays per rail); 3.0m spacing is only suitable for very light boundary fences and tends to let rails sag. Always choose a post spacing that divides evenly into your rail length so joints land on posts, not mid-bay.
Two rails are suitable for low boundary fences up to 0.9m. Three rails are the standard for most post and rail fences at 1.2m height, providing good strength and appearance. Four rails are used for taller fences (1.5m+) or where extra strength is needed, such as horse paddocks.
For standard garden post and rail fencing, 75×75mm posts are adequate. For agricultural fencing, paddocks, or where stock wire will be attached, use 100×100mm posts for extra strength. All posts should be pressure-treated to UC4 standard for ground contact use. Use our Concrete for Fence Posts Calculator to work out postcrete or concrete quantities for setting each post.
Yes, stock wire mesh is commonly attached to the field side of post and rail fencing to contain livestock or pets. Standard stock wire comes in 50m rolls. You will need fencing staples (U-nails) to fix the wire to the posts and rails. For sheep, use C8/80/15 wire; for cattle, use C8/80/30.
A well-installed post and rail fence using pressure-treated (tanalised) timber should last 15-20 years. Posts are the first component to deteriorate as they sit in the ground. Using concrete or postcrete to set posts, and ensuring good drainage around the base, will maximise lifespan. Softwood rails typically last 10-15 years.
Divide the total fence run length by the post spacing to get the number of bays, round up, then add one post for the end of the run: posts = ceil(length / spacing) + 1. At the standard 1.8m spacing a 20m run gives ceil(20 / 1.8) = 12 bays, so 13 posts. This matches the supplier rule of thumb (Jacksons Fencing): allow one post for every 1.8m of fence, plus one extra for the end. For corners or step-downs add an extra post at each change of direction. This calculator does the rounding for you and also returns the post length, rails, postcrete and any stock wire.
For most domestic post and rail fencing around 600mm (2ft) into the ground is the standard working depth, which is the default this calculator adds to your fence height to give the total post length. Taller fences, gate posts, corner posts and exposed or soft ground should go deeper (commonly 750mm or more). A practical guide is to bury roughly a quarter to a third of the total post length. Whatever the depth, any post set in the ground must be pressure-treated to Use Class 4 (UC4) for permanent ground contact, defined by BS EN 335:2013 and treated to BS 8417; UC3 timber buried in soil can rot at the groundline within a few years.
In England, under the Town and Country Planning (General Permitted Development) (England) Order 2015 (SI 2015/596), Part 2 Class A, a new fence is normally permitted development without planning permission if it is no more than 2 metres above ground level, or no more than 1 metre above ground level where it is next to a highway used by vehicular traffic (or next to the footway of such a highway). A typical 0.9m-1.2m post and rail fence is well within these limits. Permission is still needed if your home is listed, the fence forms a boundary to a listed building, or permitted development rights have been removed (for example by a planning condition or an Article 4 direction). Different rules apply in Scotland, Wales and Northern Ireland - check with your local planning authority.
For post and rail fencing the standard centre-to-centre post spacing in the UK is 1.8m (6ft), because the standard 3.6m (12ft) rail then spans exactly two bays and butt-joins at the centre of a post; 2.4m spacing is used with 4.8m rails. As a quick estimate that means one post for roughly every 1.8m of fence. Closer spacing is used on slopes, at corners, for gate posts and on exposed or stock-bearing fences. (Panel fencing is different: panels are a fixed 1.83m wide, so the post pitch is set by the panel, not by you.) The British Standard for this type of fence is BS 1722-7:2006+A1:2018, which specifies the components, materials and erection of wooden post and rail fences.
Fence posts are not a flat 'so many per metre' figure because you always need one extra post to finish the run. The count is posts = (fence length divided by post spacing, rounded up) + 1. At the standard 1.8m post and rail spacing that works out at roughly 0.56 posts per metre over a long run, e.g. about 12 bays and 13 posts for a 20m fence. Jacksons Fencing give the same rule: allow one post for every 1.8m of fence, then one more for the end of the run, and an additional post at every corner or change of direction. Enter your run length and spacing above and this calculator does the rounding and the end-post for you.
As a rule of thumb allow about 2 bags of 20kg postcrete (fast-set post mix) for a standard 100x100mm post in a 250mm-wide, 600mm-deep hole, which is the figure this calculator uses. The Timberonline hole-size table gives roughly 1 bag for a 200mm hole, 2 bags for a 250mm hole and 3 bags for a 300mm hole at 600mm deep. A lighter 75x75mm post sits in a smaller hole and needs less material – about 30kg, or 1.5 × 20kg bags by mass – but because you buy whole bags this calculator rounds that up to 2 bags per post. Jacksons Fencing advise 2 bags (40kg) for hard ground and 3 bags (60kg) for soft or exposed ground, so on default settings the figures here line up with their guidance. Postcrete is poured dry into water in the hole and stiffens within 1-2 minutes, setting hard in about 5-10 minutes (Jacksons), so mix only what you can position quickly. For a precise quantity by exact hole diameter and depth, use our Concrete for Fence Posts Calculator.
A common rule for setting a fence post is to dig the hole about three times the width of the post and around a quarter to a third of the total post length deep. For a standard 100x100mm post that means a roughly 250-300mm wide hole; a 75x75mm post needs about 200mm. Depth is typically 600mm (2ft) for domestic post and rail fencing - the burial depth this calculator adds to your fence height to give the post length to buy - going deeper (750mm or more) for taller fences, gate posts, corner posts and soft or exposed ground. Set the post on a layer of hardcore or gravel for drainage and use pressure-treated UC4 timber for anything in permanent ground contact (Use Class 4 per BS EN 335:2013, treated to BS 8417).
Related Calculators
Was this calculator helpful?
Last updated: February 2026
Verified against UK standards · estimates only, confirm with your supplier.