Fence calculator

How many posts, rails and pickets you need to build a wood picket or privacy fence.

Updated

Fence size
Posts and pickets

Optional prices

How to measure for a fence

Walk the line where the fence will go and measure its total length in feet, including the openings for gates. Enter how many gates you plan and how wide each one is; the calculator takes the gates out of the fence length and adds a post for each one.

Before you buy anything, confirm where your property line is, check whether your city or homeowners association requires a permit or limits fence height, and call 811 a few days before you dig so buried utility lines can be marked for free.

How the calculation works

Fence length = total length − (gates × gate width)

Sections = fence length ÷ post spacing, rounded up

Posts = sections + 1 + one per gate

Rails = sections × rails per section (2 for fences up to 4 ft, 3 for taller fences)

Pickets = fence length × 12 ÷ (picket width + gap), rounded up

In the example above, a 100 ft fence with one 4 ft gate has 96 feet of fencing. With posts every 8 feet that is 12 sections, which need 14 posts: 13 for the sections plus one extra for the gate. A 6 ft fence uses 3 rails per section, so 36 rails. Pickets 5.5 inches wide with no gap need 210 pickets to cover 96 feet.

Posts: spacing and depth

  • Spacing. Wood fence posts are usually set 6 to 8 feet apart. Closer spacing makes a stronger fence, which helps in windy areas and for tall privacy fences.
  • Depth. A common rule is to bury about a third of the post's length, so a 6 ft fence typically uses 8 ft posts set at least 2 feet deep. In cold climates, posts may need to go below the frost line; your local building department can tell you how deep.
  • Concrete. Holes are often dug about three times as wide as the post. Use our concrete calculator with the round hole option to work out how many bags you need.

Corners and slopes

The calculator assumes posts at a regular spacing along the fence. Each corner where the fence changes direction needs a post exactly at the corner, which can add an extra post if the corner does not land on your spacing. On sloped ground, fences are either stepped or follow the slope, and stepped fences can need slightly more material. Add a few extra pickets and a post or two for these situations.

Frequently asked questions

How many fence posts do I need for 100 feet?

With posts every 8 feet and no gates, a 100 ft fence has 13 sections and needs 14 posts. With posts every 6 feet it needs 18 posts.

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

About 219 pickets that are 5.5 inches wide with no gap, or 343 pickets that are 3.5 inches wide with no gap. Leaving a gap between pickets reduces the number.

How many rails does a fence need?

Two rails per section is usual for fences up to about 4 feet tall. Taller fences, including most 6 ft privacy fences, use three rails per section to keep the pickets from warping.

Does this work for vinyl or chain link fences?

The post count works for any fence. Vinyl fences are sold in pre-built panels, so count panels instead of rails and pickets, and chain link is sold by the roll, so use the fence length directly.

This calculator gives an estimate for buying materials. Check property lines, permits and local rules before building a fence.