Skip to main content

Fence Calculator

Count fence posts, rails, and pickets from length and spacing

Last updated: 10/14/2026

Enter the run of fence, how far apart the posts are, how many rails each bay gets, and the picket width and gap. The counts are the pieces in the layout, before cutting waste. For board feet of lumber, use the board foot calculator.

Calculator Inputs

ft
ft

Center to center. 8 ft is a common bay.

in
in

Results

Enter values above to see your results

How to use this calculator

  1. Measure the fence length in feet.
  2. Enter post spacing from center to center, and how many horizontal rails each section uses.
  3. Enter the picket width and the gap. A 5.5 inch picket with a 0.5 inch gap repeats every 6 inches.

How the calculation works

The number of sections is the length divided by the spacing, rounded up when the last bay would otherwise stick out. Posts are one more than the number of sections, because both ends need a post. Rails are sections × rails per section.

Pickets cover the full length. The count is the length in inches divided by the picket width plus the gap, rounded up. A 96 foot run at 8 foot spacing is 12 sections, 13 posts, and 24 rails if each section has 2 rails.

Before waste

A cut post, a gate, or a corner that needs a heavier post is extra. This count does not add a spare. Order extras yourself once the layout is right.

Worked example

96 ft fence, posts every 8 ft, two rails, 5.5 in pickets with a 0.5 in gap

Sections:96 ÷ 8= 12 sections
Posts:12 + 1= 13 posts
Rails:12 × 2= 24 rails
Pickets:(96 × 12) ÷ (5.5 + 0.5)= 192 pickets

Tips & Best Practices

  • •Spacing is center to center, not the clear gap between posts.
  • •If the length does not divide evenly, the last bay is shorter and the post count still includes both ends.

Frequently Asked Questions

How many fence posts do I need?

Divide the length by the post spacing to get the sections, then add one post. A 96 foot fence with posts every 8 feet needs 13 posts.

How many pickets are in a fence?

Divide the length in inches by the picket width plus the gap. A 6 inch repeat on a 96 foot fence is 192 pickets.

Does this include a gate?

No. A gate replaces one bay of pickets and needs its own frame. Subtract that bay yourself or order the gate separately.