Fence Calculator
Turn fence length and post spacing into posts, rails, pickets and footing concrete.
Supports metric, imperial and mixed feet–inch units, with cuboid or round posts.
Updated October 29, 2026
Introduction
This page turns a fence run into a shopping list. You give it the length of the fence line, the distance between posts and the size of the pickets; it returns how many posts and sections the run breaks into, how many rails and pickets to buy, how long each post has to be, and how much concrete the post footings take.
Every count comes back as a whole item, because a part post or a part picket is still something you have to buy and cut. That makes the totals directly usable at the timber yard. It also explains a habit worth knowing before you start typing: the post, section and picket totals are read-backs, not boxes you can overwrite. Rounding up throws away the exact length that produced the count, so the page will not rebuild your measurements from an integer.
Metric, imperial and mixed feet–inch entries all work, and the post cross-section can be sawn or round — each shape has its own footing formula. It suits a homeowner planning a garden or privacy run before ordering timber, and a contractor turning a client’s boundary line into the same list.
13 posts
A straight 30 m run at 2.5 m spacing
1.5 × height
Post length, with a third of it underground
0.08 m³ each
Concrete for a 10 × 10 cm post, 3 m long
Quick start
Six entries cover the whole page. It opens with the post space already at 2.5 m and 2 rails per section, so the run length is the first thing you actually measure.
Measure the fence line
Measure along the finished fence line from the first post to the last, and include the closing post in the figure. On a run with corners, measure each straight side rather than the diagonal shortcut across the plot. If you know the plot’s dimensions but not the boundary length, the rectangle fence perimeter calculator gives you the length to start from.
Set the space between posts
This is the distance from post to post, not the number of posts you would like. Most garden and privacy runs sit somewhere in the 6–8 ft (roughly 2–3 m) band; the page starts you at 2.5 m. This one box drives the post, section and rail totals at once, so it is the number to be sure about.
Read posts and sections
Two totals appear: the number of posts to buy and the number of sections between them. They are always one apart — a run of 13 posts has 12 sections.
Enter the fence height
Height is measured from the soil line to the top of the pickets. The post length then appears at 1.5 times the height, because a third of every post stays underground. If you already own posts of a fixed length, type that length instead and the height solves around it.
Describe the pickets
Picket width is the face width across one board; picket spacing is the gap beside it. A gap of zero is allowed and gives you the butted count for a solid screen.
Choose the post shape and its dimension
Cuboid asks for a width and a thickness, cylindrical asks for a diameter. With the post length already known, the concrete volume for all the footings appears. If you have a volume in hand — a delivered load, or a figure you already worked out — leave one post dimension empty, type the volume, and that empty box fills with the size the volume fits.
The 30 m run, worked end to end
A straight 30 m boundary, posts every 2.5 m, a 2 m high picket fence, 10 cm pickets with 5 cm gaps, and 10 × 10 cm sawn posts. The whole answer fits in six lines:
Read it as an order: 13 posts, 24 rails, 200 pickets, and about 1.04 m³ of concrete for the footings. Nothing in that list needs rounding again.
Posts, sections, rails and pickets
Four counts come out of these boxes, and each one is a single division rounded up to a whole item. Posts, sections and rails turn on the fence length and the post spacing; the picket count adds the picket’s own step.
Posts and sections
The number of sections is the run divided by the post spacing, rounded up to a whole section. The number of posts is one more than that, because the closing post has no section after it.
Rounding up is the whole point of the ceiling here: a run that does not divide evenly still needs a post at the far end. So 20 m at 2.4 m spacing gives 9 sections and 10 posts, with the final section about 0.8 m long rather than the full 2.4 m.
Rails
A rail spans one section, from post to post, so the rail total is the rails per section multiplied by the number of sections. Two rails per section is the usual picket fence layout and is already in the box.
This is the one count pair that solves in both directions. If a quote or a stock list states a rail total, type it in and the rails per section box works back to. Rails per section has to land on a whole number, which is exactly the check that catches an order that does not fit the sections you measured.
Pickets
One picket plus one gap is the repeating step, so the picket count is the run divided by that step, rounded up.
The ceiling matters more here than anywhere else on the page, because the last picket is the one that gets trimmed. In the 30 m example the 200 pickets take up, so the closing 5 cm is the one gap of slack — leave it at one end, or split it between the two ends to centre the run between its posts.
Which boxes you can type into
| Box | What it does |
|---|---|
| Fence length, post space | Your own measurements. Nothing on the page rewrites them, so they stay valid while the results move around them. |
| Picket width, picket spacing | Your own measurements, and the two that move the picket count most. |
| Number of posts, sections, pickets | Read-back totals, rounded up. Retyping them is not offered, because an integer cannot recover the length behind it. |
| Rails per section, number of rails | Both editable, and they solve each other. |
| Fence height, post length | Both editable. Enter a height and the post follows, or enter the post you own and the height follows. |
| Post dimensions, concrete volume | All editable. Leave one dimension empty and type a volume; that empty box fills with the size the volume fits. |
Post shape is the switch between the sawn and round footing formulas; it is not a measurement.
Post length and footing concrete
A post has to stand its full height above ground and keep a third of its length in the ground, which makes the post 1.5 times the fence height and puts the buried depth at half the height.
So a 2 m fence stands on 3 m posts with 1 m underground. The same rule sets the footing depth used by the concrete formula, which is why the concrete box only needs the post length as an input.
Hole minus buried post
The volume is the hole with the buried post subtracted from it, counted once per post. The model takes the hole as a footprint three times the post’s own size in each direction, and buries a third of the post:
For a round post the hole is a circle three diameters across, so a 10 cm post sits in a 30 cm round hole. The final multiplication by the post count is what turns a per-post volume into the total for the whole run.
Working backwards from a volume
Concrete is usually the last thing bought, after the posts are chosen, but a delivered load or a fixed budget can flip the question around. Rearranged, the same formulas give the post dimension that a volume implies:
To run one of these, clear the box you want answered and then type the volume: the empty post dimension is the one that fills. Leave every dimension filled instead and the page has no empty box to answer with, so it has to give up one of the sizes you entered to honour the volume you just typed — which is rarely what you meant.
The same 13 posts that take 1.04 m³ as 10 × 10 cm sawn posts take about 0.82 m³ as 10 cm round posts, because a circular post leaves less of the hole filled with timber. If you want that volume as bags, weight or a delivered price, the concrete calculator takes it from there.
If your ground needs a deeper footing
This page fixes the buried share of the post at a third. Some ground, and some local practice, calls for burying a post to a different ratio; the fence post depth calculator keeps the ratio as a box you can change, and reports the resulting buried depth and total post length. Use it when the depth is the open question, and come back here with the post length it gives you.
Worked examples
Two cases that need different parts of the page: an imperial run where the mixed feet–inch entry does the work, and a volume-first case where the answer runs backwards.
A 60 ft boundary in imperial sizes
Situation: A back boundary 60 ft long, posts every 8 ft, a 4 ft high picket fence with 5½ in pickets and 1½ in gaps, and 4 × 4 in posts.
What goes in
What comes out
The picket line works in inches because the step is a whole 7 in: 720 in of fence split at 7 in each comes to 102.9 steps, and the ceiling buys the 103rd picket. The concrete total lands on 16 cu ft — about 0.59 cu yd — for the nine footings.
What a delivered volume says about the post size
Situation: A load of 1.2 m³ of concrete arrives for the same 30 m run: 13 posts, 3 m long, sawn boards 10 cm thick. The width box is left empty on purpose, so it is the one the volume answers.
What goes in
What comes out
Read that as a margin rather than a size. The design needed 1.04 m³, so 1.2 m³ is about 15% more: enough for slightly chunkier 11.5 cm boards, or for a deeper or wider hole than the model assumes, or simply 0.16 m³ left over. Which of those it buys you is your call, but the volume you actually pour is not a detail — it is what the post size has to fit.
Tips for measuring and ordering
The formulas are simple; almost every disappointing fence order comes from the two measurements going in, not from the arithmetic.
- Measure post to post along the finished line, not along the old fence, and keep the run as one figure only while it is actually straight. A single measurement that wanders with the ground gives you a spacing that is right at one end and wrong at the other.
- On a run with a corner, treat each straight side as its own run and subtract the post the two sides share. A 12 m side and an 8 m side at 2 m spacing givesposts, which is one fewer than adding the 7 and the 5.
- Expect the last section to be short whenever the run does not divide evenly. It still counts as a section, so it still gets its rails — you cut the final pair down to fit rather than pretend the section is missing.
- A picket gap of zero is a real choice for a solid privacy screen, and it changes the count completely: the 30 m run above needs 300 butted 10 cm pickets instead of 200.
- Watch for the two red flags rather than working around them. A post space past 5 m (about 16 ft) leaves a rail unsupported over a span no rail carries, and a post longer than 6 m (about 20 ft) is not standard fence stock — both messages mean re-check the box, and both keep the numbers on screen so you can see what the input produced.
- Mixed entries are fine: 6 ft 6 in in one field, or 1 m 77 cm in another. Changing the unit shown on a box re-labels the same measurement and never moves a result.
Limitations
This is a material estimate for a straight run of fence on level ground. It answers “how much do I buy”, not “is this fence safe or legal here”.
What the model leaves out
Every count is a minimum, with no waste allowance for breakage, warped boards or mis-cuts, and nothing for fixings: nails, screws, brackets, post caps, postcrete bags, gravel or a base layer under the hole. Gates and openings are not modelled at all — the run is treated as continuous from the first post to the last.
The footing volume assumes a square or round hole three times the post’s own size and a post buried exactly a third of its length. A hole dug wider at the top, a belled base, a gravel drainage layer or a shallower-than-planned post all change the concrete you actually pour, and none of them are in the formula.
Level ground is assumed too. On a slope, the finished height changes from post to post and the rails and pickets have to follow the fall; run the calculation for the tallest and the shortest section to see the range you are buying for.
Fence height limits, boundary setbacks, permitted-development rules and the depth a post footing must reach in frost-prone ground are local questions, and this page does not know them. Check the current rules with your local building department or the relevant authority before you order, especially for a front boundary or a fence over 2 m. The two red warnings are sanity checks on your inputs, not building-code limits.
Frequently asked questions
Why can't I type the number of posts?
Because the count is rounded up and a rounded count cannot give your measurement back. Ten posts could have come from an 18 m run at 2 m spacing or a 22 m one at 2.5 m, so letting you type a post count would force the page to invent a fence length you never measured. The post, section and picket totals are read-backs for that reason; the measured boxes are always yours.
Is the concrete figure for one post or for all of them?
For all of them. The volume box holds the total, with the post count already multiplied in. For a per-post figure divide by the post count — the 30 m example’s 1.04 m³ over 13 posts is 0.08 m³ each, and the round-post version is about 0.063 m³ each.
Why does a typed rail total sometimes come back red?
Because rails per section has to be a whole number, and the run you measured has a fixed number of sections. Twenty rails over 9 sections works out torails per section, which is not a number of rails you can fit. Round the order to a whole multiple — 18 rails for two per section or 27 for three — or trim the rails on site and accept the spare.
Related Calculators
Board Foot Calculator
Calculate board feet from lumber dimensions. Convert timber volume measurements across different unit systems.
Bolt Circle Calculator
Lay out a circular bolt pattern: turn the hole count, radius, first-hole angle and centre offset into an x and y coordinate for every hole.
Bowl Segment Calculator
Turn a segmented bowl's segment count, outer radius, wall thickness and allowances into cut-ready segment lengths, blank thickness and cutting angle.
Material Removal Rate Calculator
Work out how much material a machining pass removes per minute for turning, milling, grooving, drilling or grinding. Enter the cut geometry and the cutting speed, read the removal rate in ten flow units, or leave one box empty to solve back for it.
Beam Deflection Calculator
Find how far a simply supported or cantilever beam bends under a point load, a uniform load, a linearly varying load, a triangular load or an end moment. Enter the span, the load and the flexural rigidity, or the modulus of elasticity and area moment of inertia separately, and read the maximum deflection and where it occurs.
Square Yards Calculator
Multiply a length and a width into square yards and price the material. Seven length units, nine area units from square centimeters to acres, and twenty currencies converted at live exchange rates.