Fence Calculator
Calculate fence posts, rails, and pickets. Enter values for instant results with step-by-step formulas.
Formula
Posts = (Length / Spacing) + 1
Divide fence length by post spacing, add 1 for the final post. Calculate rails and pickets based on fence sections and desired spacing.
Worked Examples
Example 1: Backyard Privacy Fence
Problem:100 ft long, 6 ft tall, 8 ft post spacing, 3 horizontal rails, pressure-treated wood.
Solution:Posts needed: (100 / 8) + 1 = 13.5 → 14 posts Post length: 6 + 2 = 8 ft (4×4) Rails (8-ft 2×4s): (100 / 8) sections × 3 rails = 39 rails Pickets (6-ft 1×4s, 4" spacing): (100 ft × 12 inches) / 4 = 300 pickets Concrete (1.5 bags per post): 14 × 1.5 = 21 bags (50-lb) Cost: 14 posts × $15 = $210 39 rails × $8 = $312 300 pickets × $2 = $600 21 bags × $7 = $147 Total: ~$1,269 materials
Result:14 posts | 39 rails | 300 pickets | $1,269
Example 2: Small Garden Fence
Problem:50 ft, 4 ft tall, 6 ft post spacing, 2 rails.
Solution:Posts: (50 / 6) + 1 = 9.3 → 10 posts (6-ft) Rails: (50 / 8) sections × 2 = 13 rails (2×4 × 8 ft) Pickets: (50 × 12) / 4 = 150 pickets (4-ft) Concrete: 10 × 1.5 = 15 bags Cost: 10 posts × $12 = $120 13 rails × $7 = $91 150 pickets × $1.50 = $225 15 bags × $7 = $105 Total: ~$541
Result:10 posts | 13 rails | 150 pickets | $541
Example 3: Property Line Fence with Gates
Problem:200 ft, 6 ft tall, 8 ft spacing, with 2 single gates (4-ft wide each).
Solution:Posts: (200 / 8) + 1 = 26 line posts Add 4 for gates (2 per gate) Total: 30 posts (8-ft, 4×4) Rails: (200 / 8) × 3 rails = 75 rails (2×4 × 8 ft) Pickets: (200 × 12) / 4 = 600 pickets (6-ft) Concrete: 30 posts × 1.5 = 45 bags Gates: 2 gates × $250 = $500 (materials) Total materials: ~$2,950 + gates
Result:30 posts | 75 rails | 600 pickets + 2 gates
Frequently Asked Questions
How many fence posts do I need?
Formula: (Fence length / Post spacing) + 1. Standard spacing is 8 feet on-center for residential privacy fences. For 100-ft fence: (100 / 8) + 1 = 13.5 → 14 posts total. Add 2 posts per gate opening (gates need posts on both sides regardless of spacing alignment). Add extra for corners (each corner needs a post). Closer spacing (6 ft): Stronger fence, more posts, more cost - good for tall or heavy fences, high-wind areas. Wider spacing (10 ft): Economy choice but requires stronger posts/rails. Always buy 1-2 extra posts for mistakes, damage, or future repairs. Posts are critical structural component - don't skimp on quantity or quality.
How deep should fence posts be buried?
General rule: Bury 1/3 of total post length underground. 6-ft fence: Use 8-ft posts with 2 ft underground. 4-ft fence: Use 6-ft posts with 2 ft underground. 8-ft fence: Use 10-ft posts with 2.5-3 ft underground. Frost line considerations: In cold climates, posts must extend below frost line (18-48" depending on region) to prevent frost heaving. Sandy/loose soil: Dig deeper (30-36") or use larger concrete footings. Corner and gate posts: Often need 6-12" deeper for added lateral strength. Post hole diameter: 3× post width (12" hole for 4×4 post). Check local code for frost line requirements - non-compliance = inspection failure and frost damage.
What size fence posts should I use?
4×4 posts (3.5" × 3.5" actual): Standard for residential fences up to 6 ft tall, line posts (between corners). 6×6 posts (5.5" × 5.5" actual): Corner posts, gate posts, fences taller than 6 ft, high-wind areas, extra strength. Post length = Fence height + buried depth: 6-ft fence = 8-ft posts (6 ft above + 2 ft below). 4-ft fence = 6-ft posts (4 ft above + 2 ft below). Material: Pressure-treated wood (rated for ground contact - .40 retention minimum), cedar (naturally rot-resistant but expensive), steel (T-posts or pipe, very durable). Never use untreated wood underground - will rot within 3-5 years. Always use pressure-treated rated for ground contact, not just above-ground.
How much concrete per fence post?
Standard 4×4 post in 8-inch diameter hole, 24" deep: ~1.5 bags (50-lb) fast-setting concrete or 0.5 cubic feet wet mix. Calculate: Volume = π × r² × depth = 3.14 × (4")² × 24" = 1,206 cu in ÷ 1,728 = 0.7 cu ft. One 50-lb bag makes ~0.375 cu ft, so need 2 bags per post. Larger 6×6 posts or deeper holes: 2-3 bags per post. For 14-post fence: 28 bags (1.5 each) or 42 bags (3 each for strong fence). Fast-setting concrete ($7-10 per bag): Mix dry in hole, add water, sets in 20-40 minutes. Regular concrete ($5-7 per bag): Requires mixing, 24-48 hour cure. Alternative: Gravel backfill (better drainage, less strength) for light fences only.
How many fence pickets or boards do I need?
Standard pickets (3.5-4 inches wide with gaps): Calculate: (Fence length in inches) / (Picket width + gap spacing). For 100-ft fence with 3.5" pickets and 1" gaps: (1,200 inches / 4.5) = 267 pickets. Tight spacing (privacy, no gaps): Pickets per foot ≈ 3.4. For 100 ft = 340 pickets. Wide spacing (semi-privacy): 2-2.5 per foot. Picket length = fence height (6-ft fence = 6-ft pickets). Buy 10% extra for cuts, damaged boards, and future repairs. Pre-assembled panels: 6×8 or 8×8 panels eliminate individual calculations (easier but less customizable). Fence length / 8 = panels needed.
Should I use fence panels or individual boards?
Fence panels (pre-assembled 6×8 or 8×8 sections): Pros: Faster installation (hours vs days), more uniform appearance, less skill needed. Cons: Slightly more expensive per linear ft, limited design options, harder to fit uneven terrain, repair means replacing whole panel. Individual pickets/boards: Pros: Fully customizable (spacing, height, pattern), easier to follow terrain slopes/curves, repair individual boards, slightly cheaper materials. Cons: Much more labor, requires more skill, less uniform appearance. Cost comparison: Usually similar total cost (panels save labor, boards save materials). DIY recommendation: Individual boards for learning and customization. Professional/quick job: Panels for speed. Slopes or curves: Must use individual boards. Gates always custom.
What is the best wood for fencing?
Pressure-treated pine: Most common, affordable, 15-20 year life, $15-25 per 8-ft section. Green/brown tint fades to gray. Chemically treated for rot/insect resistance. Good value. Cedar: $30-40 per 8-ft section, naturally rot-resistant (oils repel moisture/insects), beautiful reddish color, 20-30+ year life, no chemical treatment needed, weathers to gray (or stain to preserve color). Premium choice. Redwood: Similar to cedar, regional (West Coast), slightly more rot-resistant, expensive. Cypress: Southeast alternative, naturally resistant, less available. Composite: $40-60 per 8-ft, 30+ years, never needs staining, doesn't rot or splinter, eco-friendly (recycled materials), modern look. Vinyl: $40-70 per 8-ft, 30+ years, zero maintenance, can crack in extreme cold, uniform appearance. Best value: PT pine. Best longevity: Cedar or composite. Best appearance: Cedar. Best maintenance-free: Vinyl or composite.
Do I need a permit to build a fence?
Usually yes - check with local building department before starting. Common permit requirements: Fences over 6 ft tall (sometimes 4 ft in front yard), fences within setback distance from property line (typically 3-10 ft setback required), fences in historic districts, fences affecting drainage. Must also: Call 811 (DigSafe) before digging - free utility location, mandatory nationwide. Survey property lines - fence on neighbor's property = legal nightmare, potential removal. HOA approval if applicable - often strictly regulates height, style, color, location. Fines for unpermitted work: $500-5,000+ depending on jurisdiction. Permit costs: $50-250 typically. Process: Submit plot plan, pay fee, schedule inspection after install. Most residential fence permits approved quickly (1-2 weeks). Not worth skipping - neighbors can report, forced removal expensive.
How much does fence installation cost?
DIY materials cost: Wood (PT pine): $8-15 per linear ft. Cedar: $15-25 per linear ft. Vinyl: $20-35 per linear ft. Chain link: $5-12 per linear ft. Wrought iron: $25-45 per linear ft. Professional installation (materials + labor): Wood: $15-40 per linear ft total. Vinyl: $25-50 per linear ft. Chain link: $8-20 per linear ft. Composite: $30-60 per linear ft. For 100-ft privacy fence: DIY wood $800-1,500 materials, Professional wood $1,500-4,000 installed. Cost factors: Height (taller = more expensive), terrain (slopes, rocks = harder digging), removal of old fence (+$3-8/ft), gates ($200-600 each), corners (more posts), rocky/dense soil (+30-50%). Most expensive work: Digging in rocky soil, extensive slopes, obstacles (tree roots, utilities).
What spacing should I use between fence pickets?
Privacy fence (solid barrier): Pickets touching or 1/4" gap (allows wood expansion - boards expand when wet, small gap prevents buckling). Semi-privacy (partial view): 1-2 inch gaps between pickets. Open picket fence (decorative, yard definition): 1.5-3.5 inch gaps (shadowbox style where pickets alternate sides). Wider gaps: Less material, less privacy, less wind resistance (good in high-wind areas). Narrower gaps: More privacy, more material cost. Wood expansion: Pressure-treated wood installed wet shrinks as it dries - boards may touch when installed but gap appears after seasoning. Cedar/kiln-dried: Already seasoned, minimal movement. Use temporary spacer board (1×2, 1×3, or 1×4) during installation to maintain consistent spacing throughout fence.