Home › Home & Construction › Fence Calculator
Home & Construction

Fence Calculator

Enter the fence length, the post spacing you are aiming for, the picket width and gap, and get the number of sections and posts, the exact picket count, the pickets to buy once waste is added openly, the rail pieces, and the cost at your price per picket.

Free · No sign-up · Runs in your browser · First published 2026-10-22 · Updated October 2026

The run is divided into equal sections no wider than your target spacing, so a run that does not divide evenly ends up with slightly closer posts rather than one overstretched bay — that rounding is shown, not hidden. Pickets are counted across the whole run with the gaps between them counted properly: the last picket needs no gap after it, and the formula below is the one that respects that. Post concrete, gates and hardware are separate shopping — the notes below say why they are not folded into this count. Everything is worked out on your own device.

Posts needed
—

A fence is three counts, and each one rounds a different way

Posts, pickets and rails fail in different directions when they are guessed, which is why this page works them separately. Sections must round up — a run that needs 12.5 bays gets 13, never 12 wide ones and a gap. Pickets must cover the run exactly, gaps included, and the gap count is not the picket count: there is one fewer gap than pickets, because the last picket has nothing after it. Rails are the only honest multiplication on the page — so many per section, times the sections. The counts sit with the other project-quantity pages here — the concrete calculator for what the posts stand in, the board foot calculator for the lumber itself — but a fence is counted in pieces, and pieces are bought whole.

The method, with every term defined

Sections = fence length ÷ target spacing, rounded UP  ·  Posts = sections + 1  ·  Actual spacing = length ÷ sections
Exact pickets = ( length in inches + one gap ) ÷ ( picket width + gap )  ·  To buy = exact × ( 1 + waste % ), rounded up
Bar chart of pickets to buy with a 10 percent waste allowance for three fence runs in standard 5.5 inch pickets with a half inch gap: 111 pickets for a 50 foot run, 221 for a 100 foot run and 441 for a 200 foot run
From the table below, drawn as bars: doubling the run doubles the pickets to buy.

The target spacing is a maximum, not a promise: dividing the run by it and rounding up gives sections that are all equal and all at or under the target, and the actual spacing row reports what you really got — posts set at the actual spacing, not the target, or the last bay will not match the rest. The picket formula deserves its shape: n pickets cover n widths but only n − 1 gaps, so the count that just covers a run of length L inches solves n × width + (n − 1) × gap ≥ L, which rearranges to the formula above — the "+ one gap" in the numerator is that missing final gap being handed back. The waste allowance covers the picket trimmed at each post, split or warped boards, and a few spares for the first storm; 10% is the usual planning figure, added openly here so the count before waste stays visible.

Worked example: a 100 foot run, 8 foot target spacing

The defaults above are a 100 ft run with an 8 ft target spacing, standard 5.5 in pickets with a 0.5 in gap, 2 rails per section and a 10% allowance. The run divides into 100 ÷ 8 = 12.5, rounded up to 13 sections of 100 ÷ 13 = 7.69 ft each — so 14 posts and 2 × 13 = 26 rail pieces, 200.00 ft of rail in total. The pickets: (1,200 + 0.5) ÷ (5.5 + 0.5) = 200.08 exactly. The coverage check proves the formula rather than asking you to trust it: 200 pickets would cover 200 × 5.5 + 199 × 0.5 = 1,199.50 inches — half an inch short of the run — while 201 cover 1,205.50 inches, so 201 whole pickets is the honest pre-waste count. With the allowance, 220.09 rounds up to 221 pickets to buy — at $2.50 a picket, $552.50.

Other runs, and the two settings that change the count most

Run (defaults unless stated, 10% waste)SectionsPostsActual spacingExact picketsTo buy
50 ft side fence787.14 ft100.08111
100 ft — worked example13147.69 ft200.08221
200 ft boundary25268.00 ft400.08441
100 ft, privacy fence (gap 0)13147.69 ft218.18240
100 ft, tighter 6 ft spacing17185.88 ft200.08221

Two lessons in the table. Closing the gap to zero for a privacy fence does not change the run at all, yet the picket count rises from 200.08 to 218.18 — the gaps were carrying about a twelfth of the run between them. And tightening the post spacing from 8 ft to 6 ft adds four posts and eight rail pieces while the picket count does not move a single board: spacing is a posts-and-rails decision, the gap is a pickets decision, and mixing the two up is how fence budgets go wrong. Rails for the table's other rows follow the same multiplication — 14 pieces (100.00 ft) for the 50 ft run, 50 pieces (400.00 ft) for the 200 ft run.

How to read your result — and its limits

Set posts out at the actual spacing, and buy pickets on the rounded-up count; the exact count is the audit figure to check a supplier's list against. Four limits belong with the page. Corners and gates break runs into pieces: count each straight run separately and add its own end post — a corner post serves two runs only if you count it once, and a gate opening is length with no pickets in it, hung on its own heavier posts, so subtract the opening from the picket run and plan the gate separately. Slopes rake or step: on sloping ground the pickets follow the slope and the true run is longer than the flat measurement — measure along the slope, or step each section level and expect extra trimming, which the waste allowance partly absorbs. Posts need setting, not just counting: post holes and their concrete are deliberately not estimated here, because depth rules are local (frost lines differ); the concrete calculator volumes each hole once your local depth is known. And lumber is sold in lengths: rail pieces are counted at the actual section length, but boards come in standard lengths — a 7.69 ft section is cut from an 8 ft board, and offcuts are not reusable as rails, so buy rail pieces as pieces, not as the total footage divided by a longer board. What this page guarantees is the counting itself: given the run, the spacing, the picket and the gap, every figure follows exactly as written above.

Frequently asked questions

How many posts do I need for a 100 foot fence?

At the common 8 foot maximum spacing, a 100 foot run divides into 12.5 bays, which rounds up to 13 equal sections of 7.69 feet — and a fence always has one more post than it has sections, so 14 posts. The rounding is the point: 12 sections would leave bays of 8.33 feet, wider than the spacing the rails and pickets are rated for. Each straight run of a fence needs its own count, with corner posts shared between the runs that meet there.

How many pickets do I need per 8 foot section?

With a standard 5.5 inch picket and a 0.5 inch gap, one full 8 foot section takes (96 + 0.5) / 6 = 16.08 pickets — 17 if you build and round section by section. This calculator counts the run as a whole instead (200.08 exact for 100 feet), because pickets run continuously past the posts, and lets the waste allowance absorb the trims at each post; at the defaults the two methods land on the same 221 pickets to buy, which is the cross-check that both are honest.

Why does a privacy fence need more pickets for the same run?

Because the gaps were covering ground. At a 0.5 inch gap, the spaces between pickets carry about a twelfth of a 100 foot run, so closing the gap to zero raises the exact count from 200.08 to 218.18 pickets — 240 to buy with a 10% allowance, against 221. Nothing about the run changed; the pickets alone now cover every inch the gaps used to cover for free.

How much concrete do the fence posts need?

This page counts posts but deliberately does not estimate their concrete, because the right hole depth is set by your local frost line and soil, not by the fence's length — a shallow hole in a cold climate heaves the post out within a few winters. Once your local depth and hole diameter are known, the concrete calculator on this site volumes a round post hole directly, and multiplying that by the post count here gives the pour.

Ahsan ul Haq
Editor, ToolFigure

Every ToolFigure calculator is checked against hand-worked examples before it is published — the same worked examples you can follow on each page. More about ToolFigure →

Related tools

Calculators that show their working

Free forever · No sign-up · Every result comes with its formula and a worked example.

Browse all tools