Exterior

Fence Calculator

Enter the total fence length and height. You'll get a full material list: posts, rails, boards or pickets, concrete and gravel for every post hole.

  • Tested formulas
  • Feet or metric
  • Printable shopping list

1 Your measurements

Type feet and inches the way you'd write them, like 12' 6" or 30 3/8. Decimals work too.

ft
ft
ft
8 ft is standard (matches 8 ft rails). Use 6 ft in high-wind areas.
in
A nominal 1×6 is 5½" wide.
ft

2 What to buy

Updates as you type
Posts
14
8 ft 4×4s, 24" in the ground
Fence boards
220
5.5" wide pickets/boards
Rails
36
3 per section × 12 sections
Fenced length (minus gates)96 ft
Sections12
Post holes14 holes, 10" wide × 30" deep
Concrete24 × 80 lb bags (or 38 × 50 lb fast-setting)
Gravel under posts8 × 0.5 cu ft bags
Fasteners≈ 1,320 exterior screws or ring-shank nails
Gates1 (hinges, latch and a diagonal brace for each)

Call 811 (in the US) a few days before digging so buried utility lines get marked. It's free. Also check your property line and any HOA or permit rules on fence height.

Shopping list

Quick answer

A 100 ft privacy fence, 6 ft tall, with one 4 ft gate and posts 8 ft apart needs 14 posts, 36 rails, 220 boards 5½ inches wide and 24 bags of 80 lb concrete.

Materials for common fence lengths

LengthPostsRailsBoardsConcrete (80 lb)
50 ft81810614 bags
75 ft112716319 bags
100 ft143622024 bags
150 ft215733536 bags
200 ft277545046 bags
300 ft3911167966 bags

6 ft privacy fence, posts 8 ft apart, 5½" boards, one 4 ft gate. Use the calculator above for your exact size.

How the fence calculation works

  • Sections = fence length (minus gates) ÷ post spacing, rounded up.
  • Posts = sections + 1, plus one extra for each gate, since every gate needs a post on both sides.
  • Rails: 2 per section for fences up to 5 ft, 3 for taller fences, to stop the boards warping.
  • Boards = fenced length ÷ (board width + gap), plus 5% for splits and culls.

Worked example: 100 ft privacy fence, 6 ft tall, one 4 ft gate

  • 96 ft of fence ÷ 8 ft = 12 sections → 14 posts (8 ft long, 24" in the ground)
  • 3 rails × 12 sections = 36 rails
  • 1,152" ÷ 5.5" + 5% = 220 boards
  • Concrete: 24 × 80 lb bags for 14 holes, 10" × 30"

Before you dig

  1. Find your property line. Use your survey or plat. Many people set fences 6–12" inside the line to avoid disputes.
  2. Check permits and HOA rules. Many towns limit backyard fences to 6 ft and front-yard fences to 3–4 ft.
  3. Call 811 at least a few days before digging. Utility locating is free in the US.

Setting posts that stay straight

Set the corner and end posts first, run a string line between them, then set line posts to the string. Put 6" of gravel under each post for drainage. Slope the top of the concrete away from the post so water runs off instead of pooling against the wood. Use posts rated for ground contact (UC4A or higher). Standard "above ground" lumber rots fast in soil.

Frequently asked questions

How many fence posts do I need for 100 feet?

With 8 ft spacing, a straight 100 ft run needs 13 sections and 14 posts. Each gate adds one more post. Corners don't add extra posts on a single run, but each separate run needs its own end posts.

How many pickets do I need for an 8 ft section?

For a privacy fence with 5½" boards butted together, about 18 boards (96" ÷ 5.5"). For a picket fence with 2½" gaps, 12 pickets.

How deep should fence posts be?

About one-third of the post length, with at least 24" in the ground, and below the frost line in cold climates. A 6 ft fence usually uses 8 ft posts set 24" deep, with 6" of gravel below.

Last reviewed 2026-10-21. See how we calculate for our sources and assumptions.

Add this calculator to your website

Free for blogs, contractors and DIY sites. Paste this where you want the calculator to appear. It resizes itself and works on phones.

Please keep the credit line. The calculator updates automatically when we improve it. Preview the widget.