Carpentry

Fence Calculator

Quick answer: sections = fence length ÷ post spacing (rounded up); posts = sections + 1, plus one per gate and corner; pickets = length (in) ÷ (picket width + gap). A 96 ft run of 4 ft picket fence at 8 ft spacing is 12 sections, 13 posts, 24 rails, and 192 pickets (3.5 in pickets, 2.5 in gaps).

Count posts, rails, pickets, and post-hole concrete for a wood fence — spaced picket, side-by-side privacy, or board-on-board — with gates and corners included.

Fence section

Post spacing (on center) Concrete at each post

Fence Materials Calculator

Total fence length includes gate openings.

Pickets / boards —
Posts—
Rails—
Concrete bags—
Sections
—
Fenced length (less gates)
—
Rail lumber
—
Post concrete
—
Estimated cost
—

Pickets cover the full length so gates can be built from the same boards. Posts assume each gate and corner breaks the run. For other hole sizes use the post hole concrete calculator.

Gates, pickets, posts & cost

How to calculate fence materials

Every wood fence is a row of sections. Each section is two posts, a set of rails between them, and boards nailed to the rails. Once you know how many sections you have, everything else follows.

Posts = ⌈(L − gates) ÷ spacing⌉ + corners + gates + 1 Pickets = L (in) ÷ (picket width + gap), plus extra
  1. Measure the line along the ground where posts will go, including gate openings.
  2. Subtract gate widths to get the fenced length, divide by the post spacing, and round up for the number of sections. Add one section per corner, because a corner forces a post even if the last bay is short.
  3. Count posts: sections + 1 for the starting end, plus one per gate (a gate needs a post on both sides).
  4. Count rails: sections × rails per section — 2 for fences up to about 4 ft, 3 for 5–6 ft privacy fences.
  5. Count pickets from the board pitch: picket width plus gap for spaced pickets, width alone for side-by-side, and width minus overlap for board-on-board (front and back boards alternate).
  6. Figure post concrete: hole volume minus post volume, divided by bag yield.

Worked example

A 100 ft, 4 ft tall picket fence has one 4 ft gate and two corners, posts 8 ft apart, 3.5 in pickets with 2.5 in gaps, 5% extra pickets, and 4×4 posts in 10 in holes with 24 in of concrete.

  • Sections: (100 − 4) ÷ 8 = 12, + 2 corners = 14 sections
  • Posts: 14 + 1 + 1 gate = 16 posts; rails: 14 × 2 = 28 rails (8 ft 2×4s)
  • Pickets: 1,200 in ÷ 6 in = 200, × 1.05 = 210 pickets
  • Concrete: π × (5/12)² × 2 − (3.5/12)² × 2 = 0.92 ft³ per post; 16 posts = 14.7 ft³ ÷ 0.60 = 25 bags of 80 lb mix

Pickets per fence section

Boards needed to fill one bay, rounded up, before extras. Board widths are actual (a nominal 1×6 is 5.5 in).

Number of pickets per 8 ft and 6 ft fence section by style and board width
Style and boardBoard pitchPer 8 ft sectionPer 6 ft section
Spaced picket, 3.5 in + 2.5 in gap6 in1612
Spaced picket, 5.5 in + 2.5 in gap8 in129
Privacy, 5.5 in side by side5.5 in1814
Privacy, 3.5 in side by side3.5 in2821
Board-on-board, 5.5 in, 1 in overlap4.5 in2216

Fence building tips and common mistakes

  • Call 811 before you dig. Utility locating is free in the U.S. and required in most states before digging post holes.
  • Confirm the property line and the rules. Many cities and HOAs cap fence height (often around 4 ft in front yards and 6 ft in back yards), set a setback, and require a permit. Pool barriers have their own spacing and height rules — check local code.
  • Set gate posts heavier. Gate posts carry a swinging load; use a 6×6 or a deeper, wider hole for gates over 4 ft, and plan a diagonal brace on the gate frame running from the bottom hinge corner up.
  • Leave a ground gap. Hold pickets about 2 in above grade so the bottoms do not wick water. Rot-prone post bottoms last longer with a few inches of gravel under the concrete.
  • Mind nominal sizes. A "1×6" picket is 5.5 in wide and many cedar pickets are about 5.5 in; dog-ear pickets can vary. Measure a few boards before relying on a count, especially for side-by-side privacy fences, where boards shrink and leave gaps.
  • Hole depth depends on height and frost. A common guideline is to bury roughly one-third of the post's length, at least 24 in, and deeper where frost heave is a problem.

Fence calculator FAQ

How many fence posts do I need?

Divide the fence length (minus gate openings) by the post spacing and round up to get sections, add one section break per corner, then posts = sections + 1 + one extra post per gate. A 150 ft fence with one 4 ft gate, two corners, and 8 ft spacing needs 21 sections and 23 posts.

How many pickets do I need for a fence?

Divide the fence length in inches by the picket width plus the gap. For a privacy fence with 5.5 in boards butted together, 150 ft × 12 ÷ 5.5 = 327.3 boards, or 344 with 5% extra. A 4 ft picket fence with 3.5 in pickets and 2.5 in gaps needs 2 pickets per foot.

How many rails does a fence section need?

Fences about 4 ft tall or less typically use 2 rails per section, while 5 to 6 ft privacy fences use 3 rails to keep boards from warping. An 8 ft post spacing uses one 8 ft 2×4 per rail per section, so 21 sections with 3 rails need 63 rails.

How many bags of concrete per fence post?

A 4×4 post in a 10 in diameter hole with 24 in of concrete needs about 0.92 cubic feet, which is roughly 1.5 bags of 80 lb concrete or 2.5 bags of 50 lb fast-setting mix. Deeper holes for frost or wind need proportionally more.

Should fence posts be 6 or 8 feet apart?

Eight feet on center is the most common spacing for wood fences because rails come in 8 ft lengths. Six feet is used for heavy board-on-board fences, windy sites, vinyl panels sized for 6 ft, and soft soils. Closer spacing adds posts and concrete but reduces sag.

How we built this calculator: results use the standard volume, area, and coverage formulas shown on this page, with typical U.S. material densities, bag yields, and waste factors that you can override. Written and checked by the YardsCalculator editorial team. Last reviewed: October 2026.