Fence Calculator

Free, no sign-upYour numbers stay in your browserUpdates as you type

How to calculate fence materials

Start with the total length of the fence line and the spacing between posts. Most wood fences use posts every 8 feet. Chain link is often set at up to 10 feet.

  • Sections = fence length ÷ post spacing, rounded up.
  • Posts = sections + 1, plus extra posts for each gate.
  • Rails = sections × rails per section (2 for fences up to 4 feet, 3 for taller fences).
  • Pickets = fence length in inches ÷ (picket width + gap), rounded up.

Worked example

For 150 feet of 6-foot privacy fence with posts every 8 feet: 150 ÷ 8 = 18.75, so 19 sections and 20 posts. Three rails per section gives 57 rails. With 5.5 inch pickets and no gap, 1,800 inches ÷ 5.5 = 328 pickets.

Post depth and concrete

A common rule is to bury about one third of the fence’s above-ground height, and at least 2 feet, and to go below the local frost line. A 6-foot fence normally uses 8-foot posts set about 2 feet deep. Allow one to two 50-pound bags of fast-setting concrete per post.

How to use this calculator

Enter the fence length and the post spacing, then the rails per section, the picket width and the gap between pickets. The fence calculator returns the posts, sections, rails and pickets to buy, plus concrete bags at 2 per post. Add an installed cost per foot to see an estimated cost. Measure the fence line on the ground with a tape or measuring wheel rather than reading it off a plan, and measure each side of the yard separately.

What the result means

The counts are the minimum needed to build the length you entered. Every figure is rounded up, because you cannot buy part of a post or picket. The cost is the fence length multiplied by the installed cost per foot you enter, so it covers whatever that rate includes. Gates, hardware, fasteners and stain are extra unless your rate allows for them.

More examples

A 4-foot picket fence with gaps

For 100 feet with posts every 8 feet: 100 ÷ 8 = 12.5, so 13 sections and 14 posts. A 4-foot fence uses 2 rails per section, so 26 rails. With 3.5 inch pickets and a 2.5 inch gap, each picket takes up 6 inches. 1,200 inches ÷ 6 = 200 pickets.

Chain link at 10-foot spacing

For 200 feet with posts every 10 feet: 200 ÷ 10 = 20 sections and 21 posts.

A 6-foot privacy fence at different lengths

This table uses 8-foot post spacing, three rails per section and 5.5 inch pickets with no gap.

Fence length Sections Posts Rails Pickets
50 ft 7 8 21 110
100 ft 13 14 39 219
150 ft 19 20 57 328
200 ft 25 26 75 437

Concrete for the posts

At one to two 50-pound bags per post, the 20 posts in the worked example need 20 to 40 bags.

What changes the result

  • Fence length. Every count rises with length.
  • Post spacing. Wider spacing means fewer posts and rails. At 10-foot spacing, 150 feet needs 15 sections and 16 posts instead of 19 and 20.
  • Picket width and gap. Wider pickets or a wider gap reduce the picket count. A gap also changes how private the fence is.
  • Fence height. Taller fences need a third rail and longer posts.
  • Gates. Each gate adds posts and hardware.

Common mistakes

  • Forgetting the extra post. A run of fence always has one more post than it has sections.
  • Rounding sections down, which leaves the last stretch unsupported.
  • Buying posts the same length as the fence height. Part of each post is underground.
  • Building before confirming the property line.
  • Digging without calling 811 first.

Related calculators

For the post footings, the concrete calculator works out the volume of a round hole and the bags it takes. If you are covering a known area with boards, square feet to linear feet converts it to running length. To see how a fence fits into yearly upkeep, try the home maintenance cost calculator. All results are estimates, so check quantities against your layout before you buy.

Frequently asked questions

How many fence posts do I need for 100 feet?

At 8-foot spacing, 100 feet needs 13 sections and 14 posts.

Do I need a permit to build a fence?

Many cities and HOAs limit fence height and placement. Check local rules, and confirm your property line before you build.

How do I find underground lines before digging?

Call 811 a few days before digging. Utility lines are marked for free.

How many pickets do I need per 8-foot section?

An 8-foot section is 96 inches. With 5.5 inch pickets and no gap, 96 ÷ 5.5 = 17.5, so 18 pickets.

How many posts do I need for 200 feet of fence?

At 8-foot spacing, 200 feet needs 25 sections and 26 posts, before adding gate posts.

How do I measure the length of a fence?

Measure each side you plan to fence and add them together. Fencing all four sides of a yard 50 feet by 100 feet takes 300 feet.

Should I buy extra pickets?

A few spares are worth having. Some boards arrive split or warped, and matching pickets can be hard to find later.