Fence Calculator — Posts, Rails & Pickets
Calculate fence posts, rails, pickets, and concrete needed for privacy, semi-privacy, and picket fences.
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) Materials: 30 × $15 + 75 × $8 + 600 × $2 + 45 × $7 = $450 + $600 + $1,200 + $315 = $2,565 Total with gates: $2,565 + $500 = ~$3,065
Result:30 posts | 75 rails | 600 pickets + 2 gates | ~$3,065
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.
Background & Theory
Fence construction combines practical boundary marking with privacy, security, and aesthetic considerations. Proper planning ensures code compliance, longevity, and neighbor relations.
Fence Planning Essentials:
Property Lines:
Fence must be on your property, typically 6-12\" inside line for safety margin. Survey property corners before building - professional survey ($300-600) worth the investment to avoid disputes. Boundary disputes expensive (legal fees $5,000-20,000+) and neighbor relations suffer. Many jurisdictions require survey for permit. Shared fence: Negotiate with neighbor - split costs, agree on style, get written agreement. Never assume old fence is on property line - many aren't.
Setback Requirements:
Most jurisdictions require fence setback from property line - typically 3-10 ft from side/rear lines, more from front (or restrict front yard fence height to 3-4 ft). Corner lots often have special restrictions (sight triangle for traffic). Setbacks ensure: Maintenance access, utilities access, neighbor relations. Check zoning code before planning.
Height Restrictions:
Common limits: Front yard: 3-4 ft maximum. Side/rear yard: 6-8 ft maximum (varies by jurisdiction). Corner lots: May restrict to 3 ft near street. Special circumstances: Pools often require 4-6 ft fence by code. Commercial/industrial: May allow 8-10 ft. Variance possible but requires application, neighbor notification, and approval (not guaranteed).
Fence Construction Details:
Post Installation:
Dig hole: 3× post width, 1/3 post length deep (minimum 2 ft). Add: 4-6 inches gravel bottom for drainage. Set post plumb (check with level on two adjacent sides). Brace temporarily while concrete sets. Concrete: Pour or dry-pack around post, tamp to remove voids, slope top away from post for water runoff. Cure: 24-48 hours before attaching rails.
Rail Attachment:
Face mount: Rails screwed/nailed to post faces (easier, less strong). Dado/notch: Rails set into notched posts (stronger, more traditional). Brackets: Metal brackets hold rails between posts (fastest, modern). Spacing: Distribute evenly - 3 rails for 6-ft fence (top, middle, bottom), 2 rails for 4-ft fence. Galvanized or stainless fasteners only - prevent rust.
Picket Installation:
Mark layout: String line ensures straight fence. Spacing jig: Scrap wood cut to gap width ensures consistency. Fasteners: 2 galvanized nails or screws per picket per rail. Top alignment: String line or chalk snap for even top edge. Stagger board widths: Natural appearance if using rough-sawn cedar.
Fence Material Options:
Pressure-Treated Pine:
- Cost: $8-15 per linear ft (materials)
- Lifespan: 15-20 years with proper install
- Maintenance: Optional staining every 2-3 years
- Retention level: .40 minimum for ground contact posts
- Green tint fades to gray over 1-2 years
- Most economical choice
Cedar:
- Cost: $15-25 per linear ft
- Lifespan: 20-30+ years
- Maintenance: Optional (stain to preserve color or let weather to silver-gray)
- Natural oils repel moisture and insects
- Beautiful grain and aroma
- Premium natural choice
Vinyl:
- Cost: $20-35 per linear ft
- Lifespan: 30+ years
- Maintenance: Occasional washing only
- Won't rot, insects can't damage
- Can crack in extreme cold (<0°F)
- Limited colors (white, tan, gray most common)
- Never needs painting
Composite:
- Cost: $25-45 per linear ft
- Lifespan: 30+ years
- Maintenance: Minimal
- Recycled materials (wood fiber + plastic)
- Realistic wood appearance
- Won't rot, splinter, or need painting
- Eco-friendly option
Chain Link:
- Cost: $5-12 per linear ft
- Lifespan: 20-40 years
- Galvanized or vinyl-coated
- See-through (security without privacy)
- Very economical
- Best for pet containment, security
Calculating Materials:
Posts Formula:
Posts = (Length / Spacing) + 1 + Corner posts + Gate posts
Example: 100 ft, 8 ft spacing, 2 corners, 1 gate
= (100 / 8) + 1 + 0 + 2 = 15.5 → 16 posts
Rails Formula:
Rails per section × Number of sections
Sections = ceil(Length / 8) for 8-ft boards
Example: 100 ft fence, 3 rails high
= ceil(100 / 8) × 3 = 13 × 3 = 39 rails (2×4 × 8 ft)
Pickets Formula:
(Length × 12 inches) / (Picket width + Gap spacing)
Example: 100 ft, 3.5\" pickets, 1\" gaps
= (1,200\" / 4.5\") = 267 pickets
Concrete Calculation:
Bags = Posts × Bags per post (1.5-2 typical)
Cost Estimating by Project Size:
100 Linear Feet Privacy Fence (6 ft tall):
- DIY PT Pine: $800-1,500
- DIY Cedar: $1,500-2,500
- Professional PT: $1,500-4,000
- Professional Cedar: $3,000-6,000
- Professional Vinyl: $2,500-5,000
200 Linear Feet:
- Double above estimates
- Bulk material discounts may apply
Add-Ons:
- Gates: $200-600 each for materials (4-6 ft wide)
- Stain/seal: $0.50-1.50 per linear ft
- Lattice top: $5-12 per linear ft
- Post caps: $3-10 per post (decorative and protective)
Fence Maintenance:
Pressure-Treated:
- Optional: Stain/seal after 6 months (wood needs to dry first)
- Re-apply every 2-3 years
- Extends life, enhances appearance
- Cost: $0.50-1.50 per linear ft
Cedar:
- Optional: Clear sealer to preserve color
- Or let weather naturally to gray
- Inspect annually for loose pickets
- 20-30+ year lifespan even without treatment
Vinyl/Composite:
- Wash annually with soap and water
- No staining or sealing needed
- Inspect posts for plumb (can shift)
- Check for cracks (replace panels if needed)
This calculator provides accurate material quantities for fence planning and budgeting.
History
Fences evolved from primitive animal enclosures to sophisticated property boundaries, privacy screens, and architectural features defining American suburban landscape.
Ancient Fencing (10,000 BCE - 500 CE):
First fences: Stone walls and earth berms to contain livestock (10,000 BCE). Wooden fences appeared with agricultural settlements - split rails, woven branches (wattle). Roman estates had sophisticated fencing - stone walls, wooden palisades, hedgerows. Function purely practical: Contain animals, exclude predators, mark territory.
Medieval Fencing (500-1500):
Feudal land divisions required boundaries. Living fences: Hedgerows planted and maintained as livestock barriers - still common in England. Wooden paling fences (vertical stakes) protected gardens. Stone walls prevalent where stone abundant (New England, Scotland). Fencing indicated land ownership and social status.
Colonial American Fences (1600s-1800s):
Split-rail fences: Abundant timber made zig-zag rail fences common (no posts needed, easy construction). Picket fences: Became symbol of domestic respectability in towns - white picket fence idealized American home. Board fences: Sawmills enabled milled lumber fences (more refined than split rails). Regional variations: Stone walls (New England), adobe (Southwest), split rail (frontier). Fencing crucial in property law - defines boundaries, contains livestock in open-range areas.
Barbed Wire Revolution (1874):
Joseph Glidden patented modern barbed wire (1874, Illinois). Transformed American West - made fencing prairie economical ($1 per acre vs $200 for wood). Ended open range grazing. Fence wars between cattle ranchers and farmers. Barbed wire factories proliferated. By 1900, millions of miles installed across America. Still dominant for agricultural fencing.
Chain Link Era (1844-1950s):
Charles Barnard invented wire weaving machine (England, 1844). Mass production began early 1900s. WWII increased production for military applications. Became standard for industrial, commercial, and some residential (cheap, durable, see-through security). Vinyl-coated chain link added 1960s for better appearance and rust resistance.
Suburban Fence Boom (1950s-1980s):
Post-WWII suburban expansion created fence industry boom. Privacy fences standard in subdivisions (define property, create private yards). Stockade and board-on-board styles popular. Pressure-treated lumber (1970s) revolutionized fence longevity - replaced cedar as affordable rot-resistant option. Pre-fab fence panels emerged (faster installation). Local fence contractors proliferated.
Modern Fence Innovation (1980s-Present):
Vinyl fencing emerged 1980s-1990s: No maintenance, 30+ year life, initially expensive but prices dropped. Composite fencing (2000s): Recycled materials, looks like wood, no rot/insects, eco-friendly. Horizontal board fences: Modern aesthetic trend (2010s), clean lines, contemporary homes. Aluminum ornamental: Replaces expensive wrought iron look affordably. Smart technology: Gate operators, security cameras, integrated lighting. Design focus: Fences as architectural elements, not just boundaries.
Today fences balance function (privacy, security, pet containment) with aesthetics (curb appeal, property value) across a vast range of materials and styles.