Free calculator

Fence calculator: how many posts, rails and pickets

Enter the length of the fence, its height and any gates. You get posts, rails and pickets for a wood picket or privacy fence, how deep to set the posts, and the concrete for the holes.

  • Posts, rails and pickets
  • Gates taken out
  • Links to concrete
Gloved hands fitting a new cedar picket into a gap in a weathered fence, with the broken picket and a drill on the grass
Fence height

Assumes wood pickets on 2x4 rails between posts: 2 rails for a 4 ft fence, 3 for 6 ft. Post depth uses the common rule of a third of the fence height, at least 24 inches; your local code or frost line may need more.

Do the job

How it works

Posts = fence length ÷ post spacing, rounded up, plus 1 for the end, plus 1 for each gate.

Rails = sections × rails per section (2 for a 4 ft fence, 3 for 6 ft).

Pickets = fence length without the gates, in inches, ÷ (picket width + gap), plus about 5% spare.

Post depth = a third of the fence height, at least 24 inches.

About this tool

Who it's for

For anyone pricing a new wood fence or a long repair.

Example

You enter100 ft of 6 ft privacy fence, 8 ft sections, no gates

You get14 posts, 39 rails and 230 pickets.

What's different

  • Counts posts, rails and pickets together.
  • Takes gate openings out of the picket count.
  • Hands the post holes to the concrete calculator.

Gotchas and tips

  • Call 811 a few days before you dig, so buried lines get marked.
  • Check property lines and any HOA or city fence rules first.
  • Use ground-contact rated posts.

Privacy: Runs entirely in your browser. Nothing you type is sent to us.

Built and maintained by the GrabTheHammer team. Updated November 2026. Spot a problem? Tell us.

Materials for common fence lengths

Wood fence, posts every 8 ft, 5.5 inch pickets set tight, no gates, with about 5% spare pickets.

Fence materials by length
FencePostsRailsPickets
50 ft, 4 ft high814116
50 ft, 6 ft high821116
100 ft, 4 ft high1426230
100 ft, 6 ft high1439230
150 ft, 4 ft high2038345
150 ft, 6 ft high2057345
200 ft, 4 ft high2650459
200 ft, 6 ft high2675459

Before you build

  • Call 811 a few days before digging so buried lines get marked.
  • Find your property line and check city and HOA rules on height and which side faces out.
  • Run a string line between the end posts so the rest line up.
  • Set posts first and let the concrete cure before hanging rails and gates.

Fence questions

How far apart should fence posts be?

Eight feet is the most common spacing, because rails come in 8 ft lengths. Some fences use 6 ft for extra strength in windy spots.

How deep do fence posts go?

A common rule is a third of the above-ground height, at least 2 feet. In cold areas, go below the frost line; your local building department can tell you how deep that is.

Do I need a gap between pickets?

For a privacy fence, set them tight or close to it. Wood shrinks as it dries, so gaps may open up a little over time. For a picket fence, gaps of 2 to 3 inches are common.

Which side of the fence faces out?

Many cities and HOAs require the finished side, without the posts and rails showing, to face the neighbor or street. Check your local rules.

How much should I leave for a gate?

Add the gate's width plus room for hinges and the latch, usually about half an inch per side. Use a sturdy post on each side of the gate.

What wood lasts longest?

Cedar and redwood resist rot naturally; pressure-treated pine costs less. Use ground-contact rated lumber for posts whatever the pickets are.

Related tools

See all tools →