Fence Post and Rail Calculator

Works anywhere

Counts posts, gate posts, rails, palings and concrete bags for a fence from its length, post spacing, gates and hole size. A 30 m run at 2.4 m spacing with one 1 m gate needs 15 posts, 39 rails, 305 palings and 38 bags of 20 kg premix.

Enter your values

Fence lengths in metres or feet; post, paling and hole sizes in millimetres or inches.

A closed loop needs one fewer post than a run of the same length.

m

Measure along the fence line, including the gate openings.

m

Centre to centre. 2.4 m or 8 ft is standard; closer in high wind or for heavy panels.

Corners or direction changes that do not fall on a regular post. Each adds a post and a short bay.

Two for fences up to about 1.2 m or 4 ft, three for 1.8 m or 6 ft privacy fences.

Treat a double driveway gate as one wide gate.

m

Clear opening between the gate posts. 0.9 to 1.2 m or 3 to 4 ft for a pedestrian gate.

mm

Actual board width. Australian palings are usually 100 or 150 mm; US boards 3.5 or 5.5 in.

mm

Enter 0 for a closed privacy fence. A picket fence often has a gap near the board width.

mm

Side of a square post. A 100 x 100 mm or 4x4 post (3.5 in actual) is standard.

mm

About two and a half to three times the post width.

mm

About a third of the post length, and below the frost line in cold climates.

Yields are for premixed concrete once water is added. Check the bag for its exact yield.

Runs in your browser. Nothing you enter is stored or sent anywhere.

Results

Worked example. Edit the values and press Calculate

Total posts

15

A run with two ends, so one more post than bays plus one per gate.

  • Gate posts

    2

    Hinge and latch posts. Use a heavier post and a deeper hole here.

  • Line and corner posts

    13

  • Bays between posts

    13

  • Rails

    39

    One rail per bay per row. Long rails spanning two bays halve this count.

  • Palings or pickets

    305

    Includes 5 per cent for splits and offcuts.

  • Concrete per post hole

    0.0235 m³

  • Concrete bags

    38 x 20 kg bag

    About 2.5 bags per post.

  • Fence length less gates

    29.0 m

Why use this calculator

Fence quantities go wrong in small, expensive ways. People forget that a run of ten bays needs eleven posts, that each gate adds a post because it breaks the run in two, that a closed boundary saves a post, and that concrete is sold by the bag with a yield much smaller than it looks.

The result is either a second trip to the hardware store mid-job or a pile of unused bags going hard in the shed. This calculator gets the counts right from the layout. It subtracts gate openings, counts bays and posts correctly for a run or a closed loop, adds a bay and a post for every corner that does not land on the spacing, and works out concrete from the actual hole volume less the post, divided by the published yield of the bag you are buying.

Fence height limits, boundary rules and pool fencing are set by local councils and codes, so check those before you dig.

How to use it

  1. Choose metric or imperial units.
  2. Say whether the fence is a run with two ends or a closed boundary.
  3. Enter the total fence length measured along the line including gates.
  4. Enter the post spacing centre to centre, typically 2.4 m or 8 ft.
  5. Enter the number of corners that do not fall on a regular post. Enter how many rails each bay has.
  6. Enter the number of gates and the clear opening width of each.
  7. Enter the paling width and any gap between palings.
  8. Enter the post width, then the hole diameter and depth.
  9. Finally pick the concrete bag size you will buy.

What each result means

Total posts
Every post in the fence including gate posts. Buy a spare or two in case one is bowed or split.
Gate posts
The hinge and latch posts either side of each gate. They carry the gate's weight and swing, so set them deeper and stronger.
Line and corner posts
Posts other than gate posts: the regular line posts plus ends and corners of the fence.
Bays between posts
The panels or sections between posts, including the short bays created at corners off the regular spacing.
Rails
Horizontal rails needed if each rail spans one bay. Rails long enough to span two bays halve the count.
Palings or pickets
Vertical boards to cover the fence length less gates, with 5 per cent extra for splits and bad boards.
Concrete per post hole
The volume of each hole less the post itself, which is what the concrete has to fill.
Concrete bags
Bags of premixed concrete for every hole, based on the published yield of the bag size you selected.
Fence length less gates
The length of actual fence to be built once gate openings are taken out, used for bays and palings.

The formula

Net length = total length - gates x gate width

Bays = round up (net length / post spacing) + corners

Posts = bays + gates + 1 for a run with two ends, or bays + gates for a closed boundary

Gate posts = 2 x gates

Rails = bays x rails per bay

Palings = round up (net length / (paling width + gap) x 1.05)

Concrete per hole = pi x (hole diameter / 2)² x depth - post width² x depth

Bags = round up (posts x concrete per hole / bag yield), using 0.0094 m³ per 20 kg bag or 0.375 cu ft per 50 lb bag

How this number is used in practice

Post spacing is set by the rails and the wind. Australian treated pine paling fences are usually built at 2.4 m centres because standard rails come in 2.4 and 4.8 m lengths, and US wood privacy fences at 8 ft for the same reason. In windy or cyclonic regions, or with solid panels that catch the wind, spacing drops to 1.8 to 2 m or 6 ft.

Colorbond and other steel panel fences in Australia come in fixed panel widths, typically 2.35 or 3.1 m, which then sets the post spacing for you.

Holes should be about a third of the post length deep, so a 2.4 m post for a 1.8 m fence goes about 600 mm into the ground. In cold US states posts go below the frost line, often 36 to 48 inches, to stop frost heave.

A hole around two and a half to three times the post width gives enough concrete around the post. A 20 kg bag of premix yields only about 9 to 10 litres of concrete, so most posts take two to four bags, which surprises people. Gravel in the bottom of the hole helps drainage and prolongs timber post life.

Fences also carry legal rules. In Australia, dividing fence costs are normally shared between neighbours under state dividing fences legislation, and pool fences must meet AS 1926.1. US cities and HOAs often cap front fences at 3 to 4 ft and rear fences at 6 ft, and England allows up to 2 m without planning permission except next to a highway.

Worked examples

  • A 30 m paling fence at 2.4 m spacing, 3 rails, one 1 m gate, 100 mm posts in 250 x 600 mm holes

    15 posts (2 gate posts), 13 bays, 39 rails, 305 palings and 38 x 20 kg bags of concrete

  • A US 100 ft privacy fence at 8 ft spacing, 3 rails, one 4 ft gate, 5.5 inch boards, 4x4 posts in 10 x 30 inch holes

    14 posts, 12 bays, 36 rails, 220 boards and 43 x 50 lb bags

  • A closed 60 m paddock boundary at 3 m spacing with two 3.6 m farm gates, 2 rails, no palings

    20 posts including 4 gate posts, 18 bays and 36 rails

When people use it

  • Pricing a replacement boundary fence before getting quotes
  • Ordering posts, rails and concrete for a DIY paling or privacy fence
  • Estimating materials for a paddock or stock fence with farm gates
  • Checking how many concrete bags a fencing job really needs
  • Comparing wider and closer post spacing on cost

Tips

  • Run a string line between end posts and set line posts to it for a straight fence.
  • Set gate posts first, deeper and in more concrete, since they take the load of a swinging gate.
  • Put a little gravel in the bottom of each hole so water drains away from the post end.
  • Slope the top of the concrete away from the post so water does not pool against the timber.
  • Call before you dig. Dial Before You Dig in Australia and 811 in the US locate underground services free.
  • Buy one or two spare posts and a few extra palings. Timber lengths always include a few bowed pieces.

What it assumes, and where it stops being accurate

  • Gates are treated as sitting within the fence line, each adding one post to the run. Adjacent gates sharing a post are not modelled.
  • Corners are assumed not to fall on a regular post, so each adds a post and a bay. Enter 0 if your corners land on the spacing.
  • Holes are round and posts square. Concrete volume excludes any gravel base.
  • Bag yields are typical published figures once water is added. Brands vary slightly.
  • Palings are counted along the net length with a 5 per cent allowance. Lapped palings need more.
  • Local fence height rules, boundary agreements and pool fence standards are not checked.

Terms used on this page

Bay
The section of fence between two adjacent posts.
Rail
A horizontal member fixed between posts that the palings or pickets are nailed to.
Paling
A vertical timber board in an Australian style fence, similar to a US picket or privacy board.
Frost line
The depth to which soil freezes in winter. Posts set above it can be heaved out.
Bag yield
The volume of concrete a bag of premix makes once water is added.

Questions people ask

How many posts do I need for a fence?
For a run with two ends, one more post than the number of bays, plus one extra for each gate because a gate breaks the run in two. For a closed boundary, the last bay finishes on the first post, so you need one fewer. Corners that do not land on the spacing add a post each.
How many bags of concrete per fence post?
It depends on the hole. A 250 mm by 600 mm hole around a 100 mm post needs about 0.023 m³, which is two and a half 20 kg bags. A 10 by 30 inch hole around a 4x4 needs about 1.15 cu ft, roughly three 50 lb bags.
How deep should fence posts go?
A common rule is one third of the post's total length, so about 600 mm for a 1.8 m fence or 2 to 3 ft for a 6 ft US fence. Gate posts and posts in soft soil go deeper, and in cold climates posts must reach below the frost line to stop heaving.
What is the standard fence post spacing?
2.4 m in Australia and 8 ft in the US for timber fences, matching standard rail lengths. Steel panel fences set spacing by panel width. Reduce spacing to about 1.8 m or 6 ft in high wind areas or for heavy solid panels.
Who pays for a boundary fence?
In Australia, neighbours usually share the cost of a standard dividing fence equally under state dividing fences laws, after written notice. In the US and UK it depends on local rules and who owns the fence. Agree in writing before building.

Use this with

Fence Post and Rail Calculator answers one part of the question. These pick up where it stops: Fencing Materials Calculator, Concrete Volume Calculator, Deck Materials Calculator and Mulch, Soil and Gravel Calculator.

Where these figures come from

Works anywhereLast reviewed 2026-09·How we build and check calculators

This calculation is jurisdiction-neutral arithmetic. No country-specific rules are applied.

Fence Post and Rail Calculator produces an estimate for general information. It is not financial, tax, medical, legal or engineering advice. read the full disclaimer. Spotted a wrong number? Report it and it gets fixed. The form picks up this calculator and the inputs you used.