How to calculate fence materials
- Sections: divide the length by the post spacing and round up: 150 ÷ 8 → 19 sections of 7.89 feet.
- Posts: one more than the number of sections, because each end needs a post: 20 posts for a single straight run.
- Rails: sections × rails per section: 19 × 3 = 57 rails, each as long as a section.
- Pickets: convert the length to inches (1 foot = 12 inches; NIST: tables of units of measurement). With a gap between boards, n pickets cover n × width + (n − 1) × gap, so you need (length + gap) ÷ (width + gap), rounded up: 314 pickets, or 330 with 5% extra.
Post spacing and picket layout
Closer posts make a stiffer fence but cost more: at 6-foot spacing, the example needs 26 posts instead of 20. For a spaced picket fence with 3.5-inch pickets and 3.5-inch gaps and two rails, it takes 271 pickets. Local rules can limit fence height or placement near property lines, and in many places you must call 811 before digging post holes.
What this calculator does not include
- Gates and their posts and hardware. Leave the gate width out of the length and add gates separately.
- Corners and separate runs: each separate straight run needs its own end posts, so work out each run separately.
- Concrete or gravel for post holes, post caps, screws or nails, stain and labor.
Results are estimates for planning a purchase.
Methodology and testing
Automated tests compare sections, posts, rails and pickets with an independent calculation, check the picket count against a board-by-board count, and check that a length that is an exact number of sections does not get an extra post. How we build and test calculators.
Sources
- NIST Handbook 44, Appendix C: General Tables of Units of Measurement, National Institute of Standards and Technology. US customary units: 1 square foot = 144 square inches, 1 cubic yard = 27 cubic feet, 1 short ton = 2,000 pounds.
Related calculators
-
Board Foot Calculator
Board feet for up to four stacks of lumber, quarter-size thickness, waste allowance and cost per board foot.
-
Deck Calculator
Deck boards, joists and screws from deck size, board size, gap and joist spacing, with waste and cost.
-
Home Equity Loan Calculator
Monthly payment, borrowing limit at common CLTV caps, cash received after closing costs, term comparison and amortization.