Skip to main content
CalcMax

Fence Calculator

Range: 1 ft – 5,000 ft

Range: 1 ft – 12 ft

Range: 2 ft – 12 ft

Range: 0 in – 6 in

Range: 1 – 5

Result

14

Fence posts

Pickets
234
Rails
26
Rail length in feet
208 ft
Post length in feet
8 ft

Fence calculator: work out the three materials a fence is made of — how many fence posts, how many pickets and how many rails — from the length of the run, the post spacing, the picket size and the number of rails per section. The count is three steps rather than one multiplication, and all three round upward: posts are the run divided by the post spacing and rounded up, plus one more for the far end post; pickets are worked out for one section and multiplied by the number of sections; rails are the sections times the rails in each. The post spacing you choose drives everything else, and so does the picket: a 1×4 picket is 3-1/2 in wide and an 1×6 is 5-1/2 in, so an 8 ft section takes 28 of one and 18 of the other for the same privacy fence. Picket spacing is the one number this page does not report — a wood privacy fence is usually built butted, with the last picket ripped to fit, and the gap between pickets is a construction allowance rather than something an inspector measures. A 100 ft run at 8 ft post spacing, 1×6 pickets and two rails per section comes to 14 posts, 234 pickets and 26 rails.

Picket sizes, actual widths and pickets per 8 ft bay

Picket sizeActual width (in)Pickets per 8 ft bay (butted)
1×4 picket3.528
1×6 picket5.518
5/4×6 dog-ear picket5.518

The middle column is what the picket actually measures, and the third is that width divided into one 8 ft bay and rounded up. Read the first two rows together: 1×4 and 1×6 differ by two inches in name and by two inches in fact, and two inches is most of a narrow picket — so the same bay takes 28 of one and 18 of the other. The last two rows are identical because 1×6 and 5/4×6 share a face width — the difference between them is thickness, and thickness does not change how many fit.

Formula

sections = ceil( run ÷ post spacing ) posts = sections + 1 pickets = sections × ceil( ( section + gap ) ÷ ( picket width + gap ) ) rails = sections × rails per section

L
Total length of the fence run, in feet
s
Post spacing, in feet (8 ft is the usual wood fence bay)
w
Actual width of one picket, in inches (3.5 for a 1×4, 5.5 for an 1×6 or 5/4×6)
g
Gap you leave between pickets, in inches (0 for a butted privacy fence)
sections
Number of bays, rounded up — the last bay is often shorter than the rest
posts
Total fence posts, including the one at each end, so one more than the bays

Set out the posts first, because everything downstream follows the section count — the post spacing, not the total length, is what decides how many pickets and rails you buy. Measure the run along the fence line, decide where the posts actually go (a gate, a tree or a corner will often fix one bay short whether you wanted it or not), then pick the picket. Read the picket width off the lumber table rather than the nominal size: a 1×4 is 3-1/2 in and a 1×6 is 5-1/2 in, and using 4 and 6 instead will under-buy every section. If you are building a butted privacy fence, leave the gap at zero. The count of pickets per section rounds up, which is deliberate — the last picket in a section gets ripped to the remaining width, and that is normal practice for a wood fence.

Worked examples

  1. A 100 ft privacy fence, 8 ft post spacing, 1×6 pickets, two rails

    1. Sections: 100 ÷ 8 = 12.5, rounded up to 13 bays
    2. Posts: 13 + 1 = 14 (the extra one is the post at the far end)
    3. Pickets per bay: 96 ÷ 5.5 = 17.45, rounded up to 18 (the 18th is ripped to fit)
    4. Pickets in total: 13 × 18 = 234
    5. Rails: 13 × 2 = 26, which is 26 × 8 ft = 208 linear feet of rail
    6. Post length to buy: 6 ft of fence + 2 ft in the ground = 8 ft

    These are the page defaults. Two things are worth reading twice. The 100 ft run is 12.5 bays, so it becomes 13 bays with a short one at the end — that is what a fence does unless you deliberately spread the spacing out. And 234 pickets is not 100 ft ÷ 5.5 in (which is 218): the per-section rounding adds one picket to each of the 13 bays, and that extra is what gets ripped down.

  2. A 150 ft run of 1×4 pickets with a 1/2 in gap, three rails

    1. Sections: 150 ÷ 8 = 18.75, rounded up to 19 bays
    2. Posts: 19 + 1 = 20
    3. Pickets per bay: (96 + 0.5) ÷ (3.5 + 0.5) = 24.1, rounded up to 25
    4. Pickets in total: 19 × 25 = 475
    5. Rails: 19 × 3 = 57, or 456 linear feet
    6. Post length to buy: 6 + 2 = 8 ft

    Compare this with the 1×6 bay above: 28 pickets of 1×4 fit in an 8 ft bay when butted, and opening a 1/2 in gap drops that to 25 — an 11% cut, which is one gap's width accumulating across the bay. The narrower picket plus the gap costs about the same board feet as the wider butted board, but it buys a fence that lets the wind through.

  3. A 30 ft low fence, 6 ft post spacing, 5/4×6 dog-ear pickets

    1. Sections: 30 ÷ 6 = 5 exactly, so no short bay
    2. Posts: 5 + 1 = 6
    3. Pickets per bay: 72 ÷ 5.5 = 13.09, rounded up to 14
    4. Pickets in total: 5 × 14 = 70
    5. Rails: 5 × 2 = 10, or 60 linear feet
    6. Post length to buy: 4 + 2 = 6 ft

    A 5/4×6 dog-ear picket is 5-1/2 in wide — exactly the same as an 1×6 — so the count per bay is identical and only the thickness differs. That is why the reference table shows two rows with the same number. The height only touches the last output: change 4 ft to 6 ft and every count stays put while the post you buy grows from 6 ft to 8 ft.

Limitations

This page counts materials and does not design a fence. It does not check post size, footing depth, wind load or frost line, and a 6 ft privacy fence in an exposed spot needs a bigger post and a deeper footing than the arithmetic here has any opinion about. The post length it reports adds a flat 2 ft of embedment, which is a rule of thumb rather than a code figure: in ground that freezes deeply you need three feet or more, and a post set in concrete on a metal spike is different again. It does not subtract for a gate — a 4 ft gate removes about half a bay of pickets and adds two posts and a frame — or for corners, which need a post of their own on each leg. Rails are counted as one full post spacing each, so the linear feet are what you buy rather than what you cut. The counts assume one picket width and one rail count for the whole run. Finally, the last bay is often shorter than the rest, which is normal for a fence, but it does mean the pickets in that bay are cut down and the rails there too.

Frequently asked questions

How many pickets do I need for 100 ft of fence?
234 pickets of 1×6 with 8 ft post spacing, at 13 bays and 18 pickets per bay. Note that this is more than 100 ft ÷ 5.5 in, which is 218: the picket count is worked out per bay and rounded up, so each of the 13 bays gets one extra board to rip down. With 1×4 pickets it is 28 per bay and 364 in total; leave a 1/2 in gap and it drops to 25 per bay.
How many posts does a 100 ft fence need?
14 posts at 8 ft spacing. The run is 12.5 bays, which rounds up to 13, and then one more post is added for the far end — the number of posts is always one more than the number of bays. If you want the bays to come out even, shorten the spacing a little (7.7 ft gives 13 even bays) or accept the short bay at the end, which is what most fences do.
Should I leave a gap between pickets?
For a wood privacy fence, no — butted pickets are the usual build, with the last one in each bay ripped to fit. A gap is worth leaving on a fence that has to let wind through, and 1/2 in on 1×4 pickets removes about 11% of the boards in a bay. This page takes the gap as a field, and set to zero it reports the butted count; it deliberately does not report the resulting gap, because on a fence that number is an allowance rather than something to build to.
How long should the posts be?
The page adds 2 ft to the fence height, so a 6 ft fence reports 8 ft posts. That 2 ft is a rule of thumb, not a code figure: it is the common North American practice for a post set in a concrete footing, and you should go deeper where the ground freezes — three feet or more in a cold climate. If you are setting posts on metal spikes, or building on a wall, the figure does not apply at all.
How many rails do I need?
Two rails per bay is the usual build for a fence up to about 6 ft, which is the page default; go to three where the fence is taller, where the pickets are thin, or where it has to resist wind. The linear feet reported alongside the count are what you buy rather than what you cut — 26 rails at 8 ft is 208 linear feet — and rails are normally bought in the post spacing length so they can be cut to the short bay on site.
Does the fence height change the number of pickets?
No. Height only decides how long the posts are and, indirectly, whether you want a third rail — the pickets are counted across the run, not up it, so a 4 ft fence and a 6 ft fence of the same length take exactly the same number of pickets, only shorter ones. Change the height field and watch: every count on the page stays where it is and only the post length moves.

References

Related calculators