Fence Calculator

Count the posts, rails and pickets for a wood fence from its length, post spacing and picket size, and estimate the material cost.

8 ft on center is the most common.
2 for fences up to about 4 ft; 3 for 6 ft privacy fences.
A nominal 1×6 picket is 5.5 in wide.
Each gate adds one post.

Result

Posts—posts
Rails—rails
Pickets—pickets
Sections—sections

A wood fence is a kit of three parts: posts set in the ground, horizontal rails between them, and pickets (or boards) nailed to the rails. This calculator counts each one from the length of the fence, the spacing between posts and the width of your pickets — the numbers you need for a lumber list or a supplier quote.

How to use the fence calculator

  1. Measure the fence line. For an L- or U-shaped fence, either add the runs together or calculate each straight run separately.
  2. Choose the post spacing — usually 8 ft, matching standard 8 ft rails.
  3. Choose rails per section: two for short fences, three for a 6 ft privacy fence.
  4. Enter the picket width and gap. Privacy fences butt pickets together; picket fences leave a gap about the width of a picket or less.
  5. Count your gates. Each gate needs an extra post for the latch side.

Fence material formulas

Sections = ⌈ length ÷ post spacing ⌉ Posts = sections + 1 + gates spacing 4 sections = 5 posts post pickets + gap rails: 2 per section calcmaple.com
Each section needs rails and pickets; a run with N sections always needs N + 1 posts, plus extra for gates.
Sections = ⌈ fence length ÷ post spacing ⌉
Posts = sections + 1 + gates
Rails = sections × rails per section
Pickets = ⌈ fence length ÷ (picket width + gap) ⌉

Length and picket width must be in the same unit — the calculator converts feet to inches for you.

Worked example: a 100 ft privacy fence

  1. Sections: 100 ÷ 8 = 12.5 → 13 sections
  2. Posts: 13 + 1 = 14 posts
  3. Rails: 13 × 3 = 39 rails
  4. Pickets: 1,200 in ÷ 5.5 in = 218.2 → 219 pickets

Buy a few extra pickets for splits and to replace any warped boards — around 5% is common.

Materials by fence length

8 ft post spacing, 5.5 in pickets with no gap, no gates.

Fence lengthPostsRails (2 per section)Rails (3 per section)Pickets
50 ft81421110
100 ft142639219
150 ft203857328
200 ft265075437

Planning tips

  • Call before you dig. In the US, dial 811 a few days before digging post holes so buried utilities can be marked.
  • Check property lines and rules. Many towns and HOAs limit fence height and require setbacks or permits.
  • Use ground-contact lumber for posts. Posts set in soil or concrete need pressure-treated wood rated for ground contact.
  • Last section is often short. If the length isn't a multiple of the spacing, the final section is shorter — you still need its post and rails.

Privacy fence vs. picket fence

A privacy fence is usually 6 ft tall with pickets butted edge to edge, three rails per section and no gaps, so the picket count is simply the fence length divided by the picket width. A decorative picket fence is usually 3–4 ft tall with two rails and a gap between pickets — a common choice is a gap a little narrower than the picket. A shadowbox fence alternates pickets on both sides of the rails; count it as two layers with a gap equal to the picket width on each side.

Setting posts in concrete? The Concrete Calculator counts bags per hole. Building a deck too? See the Deck Calculator.

Frequently asked questions

How many fence posts do I need?

Divide the fence length by the post spacing, round up to whole sections, then add one. A 100 ft fence with posts every 8 ft has 13 sections and 14 posts. Add posts for corners on different runs and for each gate.

How many pickets for a 100 ft fence?

With 5.5 in wide pickets butted together, 100 ft (1,200 in) needs 1,200 ÷ 5.5 = 218.2, so 219 pickets. Leaving a gap between pickets reduces the count.

What is the standard spacing for fence posts?

8 ft on center is the most common for wood fences, because rails come in 8 ft lengths. Windy sites or heavy fences may use 6 ft spacing.

How deep should fence posts be?

A common rule is to bury about one third of the post's length, and in cold climates to go below the frost line. Local code may set a minimum. The Concrete Calculator estimates concrete for post holes.

Does this work for corners?

Run the calculator once per straight run and add the results, then subtract one post for each corner shared by two runs.

Related calculators

Last updated October 16, 2026. Found a problem with this calculator? Tell us.