Fence Picket, Post and Rail Calculator

Give this calculator the total run of your fence, the actual width of the picket and the gap you want between pickets, and it returns the picket count, the number of posts including corners and gate posts, the lineal feet of rail, the fastener count, and how much concrete each post hole swallows — in cubic feet and in bags. The concrete figure subtracts the volume the post itself occupies, which most estimates forget and which is worth about a third of a bag on a 4x4 in a 10 in hole.

Calculator

This calculator runs in your browser. Enable JavaScript for live results — the inputs, formula and worked example below remain fully readable without it.

Inputs this calculator takes, with typical values
InputWhat to enterExample
Total fence runAdd up every straight leg of the fence, measured along the ground line, gates included.100 ft
Actual picket widthThe measured width, not the nominal call-out: a 1x6 fence board is 5.5 in and a 1x4 is 3.5 in.5.5 in
Gap between picketsZero for a solid privacy fence in wet treated stock; 2 to 3 in for a classic spaced picket; use the gap you actually want to see.0 in
Post spacing on centre8 ft is standard because rails come in 8 ft lengths; drop to 6 ft on windy sites or for heavy solid panels.8 ft
Rails per sectionRails carry the pickets; a 6 ft privacy fence normally gets three, spaced roughly evenly up the post.3 rails — standard 6 ft privacy fence
Extra corner, end and gate postsOne extra post for each corner, each direction change and each side of a gate that does not fall on a line post.2
Post sizeUsed to subtract the post's own volume from the hole, and to check that the post fits the hole you specified.4x4 — 3.5 in actual
Post hole diameterA common rule of thumb is three times the post width, so 10 to 12 in for a 4x4.10 in
Post hole depthBury about a third of the post's total length, and always go below your local frost depth.30 in
Price per picketCost of one picket at the height you are buying; set to zero if you only want quantities.3.5 $
Price per postCost of one post; the reported cost covers pickets and posts only, not rails, concrete or hardware.14 $

It returns

  • Pickets required — Rounded up so the run is fully covered; buy a few spare for splits and knots.
  • Posts required
  • Rail lineal feet
  • Concrete per post hole — Hole volume less the volume the post itself occupies.
  • 80 lb bags for all posts
  • Picket fasteners
  • Picket and post cost

The formula

N=R+gw+g
V=(πd24p2)h1728

In plain text: pickets = ceil((R + g) / (w + g)); posts = ceil(R / s) + 1 + extras; V = (π d²/4 − p²) × h / 1728

  • NNumber of pickets (count)
  • RTotal fence run (in)
  • wActual picket width (in)
  • gGap between pickets (in)
  • sPost spacing on centre (ft)
  • dPost hole diameter (in)
  • pPost width (square section) (in)
  • hPost hole depth (in)
  • VConcrete per hole (ft³)

The 1728 converts cubic inches to cubic feet. Subtracting p² from the hole area is the step most estimates skip; on a 4x4 in a 10 in hole the post displaces about 16% of the concrete.

Updated Category Stairs, Decks, Railings & Fencing Verified against published test cases Reading time 13 min

A fence is four separate takeoffs, not one

People price a fence per foot and are then surprised by the bill, because a fence is four independent counts and only one of them scales cleanly with length.

Pickets scale with the run divided by the picket module — the picket width plus whatever gap you hold. Narrow pickets cost far more per foot of fence than wide ones for the same coverage, and they multiply the fastener count at the same time.

Posts scale with the run divided by the post spacing, plus one. That plus-one catches people: a 100 ft run at 8 ft spacing has 12.5 bays, which rounds up to 13 sections, which needs 14 posts — not 13, and certainly not 12. Add one more post for every corner, every change of direction, and each side of a gate that does not land on a line post.

Rails scale with the run times the number of rails, so a three-rail 100 ft fence takes 300 lineal feet of rail. That is often more lumber than the pickets by volume, and it is the line most often left off a quick estimate.

Concrete scales with the number of post holes and the volume of each. It is priced by the bag, and it is the item most likely to run short mid-afternoon, because a 10 in hole 30 in deep needs two 80 lb bags and most people budget one.

The four formulas, and the two places they go wrong

Pickets. N = ceil((R + g) ÷ (w + g)), with R the run in inches. The extra gap in the numerator exists because N pickets have only N − 1 gaps between them — there is no gap past the last one. Skip that correction and you under-count by a picket whenever the run lands just over a whole module. For a solid privacy fence the gap is zero and the formula collapses to run ÷ picket width.

Posts. sections = ceil(R ÷ s), posts = sections + 1 + extras. Rounding the section count up matters: it means the real post spacing comes out at or below the maximum you set, which is what you want structurally. A 100 ft run at 8 ft maximum gives 13 sections at 7.69 ft on centre, not 12 bays at 8.33 ft.

Rails. lineal feet = run × rails per section. Rails come in 8 ft lengths precisely because 8 ft is the traditional post bay, so a mismatch between your post spacing and the rail stock creates waste in every single bay. That is the strongest argument for sticking to 8 ft or 6 ft spacing.

Concrete. V = (πd²/4 − p²) × h ÷ 1728. The hole is a cylinder; the post inside it is a square prism; the concrete fills what is left. On a 4x4 (3.5 in actual, 12.25 in² of section) in a 10 in hole (78.54 in²), the post occupies 16% of the hole — about 0.21 ft³ over a 30 in depth, or a third of an 80 lb bag per post. Across 16 posts that is five bags you would otherwise have bought and not needed. Bags round up per hole, never across the job, because once mixed a part bag will not keep.

The two errors that dominate are forgetting the plus-one on the posts, and treating the hole as if the post were not in it. Both push in the same direction — one short on posts, one long on concrete.

Worked example: 100 ft of 6 ft privacy fence

You are running 100 ft of 6 ft cedar privacy fence in 1×6 boards (5.5 in actual), laid tight with no gap, on 4x4 posts at 8 ft on centre, with three rails per section, two corners, and 10 in holes 30 in deep.

  1. Picket module. 5.5 + 0 = 5.5 in.
  2. Run in inches. 100 × 12 = 1,200 in.
  3. Pickets. 1,200 ÷ 5.5 = 218.18, rounded up to 219 pickets. Those 219 boards span 219 × 5.5 = 1,204.5 in, so the last one is ripped by 4.5 in — or you open a 1/50 in gap at every joint and lose the rip entirely.
  4. Sections. 100 ÷ 8 = 12.5, rounded up to 13 sections, which sets the real spacing at 100 ÷ 13 = 7.69 ft on centre.
  5. Posts. 13 + 1 + 2 corners = 16 posts.
  6. Rails. 100 × 3 = 300 lineal ft, which is 38 rails at 8 ft.
  7. Fasteners. 219 pickets × 3 rails × 2 screws = 1,314 screws.
  8. Hole area. π × 10² ÷ 4 = 78.54 in². Post section: 3.5² = 12.25 in². Net: 66.29 in².
  9. Concrete per hole. 66.29 × 30 ÷ 1,728 = 1.151 ft³.
  10. Bags. 1.151 ÷ 0.60 = 1.92, rounded up to 2 bags per hole, so 16 × 2 = 32 bags of 80 lb.
  11. Picket and post cost at $3.50 and $14.00: 219 × 3.50 + 16 × 14.00 = 766.50 + 224.00 = $990.50, before rails, concrete and hardware.

Check the concrete a second way: 32 bags at 0.60 ft³ is 19.2 ft³, or 0.71 cubic yards. If you were ordering ready-mix instead of bags you would be at the minimum load charge, which is exactly why fences get built out of bags.

Reading the result: spacing, depth and the last picket

Check the real post spacing, not the one you typed. Rounding the section count up always tightens the spacing, so a 100 ft run at an 8 ft maximum lands at 7.69 ft. That is fine. What is not fine is the reverse mistake — dividing 100 by 8, getting 12.5 and building twelve bays at 8 ft 4 in with a short bay at the end. A short bay looks like a repair. If you want even bays, set the spacing so the run divides cleanly: 100 ft splits evenly into thirteen 7.69 ft bays, or twenty 5 ft bays, or ten 10 ft bays if the fence is light enough for it.

Hole depth is the number that decides whether the fence is still standing in ten years. Two rules of thumb govern it, and you take whichever is deeper: bury about one third of the post's total length, and get below the local frost depth. A 6 ft fence on an 8 ft post means 24 to 32 in in the ground. Frost depth is a local figure — a few inches in the Gulf states, 42 in or more across the northern plains and much of Canada — and your building department publishes it. A post set above the frost line will heave, and heaving is what pulls a fence out of line one winter at a time.

Decide how the last picket lands before you start. A run rarely divides into a whole number of pickets. Rip the last one, spread the difference across every gap, or start from the most visible end and let the rip land at the least visible corner. Spreading works well on a spaced picket fence — a 4.5 in surplus over 218 joints is only 0.02 in each and is invisible — and less well on a tight privacy fence where the gap is meant to be zero.

Do not read the cost as the whole job. The figure here covers pickets and posts. Rails, concrete, gate hardware, post caps, fasteners and finish are all real money, and on a typical privacy fence the pickets are only about half of the material bill.

Concrete per post hole for a 4x4 post

Volume = (π d² ÷ 4 − 12.25) × depth ÷ 1,728, for a 3.5 in actual post. Bags assume the published 0.60 ft³ yield of an 80 lb bag of concrete mix, rounded up per hole.
Hole depth8 in hole10 in hole12 in hole
24 in0.528 ft³ — 1 bag0.921 ft³ — 2 bags1.401 ft³ — 3 bags
30 in0.660 ft³ — 2 bags1.151 ft³ — 2 bags1.751 ft³ — 3 bags
36 in0.792 ft³ — 2 bags1.381 ft³ — 3 bags2.101 ft³ — 4 bags
42 in0.924 ft³ — 2 bags1.611 ft³ — 3 bags2.451 ft³ — 5 bags

A 6x6 post displaces 30.25 in² instead of 12.25 in², which removes roughly 0.31 ft³ from a 30 in hole. Use the calculator above rather than this table if you are setting 6x6 posts.

Permits, property lines and height

The International Residential Code exempts fences not over 7 ft high from a building permit in Section R105.2. That is a model-code exemption, not a blanket one: many municipalities amend it, and almost all of them regulate fence height, setback and appearance separately through zoning rather than through the building code — commonly 4 ft in a front yard and 6 ft at the rear.

Two things worth doing before you dig. Locate the property line from a survey rather than from the neighbour's shrubs, because a fence built over the line is a legal problem that concrete makes expensive. And call the national utility-locate service (811 in the United States) before any post hole; it is free, it is required in most jurisdictions, and a post auger through a gas service is a very bad afternoon.

Mistakes that leave you short

  • Forgetting the plus-one post. Thirteen sections need fourteen posts. Then add one per corner and per gate side.
  • Using nominal picket width. A 1x6 is 5.5 in, not 6 in. Using 6 in under-counts a 100 ft fence by 19 pickets.
  • Ignoring the post inside the hole. The post displaces 12 to 30 in² of the hole's cross-section. Over 16 holes that is several bags of concrete.
  • Setting posts above the frost line. Frost heave lifts posts a little each winter and never puts them back.
  • Buying rails to match a spacing you did not use. Rails come in 8 ft lengths; a 7 ft bay wastes a foot of every rail unless you can splice over a post.
  • Leaving no allowance for defects. Fence-grade pickets are the lowest grade a yard stocks. Buy 5% extra and cull as you go.
  • Assuming a gate fits a standard bay. Gates need their own posts, and a gate opening is the finished opening, not the post spacing — subtract the hinge and latch gaps.

Related takeoffs and where the numbers overlap

Fence posts and deck posts are set the same way but sized differently. A deck post carries a real gravity load and its footing is designed from the tributary area and the soil's bearing capacity — that is the deck footing size calculator, and a fence post footing is not a substitute for it. A fence post carries almost no vertical load; its footing resists overturning from wind, which is why depth matters far more than diameter for a fence and the reverse is true for a deck.

If you are buying concrete by the bag for anything else on the same job, the concrete bag calculator converts a volume into bags at any bag size, and the sonotube column calculator handles formed cylindrical piers where the form, not the excavation, sets the diameter. For lumber priced by volume rather than by the piece, the board foot calculator converts a cut list into board feet.

Two neighbouring jobs use nearly identical arithmetic. A deck surface is pickets laid flat: same module, same round-up, same gap correction — see the deck board calculator. A guard rail is pickets stood up with a code limit on the gap rather than a stylistic one; the baluster spacing calculator divides a rail so that no 4 in sphere can pass. And if you want to reason about the surplus you carry across an entire job rather than item by item, the construction waste factor calculator does that.

Key terms

Picket
A vertical board fixed to the rails. Also called a fence board or pale. Estimated by the module — its width plus the gap.
Line post
A post in a straight run, as opposed to a corner, end, gate or terminal post. Only line posts are set by the spacing calculation.
Rail (stringer)
The horizontal member spanning between posts that the pickets fasten to. Normally two to four per section.
Bay or section
One span of fence between two adjacent posts.
Frost depth
The depth to which the ground freezes locally. Footings and fence posts set above it will be lifted by frost heave.

Frequently asked questions

How many pickets do I need for 100 feet of fence?

219 pickets for a solid privacy fence in 1×6 boards. The arithmetic is 100 ft × 12 = 1,200 in divided by the 5.5 in actual width of a 1×6, which is 218.18 and rounds up to 219. With 1×4 boards (3.5 in actual) the same run takes 343 pickets. If you are leaving a gap, add the gap to the picket width first: 3.5 in boards with a 2.5 in gap make a 6 in module and need 201 pickets for 100 ft.

How deep should fence posts be set?

Take the deeper of two rules: about one third of the post's total length, and below your local frost depth. A 6 ft fence on an 8 ft post wants 24 to 32 in in the ground. Frost depth varies from a few inches on the Gulf coast to 42 in or more across the northern plains, and your building department publishes the figure for your jurisdiction. Gate posts and corner posts take more load than line posts and are usually set 6 in deeper.

How many bags of concrete per fence post?

Two 80 lb bags for the common case of a 4x4 in a 10 in hole 30 in deep. That hole holds 1.151 ft³ of concrete after the post is subtracted, and an 80 lb bag yields about 0.60 ft³. Round up per hole rather than across the job, because a partly used bag of mixed concrete cannot be carried to the next post. A shallower 8 in by 24 in hole needs one bag; a 12 in by 36 in hole needs four.

How far apart should fence posts be?

Eight feet on centre is the standard because rails come in 8 ft lengths, and six feet on centre is the usual choice on windy sites or for heavy solid panels. Go further than 8 ft and you need non-standard rail stock and you give the fence more sail area per post. Whatever maximum you choose, divide the run by it and round the section count up, so the real spacing lands at or under your limit and every bay is the same width.

Should I set fence posts in concrete or gravel?

Concrete is the common choice and gives the stiffest post; compacted gravel drains better and lets a rotted post be pulled and replaced without breaking out a footing. If you use concrete, crown the top so water sheds away from the post rather than pooling against it, and do not encase the very bottom of the post in a concrete cup that traps water. Either way, use a post rated for ground contact — a standard above-ground treatment retention is not enough below grade.

Does the calculator include gates?

Only through the extra post count. Add two extra posts for a gate that does not fall between existing line posts, and remember the gate leaf itself is not made of the pickets counted here — a gate is a separate framed unit. Subtract the gate opening from the total run if you do not want the calculator to buy pickets for it; leave it in if you plan to clad the gate to match, since the picket count then covers both.

What gap should I leave between fence pickets?

None for a privacy fence in wet pressure-treated stock, since it will shrink and open its own gap as it dries. For kiln-dried cedar or redwood, a 1/8 to 1/4 in gap prevents the boards binding and cupping when they swell in the wet season. A classic spaced picket fence uses a gap roughly equal to the picket width — 3.5 in boards with a 3.5 in gap. The gap is a design decision above about 1/4 in and a moisture decision below it.

How many rails does a 6 foot fence need?

Three: one near the top, one near the bottom and one in the middle. Two rails are enough for a fence up to about 4 ft, and four are used at 8 ft or where the pickets are heavy enough to sag between supports. A 100 ft three-rail fence takes 300 lineal feet of rail, which is 38 pieces of 8 ft stock — often more lumber by volume than the pickets, and the item most commonly left off a quick estimate.

References

  • 2021 International Residential Code, Section R105.2 — Work Exempt from Permit — International Code Council
  • Concrete Mix product data sheet (bag yields) — The Quikrete Companies
  • Standard Grading Rules for Southern Pine Lumber — Southern Pine Inspection Bureau
  • Wood Handbook: Wood as an Engineering Material, FPL-GTR-282USDA Forest Products Laboratory