Outdoor · Fencing

Fence Calculator

Posts, rails, pickets and concrete for any fence line, with corners, gates and closed loops handled the way you actually build them.

1 Fence line
ft
ft
ft
Units
2 Style
Infill
ft
8 ft max for wood; vinyl panels set it
3 for fences over 5 ft
in
%
3 Post holes
in
in
⅓ of height + gravel: 30 in.; deeper below frost
in
Posts
14
12 bays, 8 ft posts
Rails
36
8.0 ft bays → 8 ft stock
Pickets
220
5.5 in. butted
Concrete
24× 80 lb
0.53 yd³ incl. 10%
Run length after gates: 96.0 ft in 2 segments. Bays are spread evenly within each segment.

Fence materials

Fence materials
ItemQtyNotes
Posts 4×4, 8 ft14
Rails 2×4, 8 ft36
Pickets 5.5 in. × 6 ft220incl. 5% waste
Concrete mix, 80 lb2414 holes
Drainage gravel8 bags (0.5 ft³)
Gate hardware (hinges, latch)1 sets
Fasteners: two 2½–3 in. exterior screws or ring-shank nails per picket per rail.

How posts are counted

Post counts go wrong at corners and gates. A corner post serves both directions, so it isn’t extra; a gate, on the other hand, needs a post on each side and breaks the line, so it adds one. The calculator removes gate widths from the run, splits what’s left into equal segments at every corner and gate, and divides each segment into bays no longer than your spacing.

bay (≤ 8 ft)bay (≤ 8 ft)bay (≤ 8 ft)posts = bays + 1 (+1 per gate)
Bays sit between posts. A straight run of n bays has n + 1 posts; a gate adds one more.
Run length = total − gates × gate width Segments = corners + gates + 1 (closed loop: corners + gates) Bays = segments × ceil(run ÷ segments ÷ spacing) Posts = bays + gates + 1 (closed loop: bays + gates) Pickets = run × 12 ÷ (picket width + gap) × (1 + waste)

Worked example: 150 ft of 6 ft privacy fence

  • 2 corners and one 4 ft gate: run 146 ft in 4 segments of 36.5 ft.
  • Each segment needs ceil(36.5 ÷ 8) = 5 bays: 20 bays, 22 posts (20 + 1 + 1 for the gate).
  • Three rails per bay: 60 rails. Bays are 7.3 ft, so 8 ft rails.
  • Pickets: 1,752 in. ÷ 5.5 = 318.5, +5% = 335 pickets.
  • Holes 10 in. × 30 in. with 6 in. of gravel: 0.92 ft³ of concrete each, 22 holes + 10% = 38 bags of 80 lb. Posts: 6 ft above ground + 24 in. in concrete = 8 ft posts.

Before you dig

  • Find the line. Fences usually go a few inches inside the property line. A survey or the plat settles disputes before they start.
  • Check local rules. Many towns limit backyard fences to 6 ft and front-yard fences to 3–4 ft, require a permit, and have pool-barrier rules if there is a pool.
  • Call 811. Utilities mark buried lines for free; hitting one is dangerous and expensive.

Tips that save boards

  • Set corner and end posts first, pull a mason’s line, then set line posts to it.
  • Use pressure-treated posts rated for ground contact; the pickets and rails can be lighter treatment or cedar.
  • On slopes, decide between stepped panels and racked (sloped) rails before ordering: stepping needs longer posts.
  • Fasten pickets with two exterior screws or ring-shank nails per rail, and leave a 2 in. gap above grade so the bottoms dry.

For prices, the fence cost calculator uses published per-foot ranges for wood, vinyl, chain link and aluminum and splits out labor.

Order list check

Before ordering, walk the line with the list: one post per mark, one gate kit per gate, and a few spare pickets for warped or split boards. Lumber yards will often deliver the whole fence on one cart if you order it together.

Questions people ask

How many fence posts do I need?
For a straight run, divide the length by the post spacing, round up, and add one. Every corner splits the run (corner posts are shared) and every gate adds a post because a gate breaks the line. A 150 ft fence with 2 corners and one 4 ft gate at 8 ft spacing needs 22 posts.
How many pickets do I need for a privacy fence?
Divide the fence length in inches by the picket width (plus any gap): 146 ft of 5½ in. pickets butted tight is 1,752 ÷ 5.5 = 319 pickets, plus about 5% for splits and bad boards.
How far apart should fence posts be?
Eight feet on center is the usual maximum for wood fences, matching 8 ft rails; 6 ft makes a stiffer fence and suits heavy or tall designs. Vinyl and aluminum panels dictate the spacing, usually 6 or 8 ft.
How deep should fence posts be set?
A common rule is at least one-third of the above-ground height, never less than 24 in., and always below the local frost line. A 6 ft fence is commonly set 24–36 in. deep with a few inches of gravel below.
How many rails per section?
Two rails for fences up to about 4–5 ft, three for 6 ft privacy fences so the pickets stay flat and don’t cup.

Sources

  1. QUIKRETE Concrete Mix (No. 1101): yield per bag — QUIKRETE, checked Nov 2026. 80 lb bag yields about 0.60 cu ft; 40 lb about 0.30 cu ft. 60 lb (0.45) and 50 lb (0.375) follow the same yield per pound.
  2. 2021 International Residential Code (IRC) — International Code Council, checked Nov 2026.

Related calculators

All outdoor tools →