Clearly › Free calculators › Fence

Fence Calculator

How much fence material do you need? Enter your fence length, picket width and post spacing — get pickets, posts and rails, instantly.

Fence calculator

Pickets needed
Posts
Rails
Sections

Post spacing of 6–8 ft is typical. Closer spacing makes a stiffer fence on uneven ground or in windy areas.

Fencing the whole property?

The Clearly app saves every run to one project, totals pickets, posts and rails, and works offline at the yard — plus 12 more calculators.

Get the app

How to calculate fence materials

A board fence breaks into three counts: pickets, posts and rails. Pickets come from the total length divided by how wide each picket plus its gap is; posts and rails come from how many sections you split the run into.

  • Pickets = (length × 12) ÷ (picket width + gap), rounded up
  • Sections = length ÷ post spacing, rounded up
  • Posts = sections + 1
  • Rails = sections × rails per section

The "+1" on posts accounts for the fence having a post at both ends — five sections need six posts, not five.

A fence is only as straight as its posts

Set your fence posts too shallow and the first hard freeze heaves them up and leans the whole fence. Set each post about a third of its length deep and below your local frost line, in concrete — that's what keeps a fence plumb and tight for years.

Wrong: a shallow post heaves and leans. Right: a deep post set in concrete below the frost line stays plumb.

Get your post count and spacing right here (6 to 8 feet on center is typical), then dig deep — it's the part you can't fix later.

Pro move: crown the concrete slightly above grade and slope it away from the post so water sheds instead of pooling at the wood.

How far apart should fence posts be?

Fence typeTypical post spacing
Wood privacy fence6–8 ft
Picket fence6–8 ft
Chain-link8–10 ft
Heavy / windy exposure6 ft

Eight feet matches common rail and panel lengths, which keeps waste down. Tighten the spacing to six feet on slopes or where wind load is a concern.

How many rails does a fence need?

Most fences use two rails per section — one near the top, one near the bottom. Tall privacy fences, six feet and up, often add a third middle rail to keep the pickets from bowing. The calculator lets you set the count per section.

Fence calculator FAQ

Why is it posts = sections + 1?
Every section spans between two posts, and adjacent sections share a post — except the two ends. So a straight run always has one more post than it has sections.
How deep should posts be set?
Bury at least a third of the post length, below the frost line in cold climates. A 6-ft fence usually means 8-ft posts set about 2 feet in concrete.
Should I include a gate?
Subtract the gate opening from the fence length before figuring pickets, and count gate posts separately — they take heavier hardware and a tighter set.

Get the Clearly app free when it launches

Drop your email and we'll send a free DIY material cheat-sheet, plus a heads-up the day the app goes live. No spam, unsubscribe anytime. The calculators here stay free either way.

Running more than one number? The Clearly app saves every calc into one project, builds your order list, and works offline.
Get the app