Fence calculator

Enter the length and height of a wood fence. You get how many posts, rails, pickets and bags of concrete to buy, how deep to set the posts, and what it costs to build yourself or hire out.

Style

For a wood fence: 4×4 posts, 2×4 rails and vertical boards. Chain link and vinyl are not covered.

Front yards are often limited to 3–4 ft, backyards to 6–7 ft. 8 ft spacing is standard; 6 ft is stiffer in wind.

A 1×6 board is 5½ in wide, a 1×4 is 3½ in. Picket gaps are usually 2–4 in.

in

A third to half of the height above ground, at least 24 in. End, corner and gate posts go 6 in deeper.

Holes about 3 times the post width: 10–12 in for a 4×4. Gravel drains water away from the bottom of the post.

Your prices

Filled in with typical US prices for pressure-treated pine. Posts and pickets of other lengths are priced by the foot from these.

Fence elevation from the rail side, with the posts cut away below ground into their concrete footingsPicketsRailsPostConcreteGravel6 ft7 ft 4 in24 in6 in10 in
The fence from the rail side, two sections to scale. Below ground the posts are cut away to show the concrete and gravel. The end post on the left is set 6 in deeper.

Materials if you build it yourself

$1,991

Lumber, concrete and gravel at your prices, about $13 per ft. Screws and gate hardware extra.

Hiring a contractor

$4,630–$8,600

At $30 to $55 per ft installed plus $250 to $570 per gate, typical 2026 prices

22 posts

20 sections about 7 ft 4 in apart on center. Dig 10 in holes, 30 in deep for line posts and 36 in for end, corner and gate posts, with 6 in of gravel in each.

What to buy
Line posts, 4×4×8Set 24 in deep16$224
End, corner and gate posts, 4×4×10Set 30 in deep: 2 end, 2 corner, 2 gate6$105
Rails, 2×4×83 per section, plus 4 for the gate64$384
Pickets, 6 ft × 5.5 inButted tight, gates included328$984
Concrete mix, 80 lb bagsor 58 bags of 50 lb fast-setting mix37 bags$222
Gravel, 0.5 cu ft bags6 in under each post12 bags$72

For more strength in wind or loose soil, many guides go to half the height above ground: 36 in for this fence. In cold climates, set the bottom of each post below the frost line.

Fast-setting mix goes into the hole dry, then about a gallon of water per bag. It sets in 20 to 40 minutes; wait about 4 hours before putting weight on the post.

Call 811 a few business days before you dig. It's free, and the utilities mark their buried lines.

How far apart should fence posts be?

Set wood fence posts 6 to 8 feet apart, measured center to center. 8 feet is standard: it fits 8-foot rail boards, and rails sag over longer spans. 6 feet makes a tall privacy fence stiffer in wind. Split each straight run into equal sections no longer than your spacing: a 50-foot run at up to 8 feet is 7 sections of 7 ft 2 in, with 8 posts.

Straight runPosts at 8 ftPosts at 6 ft
50 ft810
100 ft1418
150 ft2026
200 ft2635

Each corner and each gate starts a new run, so each one adds a post. Rails depend on the height: 2 per section under 5 feet, 3 from 5 to 7 feet, and 4 on an 8-foot fence. Set the top and bottom rails 4 inches from the ends of the pickets, and keep the pickets 2 inches off the ground so they don't sit in wet soil.

How deep should fence posts be?

Bury a third to a half of the post's height above ground, and never less than 24 inches. End, corner and gate posts carry more load, so set them 6 inches deeper. Dig each hole 6 inches deeper again for gravel. In cold climates, the bottom of the post should be below the frost line, or frost can push the posts up. Your building department knows the local frost depth and any rules for post holes.

Fence heightPost depthLine postsEnd, corner, gate posts
3 ft24 in6 ft6 ft
4 ft24 in6 ft8 ft
5 ft24–30 in8 ft8 ft
6 ft24–36 in8 ft10 ft
8 ft36–48 in12 ft12 ft

Post lengths use the shallower depth, rounded up to a length you can buy: 6, 8, 10 or 12 feet. For the deeper setting, buy the next length up.

How much concrete per fence post?

Dig the hole about 3 times as wide as the post: 10 to 12 inches for a 4×4. Concrete fills the hole around the post from the gravel up to the ground. An 80 lb bag of regular concrete mix makes 0.60 cubic feet, and a 50 lb bag of fast-setting mix makes 0.375 cubic feet. Fast-setting mix goes into the hole dry and is soaked with about a gallon of water per bag. It sets in 20 to 40 minutes. In holes deeper than 2.5 feet, add it in two lifts.

Hole, width × concrete depthCu ft80 lb bags50 lb fast-setting
10 × 24 in0.921.52.5
10 × 30 in1.151.93.1
10 × 36 in1.382.33.7
12 × 24 in1.402.33.7
12 × 30 in1.752.94.7
12 × 36 in2.103.55.6

These are per 4×4 post. Part of a bag goes into the next hole, so the calculator rounds up the total, not each hole.

How many pickets do I need?

Divide the fence length in inches by the picket width plus the gap, and round up. For a privacy fence the boards butt together. Gates are covered with the same boards, so count the full length with the gates.

BoardsPer 8 ft sectionPer 100 ft
5½ in boards, butted (privacy)18219
3½ in boards, butted28343
3½ in pickets, 2½ in gaps16200
3½ in pickets, 3½ in gaps14172

Keep gaps under 4 inches where small children play. Buy a few spare boards, since some come split or warped.

What a wood fence costs

Hired out, a 6-foot wood privacy fence typically runs $30 to $55 per linear foot installed, and a 4-foot picket fence $15 to $35 (2026 prices). A gate adds $250 to $570, and a double or drive gate $480 to $1,010. Most of that is labor. Built yourself, the materials at the calculator's example prices come to about $13 per foot for a 6-foot privacy fence and about $9 for a 4-foot picket fence.

LengthMaterials, DIYHired out
50 ft$803$1,630–$3,100
100 ft$1,394$3,130–$5,850
150 ft$1,991$4,630–$8,600
200 ft$2,588$6,130–$11,350

A 6-foot privacy fence with two corners and one 4-foot gate. The price goes up for:

  • cedar or other wood that costs more than pressure-treated pine;
  • a taller fence or a board-on-board style;
  • rocky ground, roots or a slope;
  • tearing out and hauling away an old fence;
  • a short run, where the contractor's minimum charge applies.

Height limits, permits and 811

Your local zoning rules set how tall a fence can be. Many cities allow 3 to 4 feet in a front yard and 6 to 7 feet at the side and back, with tighter limits near corners and driveways so drivers can see. The model residential code (IRC) needs no building permit for a fence up to 7 feet, but zoning and homeowners association (HOA) rules still apply, and some cities ask for a permit or zoning review for any fence. Check with your city and HOA before you buy materials. Some also require the finished side to face out.

Before you dig, call 811 or file a request online a few business days ahead. It's free, and the utilities mark buried gas, power and water lines. Post holes go deeper than most yard work: 3 feet is a normal hole for a corner post.

How the calculator works

  1. Fence length: the whole line, minus the gate openings.
  2. Sections: fence length ÷ post spacing, plus half a section for each corner and gate, rounded up. Each straight run between ends, corners and gates rounds up to whole sections on its own, and the half section covers that.
  3. Posts: each run has one more post than sections, and corner posts are shared. End, corner and gate posts go 6 in deeper. Post length = height + depth, rounded up to 6, 8, 10, 12, 14 or 16 ft.
  4. Rails: 2 per section under 5 ft, 3 from 5 to 7 ft, 4 at 8 ft, one 8 ft 2×4 each. Each gate leaf gets the same plus one for the brace. A gate wider than 5 ft counts as a double gate.
  5. Pickets: length in inches ÷ (picket width + gap), rounded up. Gates are covered too.
  6. Concrete per post: (hole area − the 3.5 × 3.5 in post) × post depth ÷ 1,728. Bags: total ÷ 0.60 cu ft per 80 lb bag, or ÷ 0.375 per 50 lb bag of fast-setting mix, rounded up.
  7. Gravel: hole area × gravel depth for each post, ÷ 0.5 cu ft per bag.
  8. Materials: at your prices, with other post and picket lengths priced by the foot from the 8 ft post and the 6 ft picket. Contractor: length without gates × $30 to $55 per ft for a 6 ft privacy fence or $15 to $35 for a 4 ft picket fence, in proportion to the height, plus each gate.

Common questions

How many bags of concrete do I need per fence post?

A 4×4 post set 2 feet deep in a 10-inch hole takes about 0.92 cubic feet of concrete. That is 1.5 bags of 80 lb concrete mix or 2.5 bags of 50 lb fast-setting mix. In a 12-inch hole it takes 2.3 bags of 80 lb. An end, corner or gate post set 6 inches deeper takes about 1.9 bags of 80 lb. Leftover mix from one hole goes into the next, so round up the total for the whole fence, not each post.

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

With 5½-inch privacy boards butted tight, 100 feet of fence takes 219 pickets. A picket fence with 3½-inch pickets and 2½-inch gaps takes 200. Add the width of any gates, since gates are covered with the same boards. Buy a few spares, because some boards come split or warped.

How much does a 150-foot wood fence cost?

A 6-foot privacy fence 150 feet long, with two corners and one 4-foot gate, takes about $1,991 in materials at the example prices in the calculator, or about $13 per foot, if you build it yourself. Hired out, it typically costs $4,630 to $8,600 at 2026 prices. Labor is most of a contractor's price. Screws, nails, gate hardware and removing an old fence are extra.

How deep should fence posts be for a 6-foot fence?

At least 2 feet, a third of the height above ground. Many guides go to 3 feet, half the height, for more strength in wind or loose soil. That is why 8-foot posts are standard for a 6-foot fence. Set end, corner and gate posts 6 inches deeper, which takes 10-foot posts, and dig 6 inches more for gravel. In cold climates the bottom of each post should be below the frost line, so ask your building department for the local depth.

Should fence posts sit on gravel?

Yes. Put about 6 inches of gravel or crushed stone in the bottom of the hole and stand the post on it, so water drains away from the bottom of the post. Then fill around the post with concrete. Either bring the concrete just above the ground and slope it away from the post so water runs off, or stop it 3 to 4 inches below the top and fill the rest with soil, as Quikrete suggests for fast-setting mix.

Do I need to call 811 before digging fence post holes?

Yes. Call 811 or file a request online a few business days before you dig. It's free, and the utility companies mark their buried lines with paint or flags. Fence building is one of the projects 811 names. A post hole auger goes deep enough to hit a gas or power line.

Sources