Fence Calculator — Posts, Rails & Pickets for Any Yard
Materials takeoff for wood privacy and picket fences — posts, rails and pickets
Before you load lumber into the truck, you need a count: how many posts, how many rails, and how many pickets it takes to close in your yard. Buy short and you make a second trip mid-build; buy blind and you overpay for a stack of pickets that warp in the garage. This fence calculator turns your fence line into a clean materials list so you order the right pile once.
The math starts with the perimeter — the total run of your fence in feet. Add up every side of the run (a 50 ft × 50 ft backyard is 50 + 50 + 50 + 50 = 200 ft, minus any side that's already a house wall). From there:
• Posts = ceil(perimeter ÷ post spacing) + 1. Posts anchor the fence and sit at the ends of every section. The standard spacing for wood fences is 8 ft on center (some builders go 6 ft for stiffer panels). You always need one more post than the number of sections because a fence has a post at both ends. A 200 ft run at 8 ft spacing = 25 sections, so 25 + 1 = 26 posts. Each gate adds one post for its hinge/latch side.
• Rails = sections × rails per section. Rails are the horizontal boards that pickets nail to. A fence under 5 ft uses 2 rails; a 6 ft privacy fence usually uses 3 rails for stiffness. With 25 sections and 3 rails each, that's 75 rails.
• Pickets = ceil(perimeter × 12 ÷ (picket width + gap)). Pickets are the vertical boards. A standard dog-ear picket is 5.5 in wide (a nominal 1×6). For a solid privacy fence the gap is 0 in; for a spaced picket fence you might leave a 2–3 in gap. At 200 ft solid: 200 × 12 = 2,400 in ÷ 5.5 = 436.4 → 437 pickets.
Lumber is never perfect — boards split, ends get trimmed, and a few pickets are too bowed to use. That's why this calculator adds a waste factor (default 10%) on top of the pickets and rails so your final order survives the build. It rounds every quantity up to a whole purchasable unit, because the store won't sell you 0.4 of a picket. Enter your sides (or a known perimeter), pick your spacing, picket width and gap, add any gates, and you'll get a post-by-post, rail-by-rail, picket-by-picket count plus an optional cost estimate.
Calculator
Fill in the fields and click "Calculate" for instant results.
📰 Formula
• Perimeter (ft) = sum of all fenced sides • Sections = ceil(perimeter ÷ post spacing) • Posts = sections + 1 + (1 per gate) • Rails = sections × rails per section • Pickets = ceil(perimeter × 12 ÷ (picket width in + gap in)) • With waste: pickets/rails × (1 + waste% ÷ 100), rounded up Material constants: • Default post spacing = 8 ft on center (6 ft for stiffer panels) • Standard dog-ear picket width = 5.5 in (nominal 1×6) • Gap = 0 in for a solid privacy fence; 2–3 in for a spaced picket fence • Rails per section = 2 for fences under 5 ft, 3 for 6 ft privacy fences • Default waste factor = 10%
📰 Formula
• Perimeter (ft) = sum of all fenced sides • Sections = ceil(perimeter ÷ post spacing) • Posts = sections + 1 + (1 per gate) • Rails = sections × rails per section • Pickets = ceil(perimeter × 12 ÷ (picket width in + gap in)) • With waste: pickets/rails × (1 + waste% ÷ 100), rounded up Material constants: • Default post spacing = 8 ft on center (6 ft for stiffer panels) • Standard dog-ear picket width = 5.5 in (nominal 1×6) • Gap = 0 in for a solid privacy fence; 2–3 in for a spaced picket fence • Rails per section = 2 for fences under 5 ft, 3 for 6 ft privacy fences • Default waste factor = 10%
🧪 Worked examples
Example 2
Example 3
Example 4
⚠️ Common mistakes
- Forgetting the +1 post — a fence needs a post at both ends of every run, not just one per section.
- Mixing feet and inches: the picket formula needs perimeter in inches (× 12) before dividing by picket width.
- Leaving the gap at 0 for a spaced picket fence, which overbuys pickets by a third or more.
- Skipping the waste factor, so warped or split boards leave you short on the last section.
- Not adding a post per gate — every gate opening needs its own hinge/latch post.
💡 Tips
- Measure the perimeter on center (post center to post center), and subtract any side that's already a wall.
- Use 8 ft spacing for standard panels; drop to 6 ft on slopes or in high-wind areas for a stiffer fence.
- For a solid privacy look set the gap to 0; for a classic picket look try a 2.5 in gap between 3.5 in pickets.
- Buy line posts and a couple of spare end/corner posts — corners and gates need heavier or longer posts.
- Round concrete and post counts up, and keep the extra pickets — they're your repair stock for years.
Embed this calculator on your site
Copy the code below and paste it into the HTML of your site or blog.
<iframe src="https://www.calcnimbus.com/embed/fence-calculator" width="100%" height="500" frameborder="0" style="border:1px solid #eee;border-radius:12px"></iframe>
❓ Frequently asked questions
How do I calculate how many fence posts I need?
Divide the total perimeter by the post spacing and round up to get the number of sections, then add 1 because a fence needs a post at both ends. At 200 ft with 8 ft spacing that's ceil(200 ÷ 8) = 25 sections, so 26 posts. Add one extra post for each gate.
How many pickets do I need for a 200 ft fence?
Convert the perimeter to inches and divide by the picket width plus the gap. For a solid privacy fence with 5.5 in pickets and no gap: 200 × 12 = 2,400 in ÷ 5.5 = 436.4, rounded up to 437 pickets. Add a waste factor for split or bowed boards.
What is the standard spacing between fence posts?
Eight feet on center is the most common spacing for wood fences and matches standard 8 ft rail lengths. Builders drop to 6 ft spacing for stiffer panels, on slopes, or in high-wind areas. This calculator defaults to 8 ft but lets you change it.
How many rails does a fence need?
Two rails for fences under about 5 ft tall, and three rails for a 6 ft privacy fence so the pickets don't bow. Multiply the number of sections by the rails per section. Twenty-five sections with three rails each equals 75 rails before waste.
How wide is a standard fence picket?
A standard dog-ear picket is 5.5 inches wide, which is the actual width of a nominal 1×6 board. Some fences use 3.5 in (1×4) pickets for a narrower look. Enter the real width you're buying so the picket count is accurate.
How do I figure pickets for a spaced picket fence?
Add the gap to the picket width in the formula. For 3.5 in pickets with a 2.5 in gap, each picket covers 6 in, so a 200 ft (2,400 in) run needs ceil(2,400 ÷ 6) = 400 pickets. A larger gap means fewer pickets.
Do I need an extra post for a gate?
Yes. Every gate opening needs its own post for the hinge and latch side, so each gate adds one post to the count. Gate and corner posts are often heavier or set deeper than line posts, so plan for a few upgraded posts.
How much waste should I add when buying fence materials?
A 10% waste allowance is typical for pickets and rails to cover splits, trimmed ends, and boards too warped to use. Bump it to 12–15% for complex layouts with many corners or gates. Keep the leftover pickets as repair stock.
How do I calculate the perimeter of my fence?
Add up the length of every side you plan to fence, in feet. A square 50 ft yard is 50 × 4 = 200 ft, but subtract any side that's already a house wall or shared fence. Enter the sides separately or type a known perimeter directly.