Fence calculator

Enter fence length, post spacing, fence height, picket width and gap, waste percentage, and gate width to get the number of posts, rails, pickets, and concrete bags needed. This is for standard wood privacy and picket fences; does not handle chain-link mesh, vinyl panels, or custom gate hardware.

Fence details

Formulas

posts = ceil(length / spacing) + 1

sections = posts - 1

rails_per_section = max(2, ceil(height × 12 / 24))

rails = sections × rails_per_section

effective_run = length − gate_width

pickets = ceil(effective_run × 12 / (picket_width + picket_gap)) × (1 + waste_percent / 100)

concrete_bags = posts × 2 (60-lb bags, standard hole)

Where length = total fence length in feet; spacing = post spacing on-center in feet; height = fence height in feet; picket_width = actual picket width in inches (e.g., 5.5 for 1×6); picket_gap = gap between pickets in inches (0 for privacy); waste_percent = waste factor as percentage; gate_width = total gate opening width in feet; posts = total posts including ends and corners; sections = fence sections between posts; rails_per_section = rails per section (1 per 24" height, min 2); rails = total rails; effective_run = fence run after gate deduction in feet; pickets = total pickets including waste; concrete_bags = 60-lb concrete bags (2 per post).

Post count follows the universal rule: sections = ceil(length/spacing), posts = sections + 1. Gate posts are included in the post count.

Rails per section = 1 per 24 inches of fence height, minimum 2 (top and bottom). A 6-ft fence gets 3 rails.

Pickets: for privacy (gap=0), divide effective run in inches by picket width. For picket-style, divide by picket_width + gap.

Gate width is deducted from the run before calculating pickets and rails. Gate-side posts are already counted.

Concrete assumes 2 bags of 60-lb fast-set per post (10-in diameter, 36-in deep hole per IRC R403.1).

IRC R403.1 governs post depth: bury 1/3 of post length or below frost line, whichever is deeper.

Checked examples

100 ft, 8-ft spacing, 6-ft privacy fence: 14 posts, 39 rails, 241 pickets (10% waste), 28 concrete bags.

150 ft, 6-ft spacing, 4-ft picket fence (3.5 in + 2.5 in gap), 8-ft gate, 5% waste: 26 posts, 50 rails, 299 pickets, 52 concrete bags.

200 ft, 8-ft spacing, 8-ft privacy fence, 15% waste: 26 posts, 100 rails, 503 pickets, 52 concrete bags.

Limits

Fence length, post spacing, and height must be positive. Picket width must be positive. This models standard wood privacy (gap=0) and picket (gap>0) fences. Waste factor applies to pickets only; add 5% for vinyl/chain-link, 10% for wood, 15% for complex layouts. Concrete is 2 bags per post standard; adjust for larger holes or deeper frost lines. Not for: chain-link mesh or tension wire calculation; vinyl panel or aluminum panel fences; custom gate hardware or hinge calculation; post depth below frost line (uses standard 2 bags/post); terrain slope or stepped fence adjustment.

CalcSummit - Fence Calculator, LS USA - Fence Calculator and Remodel Calculators - Fence Calculator.