Fence Calculator

Use this fence calculator to estimate posts, rails, pickets, concrete and screws for a wood fence. Measure the run and include the width of any gates so the calculator can subtract those openings.

Your shopping list

14Posts
36Rails
231Pickets
  • Fence sections12
  • Concrete bags (60 lb)2 bags per post28
  • Screws or nails2 per picket on each rail1,386
  • Gates1

Pickets include 10% extra. Rails and posts are exact counts.

How to use the Fence Calculator

  1. Measure the total length of the fence line. Add up every side if the fence turns corners.
  2. Pick how far apart the posts will be. Most people use 8 feet.
  3. Choose the rails per section, and enter your picket width and gap. Use a gap of 0 for a solid privacy fence.
  4. Add your gates and their width. Leave the extra at 10% if you are unsure.
  5. Read the shopping list, then tap “Copy my shopping list” and take it to the store.

The math behind it

The fence calculator rounds up to whole sections and pickets so the list is ready to take to the store.

Fence run = total length – (gates x gate width)
Sections = run / post spacing, rounded up
Posts = sections + 1 + one extra post for each gate
Rails = sections x rails per section
Pickets = run (in inches) / (picket width + gap), plus extra

A worked example

In this fence calculator example, two gates are subtracted from the total run. Use the same approach for your layout and check gate hardware separately.

What we typed in

  • Total fence length: 150 ft
  • Distance between posts, center to center: 8 ft
  • Rails per section: 3 rails (6 ft privacy fence)
  • Picket width: 5.5 in
  • Gap between pickets: 0.5 in
  • Number of gates: 2
  • Width of one gate: 4 ft
  • Extra for mistakes and bad boards: 10 %

What we got

  • Posts: 21
  • Rails: 54
  • Pickets: 313
  • Fence sections: 18
  • Concrete bags (60 lb): 42
  • Screws or nails: 1,878
  • Gates: 2

For a related part of your project, use the Deck Footing Calculator.

Tips from the job site

  • Buy posts 2 ft longer than the fence height, because a third of each post goes in the ground.
  • Lay out the pickets on the ground first if you want an even, good-looking gap.
  • Calling 811 before you dig is free, and it keeps you away from buried lines.

Common questions

Before ordering, mark each corner and gate on your sketch. Check post locations with the Fence Post Calculator, then compare your actual picket width with the size on the supplier’s label. In the US, arrange a utility locate before digging. See 811 utility marking guidance.

How many posts do I need for a 100 ft fence?

With 8 ft spacing and no gates you need 14 posts. Every gate adds one more post.

How many rails go in each section?

Use 2 rails for fences under 5 feet and 3 rails for a 6 foot fence. Use 4 if the fence is very tall or will take heavy wind.

Does this work for vinyl or chain link?

It is made for wood fences. Use our Vinyl and Chain Link calculators for those.

Is the result exact?

It is a careful estimate. Hills, odd angles and cut-offs can change it, so check with your supplier before you buy.

All Fence Calculators

Last checked: (worked example and recalculation).