Enter your fence height to get required post length and hole depth.
ft
Post Length8 ft
Hole Depth24 in
Post Above Ground6 ft
Project Timeline
Typical phases for a DIY fence installation.
Tool & Supplies Checklist
0 / 15
Permit & Code Notes
📏
Height Limits
Back yard: typically 6 ft max. Front yard: typically 4 ft max. Always verify local ordinances.
🗺️
Get a property survey or locate pins before building. Most codes require the finished side to face the neighbor. Setback: usually 2–6 inches from the property line.
🏘️
HOA Check
HOA rules may restrict fence style, color, and height. Get written approval before purchasing materials.
📋
Permits
Many municipalities require a building permit for fences over 6 ft, or any fence in flood zones. Check with your local building department.
How to Use This Calculator
1
Choose Your Fence Type
Select Wood, Chain Link, Split Rail, or Vinyl. Each type has its own material requirements. Use a Quick Start preset to populate typical values for your project.
2
Enter Dimensions
Input the total linear footage of your fence line, post spacing, number of corners, and any gates. Walk the perimeter with a measuring wheel or use a property survey for accuracy.
3
Review & Estimate
See a complete material list with quantities. Switch to Cost Estimator to enter local prices and get a project budget. Use Project Planner for timelines, tool checklists, and permit notes.
Formula & Methodology
Posts Needed
Posts = ⌈Fence Length / Post Spacing⌉ + 1
Standard post spacing is 6–8 ft for wood; 10 ft for chain link. Gate posts (6×6) are counted separately and replace regular posts.
Length: 200 ft, Posts: 10ft spacing, one single gate
Result: 4 rolls of fabric, 19 line posts, 4 terminal posts, 23 concrete bags. Material cost: ~$1,200–$1,800.
Fence Styles and Costs
Style
Height
Cost per Linear Ft
Lifespan
Maintenance
Wood Privacy
6 ft
$15 – $35
15–20 yrs
Stain every 2–3 yrs
Wood Picket
3–4 ft
$10 – $20
15–20 yrs
Stain every 2–3 yrs
Board-on-Board
6 ft
$18 – $40
15–20 yrs
Stain every 2–3 yrs
Chain Link
4–6 ft
$8 – $18
20+ yrs
Very low
Split Rail
3–4 ft
$12 – $22
15–20 yrs
Low
Vinyl Privacy
6 ft
$20 – $45
20–30 yrs
Wash occasionally
Aluminum
4–6 ft
$25 – $50
Lifetime
None
Building a Fence That Lasts
Setting Posts Properly
Fence longevity depends almost entirely on post installation. Dig holes to at least one-third the total post length — a 6-ft fence uses 8-ft posts set 24–30 inches deep. Set posts in concrete, crown the surface so water sheds away from the wood, and plumb each post with a level before the concrete sets. Allow 24–48 hours before attaching rails.
Property Lines and Neighbor Relations
Before building, confirm your exact property boundaries with a survey or locate the property pins. Most municipalities require the finished side of the fence to face the neighbor. Check local codes for height limits — typically 6 feet for back yards and 4 feet for front yards — and required setbacks from property lines.
Choosing the Right Wood
Cedar is naturally rot-resistant and dimensionally stable, making it the preferred choice despite its higher cost. Pressure-treated pine is the budget option but tends to warp as it dries. For the longest-lasting wood fence, use cedar or redwood pickets on pressure-treated structural members (posts and rails).
Related Calculators
How to Use This Calculator
1
Measure Perimeter
Enter the total fence run length in feet. For a property enclosure, measure all four sides and sum them.
2
Subtract Gate Openings
Deduct the total width of gate openings -- the calculator treats these spans separately from the fenced sections.
3
Choose Fence Style
Select privacy, picket, split-rail, or chain-link to auto-fill typical post spacing, rail count, and picket spacing.
4
Set Post Spacing
Standard post spacing is 8 feet for most wood fences; 10 feet for rail fences. Shorter spacing increases stability on slopes or in high-wind areas.
5
Get Post, Rail, and Picket Counts
Review the number of line posts, corner posts, gate posts, rails per section, and total pickets needed for your fence run.
Key Formulas
Posts NeededPosts = Perimeter / Spacing + 1
Rails RequiredRails = Posts x Rails per Section
Picket CountPickets = Perimeter / Picket Width
Gate PanelsGates = Opening / Max Gate Width
Key Terms
Post Spacing — The center-to-center distance between fence posts. Standard is 8 feet for wood privacy fences; shorter spacing increases rigidity on slopes.
Picket — An individual vertical board in a fence panel. Picket width and spacing determine the fence's privacy level and visual density.
Rail — A horizontal member spanning between posts that pickets or boards attach to. Privacy fences use 2-3 rails; split-rail fences use 2.
Stringer — Another term for a horizontal fence rail, particularly the intermediate rails in a tall privacy fence.
Line Post — A standard post within a straight fence run. Corner posts and end posts require larger dimensions and deeper concrete footings.
Corner Post — A heavier post at a change of direction, typically 4x4 or 6x6. These posts bear greater lateral loads and anchor the fence runs meeting at the corner.
Frequently Asked Questions
Is wood or vinyl fencing better for a privacy fence?
Wood fencing costs less upfront and can be painted or stained any color, but requires staining every 2-3 years and is susceptible to rot and insects. Vinyl fencing costs 20-30% more initially but is virtually maintenance-free, does not rot, and retains its color for decades. For high-humidity climates or areas with ground contact moisture, vinyl often has a lower 10-year total cost.
How deep do fence posts need to be in the ground?
The standard rule is to bury fence posts 1/3 of their total length in the ground, plus 6 inches below the frost line. For a 6-foot fence, use 9-foot posts buried 3 feet deep. In cold climates, extend below frost depth to prevent heaving -- frost depths range from 12 inches in the South to 48 inches in northern states.
What is the maximum width for a gate?
Single swing gates wider than 4 feet become heavy and prone to sagging. For openings of 4-8 feet, use a double-swing gate (two 2-4 foot panels). For larger openings (8-16 feet), a sliding gate or a rolling gate on a track is more practical. Always use diagonal anti-sag bracing or tension rods on gates wider than 3 feet.
Do I need concrete for every fence post?
Corner posts, gate posts, and end posts always need concrete for structural stability. Line posts in sandy or loam soil can sometimes use compacted gravel as a fill, which actually improves drainage and can reduce frost heave. In clay or wet soils, concrete is recommended for all posts. Use at least one 50-lb bag of fast-setting concrete per post hole.