Fence Calculator

Enter the length of your fence, how tall it will be and whether you are using pickets or ready-made panels. You get the posts, rails, boards and concrete to buy.

Your project

gates

Results

Posts
14 posts
Includes line, end and gate posts. Add extra for corners.
Post length neededFence height plus the buried depth
8.0 ft
Sections between posts
12 sections
Rails (one 2×4 per rail per section)
36 boards
Pickets
210 pickets

Concrete for post holes

80 lb bags (4×4 posts in 10 in holes)Includes 10% waste, no gravel base
24 bags
Hole depth used
24 in
  • Assumes a straight run. Each corner needs a post but no extra section, so add 1 post per corner. Gate hardware and fasteners are not counted.

How this calculator works

First we subtract the gates from the run. The remainder is divided by your post spacing, rounded up, to get the number of sections. A straight fence needs one more post than sections, plus an extra post for each gate. Rails are counted per section (two for a 4 ft fence, three for taller ones), and boards are counted across the run using the width of each picket plus any gap.

sections = ⌈(length − gates × gate width) ÷ spacing⌉ posts = sections + gates + 1

Worked example: 100 ft of 6 ft fence with one 4 ft gate and 8 ft spacing: the run is 96 ft, so 12 sections and 14 posts. With 1×6 pickets set tight (5.5 in), you need 96 × 12 ÷ 5.5 = 210 pickets, plus 36 rails. At 24 in deep, the post holes take about 24 bags of 80 lb concrete.

Tips before you buy

  • Use pressure-treated posts rated for ground contact. Pickets and rails can be cedar, redwood or treated pine.
  • Plan on burying about one third of the fence height, with a minimum of 2 ft: a 6 ft fence takes 8 ft posts set about 2 ft deep, and an 8 ft fence takes 11 to 12 ft posts set about 3 ft deep. Go deeper where soil freezes. Check local code, since many places require a permit or set maximum fence heights.
  • Check where your property line is before you dig, and call 811 (in the US) to have buried utilities marked.
  • Buy a few extra pickets: some will be bowed or split, and you will want spares for repairs.

Quick answers by size

Tools & materials for this project

As an Amazon Associate we earn from qualifying purchases. These links do not change what you pay.

Frequently asked questions

How far apart should fence posts be?

Eight feet on center is standard for wood fences, and six feet suits heavy privacy fences or windy sites. Prefab panels dictate the spacing (usually 6 or 8 ft).

How many pickets do I need per foot?

Divide 12 by the picket width plus gap. A 1×6 (5.5 in) picket with no gap needs 2.2 pickets per foot of fence.

How many rails does a fence need?

Two rails for fences up to about 4 ft, and three rails for 5 to 6 ft privacy fences. Eight-foot fences may need four.

Related calculators & guides

Estimates only. Results assume standard materials and simple shapes. Supplier products vary, and the final call on quantity, structure and safety is yours. Check your local code and your supplier's guidance before ordering.