Free calculator No sign-up needed

TIMBER, DOORS & JOINERY

Fence Post Spacing Calculator

Work out exactly what this job needs, quantities, waste and all, then read the full guide below. This calculator is paired with its step-by-step guide in the Project Journal.

Fence Post Spacing Calculator

This calculator needs JavaScript to run. If JavaScript is turned on and you still see this message, reload the page or try a different browser.

Example values are pre-filled. Replace them with your own measurements and the details from your supplier.

Fence run

In metres (m). Measure along the line of the fence.

In metres (m). Distance between posts, centre to centre.

Your estimate

Enter your measurements and choose “Calculate fence posts”. Your estimate and a full breakdown will appear here.

Save to My Projects

Print / PDF view shows a clean result-only sheet for printing or saving as a PDF. Saved results appear under My Projects and in your dashboard. Saving needs a free account.

Do more with Pro

Save this result into a whole-home project with folders, export a PDF pack and share it with your builder on one link.

$4.99 /mo · Yearly $49.90 (10 months + 2 free, max 1 year)

See BuildNook Pro

For a fence 30 m long with posts spaced 2.4 m apart, you need 14 posts. Divide the length by the spacing to get 12.5 bays, round up to 13 bays, and add one post for the far end, since every run needs a post at each end. The real spacing then becomes 30 divided by 13, which is about 2.31 m, slightly closer than the 2.4 m you planned, and the calculator shows that actual spacing in the breakdown.

Introduction

A post and rail fence is only as good as its posts. The rails carry the load, but the posts carry the rails, and a post that is too far from its neighbour lets the rails sag, lets the fence lean in the wind, and lets stock push through the gap. Space the posts right and the fence stands straight for years. Space them wrong and the fence is a repair job waiting to happen, with every fix starting at a post that was never in the right place.

The spacing looks like a simple division, but it has a twist, which is that the number of bays is rarely a whole number, and the number of posts is always one more than the number of bays. A 30 m fence at 2.4 m spacing gives 12.5 bays, which is not a fence anyone can build, so the bays are rounded up to 13 and the spacing is tightened slightly to fit. This calculator does that rounding and shows the actual spacing you will set out on the ground, so there are no surprises when the last bay turns out shorter than the rest.

This guide shows you how to measure a fence run, how to choose a spacing, how the calculation works, and how to set the posts out on the ground. The worked example uses a 30 m fence at 2.4 m spacing, which needs 14 posts.

How to use this calculator

Open the calculator above and check the example values that are already filled in. Replace each one with your own measurement, using the same units all the way through, and choose metric or imperial at the top of the form to match the tape you are using. Press the calculate button and the headline result appears at the top of the result panel, with a full breakdown underneath that shows every step of the working. If a field is wrong, the form marks it and explains what to fix, and the result only appears once every field is valid. You can print the result for the supplier or save it with the rest of the job paperwork, and the reset button restores the example values if you want to start again.

How to measure and what you need

Measure the length of the fence run along the line of the fence, from the first post to the last, following any slope or step in the ground rather than measuring the flat distance between the ends. Measure each straight run separately if the fence turns a corner, since each run is set out on its own and the corner post is shared between the two runs. Note any gates in the run, because a gate needs its own posts and breaks the run into two shorter sections that are calculated separately.

Choose the spacing from the type of fence and the ground it stands on. Post and rail fences for horses and cattle usually use 2.4 m to 3.0 m spacing, while a lighter fence for a garden boundary can go wider, and a fence on soft or windy ground should go closer. The rails you are using also set a limit, since a rail that spans too far will sag between the posts, and the supplier can tell you the longest span the rails are made for.

You will also need to know the post length, which depends on the fence height and the depth the posts are buried, usually a third of the post in the ground, and the type of post, timber or concrete, since that decides the hole size and the concrete needed. Mark the line of the fence on the ground with pegs and a string line before you start digging, so the spacing is set out where you can see it.

  • Measure each straight run along the fence line, not across the flat distance.
  • Count the corners, since each corner post is shared between two runs.
  • Note gates separately, since a gate breaks the run into two sections.
  • Choose the spacing from the fence type, the rails and the ground.
  • Note the post length and type, since that decides the hole and the concrete.
  • Mark the fence line with pegs and a string line before you dig.

How this estimate is calculated

The formula is: posts equal fence length divided by post spacing, rounded up to the next whole bay, plus one. The division gives the number of bays, the rounding gives the whole bays you can actually build, and the plus one gives the post at the far end, since a run of bays always has one more post than bays. The actual spacing is then the fence length divided by the rounded number of bays.

Worked example, step by step:

  1. Step 1: take the fence length and the spacing. In the example the fence is 30 m long and the spacing is 2.4 m.
  2. Step 2: divide the length by the spacing. 30 divided by 2.4 gives 12.5 bays.
  3. Step 3: round up to the next whole bay. 12.5 bays becomes 13 bays, since a part bay still needs a post at the end of it.
  4. Step 4: add one for the far end post. 13 bays plus 1 gives 14 posts.
  5. Step 5: work out the actual spacing. 30 m divided by 13 bays gives about 2.31 m between posts, slightly closer than the planned 2.4 m.

The calculator rounds bays up to the next whole number, because a part bay still has to be built and still needs its end post. The actual spacing is always equal to or slightly less than the planned spacing, never more, so the fence is always at least as strong as planned. If the actual spacing comes out much smaller than planned, consider widening the planned spacing by one step and running the calculation again, since a fence with bays far closer than needed wastes posts and money.

Step by step

  1. Measure the fence run and choose the spacing, enter them in the calculator, and note the post count and the actual spacing.
  2. Order the posts, rails, fixings and concrete, adding one or two spare posts for breakages and mistakes.
  3. Mark the fence line with pegs and a string line, then mark each post position using the actual spacing from the calculator.
  4. Dig the holes, set the end and corner posts first, and check they are plumb and at the right height.
  5. Set the remaining posts in line, using the string line to keep them straight and the actual spacing to keep them even.
  6. Fix the rails to the posts, check the whole run is level and straight, and backfill and compact the holes before the concrete sets.

Materials and costs

The table below lists the materials the job usually needs, with notes on what each one does.

Material Notes
Fence posts Timber or concrete, long enough for the fence height plus the buried depth.
Rails Timber rails that span between the posts, usually two or three per bay.
Post mix or concrete Sets the posts firm, ready mixed bags are easiest for small runs.
Fixings Nails, screws or bolts to fix the rails to the posts.
Post caps Protect the top of timber posts from rain and rot.
String line and pegs For marking the fence line and the post positions.

Prices vary by post type and region, and the figures here are illustrative examples to help you budget, not surveyed market prices. A timber fence post often costs around $8 to $20, or about £7 to £17, or about €7 to €18, while a concrete post often costs around $15 to $30, or about £12 to £25, or about €14 to €28. A timber rail often costs around $4 to $10, or about £3 to £8, or about €4 to €9, and a bag of post mix around $5 to $10, or about £4 to £8, or about €5 to €9.

Labour for a post and rail fence is usually charged per metre or per day, and a two person crew can often set a long run in a day or two. Get quotes that list the posts, the rails, the concrete and the fixings separately, and check whether old fence removal is included, since clearing the old fence takes time and makes waste to dispose of.

Order in good time, since delivery times vary and a short order can stall a job for days. Check the order against the breakdown, not just the headline, so you can see where each figure came from. Store posts and rails flat, dry and off the ground, and keep them out of direct sun and rain until they are fitted. Keep a spare post after the job for repairs, since a matching post may be hard to find later, and keep the receipt and any guarantee paperwork with the spare stock.

Common mistakes

  • Counting posts equal to bays: A run always needs one more post than bays. Forgetting the last post leaves a rail with nothing to fix to at the end.
  • Rounding bays down: A count of 12.5 bays means 13 bays. Rounding down leaves a gap at the end of the run that no rail can span.
  • Measuring the flat distance on a slope: A fence that steps down a slope is longer than the flat distance. Measure along the fence line itself.
  • Setting posts without a string line: Posts set by eye wander off straight. Set the end posts first and pull a line between them.
  • Spacing from the wrong point: Spacing is centre to centre. Measuring from the edge of one post to the edge of the next gives a different figure and uneven bays.
  • Forgetting the gate posts: A gate needs its own posts and hardware, and it breaks the run into two sections. Plan its position before you order.

Safety notes

Work safely, especially where the job involves digging, heavy lifting or power tools. Check for buried cables and pipes before you dig, since a post hole can hit services that are not marked on the surface, and call the local utility service if you are unsure. Wear gloves, eye protection and sturdy boots when digging and handling posts, and lift posts with your legs, not your back, since a long post is heavy and awkward. If the job involves a tall fence, a steep slope or work near power lines, get a professional in rather than taking a risk. Check local building rules before you start, since fence heights, boundaries and stock fencing all have rules that vary by area, and a quick check now is cheaper than redoing finished work.

Frequently asked questions

How many posts do I need for a 50 m fence at 2.5 m spacing?

Divide 50 by 2.5 to get 20 bays exactly, then add one to get 21 posts. A run that divides exactly still needs the extra end post, so the answer is never just the division.

What is the standard spacing for fence posts?

There is no single standard, but post and rail fences commonly use 2.4 m to 3.0 m, and panel fences use the panel width, usually 1.8 m. The rails and the ground decide the right figure for your fence.

Should I space posts centre to centre or edge to edge?

Centre to centre, always. That is how the calculator works, and it keeps the bays even whatever the post thickness is. Edge to edge spacing changes with the post size and gives uneven bays.

How deep should fence posts be buried?

A common rule is to bury a third of the post, so a 1.8 m fence needs posts about 2.4 m long with 0.6 m in the ground. Check local guidance for windy sites and soft ground, where deeper posts are needed.

Can I widen the spacing to save posts?

Only if the rails can span the wider gap without sagging. Long rails sag, and a sagging rail lets stock push through. Check the longest span your rails are made for before you widen the spacing.

How do I set out posts on a slope?

Step the fence down the slope, keeping each bay level, and measure the spacing along the slope rather than horizontally. The posts stay plumb while the rails step down from post to post.

Divide the run, round the bays up, add the end post, and the fence will stand straight from the first post to the last.