Fence Cost Calculator: Posts, Panels & Materials for Any Yard

The average fence costs $15-$45 per linear foot installed, depending on material. A 150-foot wood privacy fence typically costs $3,000-$5,500 for materials alone, while vinyl runs $3,750-$7,500. Chain link is the most affordable at $1,050-$3,000, and aluminum ornamental fencing ranges from $3,750-$6,750. Total installed cost adds $5-$20 per linear foot for labor.
When I installed a 175-foot cedar privacy fence around my backyard in Portland two years ago, the project came to $3,200 in materials -- 23 posts, 22 panels, and two gates. The lesson I wish I had learned before digging the first post hole: I was 14 inches over my property line on the south side. A $400 survey would have saved me from pulling up three posts and resetting them, plus an awkward conversation with my neighbor. Always get a survey before you set a single post.
Use our Fence Calculator to get accurate material counts, post spacing, and total cost estimates for your project.
Fence Cost Per Linear Foot by Material
Fence material choice drives the majority of your total project cost. Each material has a different price range, lifespan, and maintenance profile that affects long-term value.
| Material | Cost per Linear Foot (Materials) | Cost per Linear Foot (Installed) | Lifespan | Maintenance |
|---|---|---|---|---|
| Pressure-treated wood | $12-$20 | $20-$35 | 15-20 years | Stain/seal every 2-3 years |
| Cedar wood | $15-$30 | $25-$45 | 20-25 years | Stain/seal every 3-5 years |
| Vinyl (PVC) | $25-$50 | $30-$60 | 25-30 years | Occasional washing |
| Chain link (4 ft) | $7-$15 | $12-$25 | 20-25 years | Minimal |
| Chain link (6 ft) | $10-$20 | $15-$30 | 20-25 years | Minimal |
| Aluminum ornamental | $25-$45 | $35-$55 | 30+ years | None |
| Wrought iron | $30-$60 | $40-$75 | 50+ years | Rust treatment every 3-5 years |
| Composite | $25-$45 | $35-$55 | 25-30 years | Occasional washing |
Tip
Get multiple quotes. Fence contractor pricing varies significantly by region. Suburban areas with heavy demand (spring and summer) can run 15-25% higher than off-season rates. Schedule your project for late fall or winter for the best pricing.
Gate Costs
Gates add $150-$600 per opening depending on size and material:
- Walk gate (3-4 ft wide): $150-$350
- Double drive gate (10-12 ft wide): $300-$600
- Sliding gate (manual): $400-$800
- Automatic gate opener add-on: $500-$2,000
Most residential fences need at least one walk gate and one drive gate.
Calculating Posts, Panels & Gates
Accurate material takeoffs start with knowing your total fence length, then working backward to determine posts, panels, and hardware.
Post Spacing
Standard fence post spacing is 8 feet on center for wood and vinyl fences. Chain link typically uses 10-foot spacing with lighter-gauge intermediate posts. The formula is straightforward:
Posts needed = (Total fence length ÷ Post spacing) + 1
Add one post for each corner and each gate. Gates require a post on each side.
Panels and Rails
Standard wood and vinyl fence panels are 8 feet wide by 6 feet tall. For board-on-board or picket styles, you will calculate individual boards rather than prefab panels:
Panels needed = Total fence length ÷ Panel width
Quick Reference: Posts and Panels by Fence Length
This table assumes 8-foot post spacing, 6-foot-tall fence, and one walk gate:
| Total Fence Length | Posts Needed | Panels Needed | Concrete Bags (50 lb) | Estimated Materials Cost (Cedar) |
|---|---|---|---|---|
| 50 ft | 9 | 6 | 18 | $1,050-$1,500 |
| 100 ft | 15 | 12 | 30 | $1,800-$3,000 |
| 150 ft | 21 | 18 | 42 | $2,700-$4,500 |
| 200 ft | 28 | 25 | 56 | $3,600-$6,000 |
| 250 ft | 34 | 31 | 68 | $4,500-$7,500 |
| 300 ft | 40 | 37 | 80 | $5,400-$9,000 |
Important
Corner and gate posts change the count. Every corner adds one extra post. Every gate adds two posts (one on each side). The table above includes two extra posts for one gate -- adjust upward for additional gates or corners.
Use our Fence Calculator to automatically factor in corners, gates, and exact post spacing for your specific layout.
Material Comparison: Wood vs Vinyl vs Chain Link vs Aluminum
Choosing between fence materials involves balancing upfront cost, longevity, appearance, and maintenance. Here is how each option stacks up across the factors that matter most.
Wood Fencing
Wood remains the most popular residential fence material, representing roughly 60% of new fence installations according to the American Fence Association.
Pressure-treated pine is the budget option at $12-$20 per linear foot for materials. It accepts stain and paint well but requires treatment every 2-3 years to prevent rot and warping. Expect 15-20 years of life.
Cedar costs $15-$30 per linear foot but is naturally resistant to insects and rot. It weathers to an attractive silver-gray if left untreated, or can be stained to maintain its warm red-brown tone. Cedar fences last 20-25 years with minimal care.
Redwood is premium at $25-$40 per linear foot. It has the best natural rot resistance of any domestic softwood and holds stain beautifully. Availability is limited outside the western United States.
Vinyl (PVC) Fencing
Vinyl fencing costs more upfront ($25-$50 per linear foot) but eliminates ongoing staining and sealing costs. Quality vinyl panels meet ASTM F964 standards for impact resistance and UV stability. A vinyl fence will not rot, warp, or attract termites.
The tradeoff is aesthetic -- vinyl lacks the natural grain of wood, and color options are limited to white, tan, and gray for most manufacturers. Repairs are harder because damaged sections require full panel replacement rather than individual board swaps.
Chain Link Fencing
Chain link is the most economical option at $7-$20 per linear foot. It is functional and durable but offers no privacy unless you add slats or screening. Galvanized chain link resists rust for 20+ years, while vinyl-coated options add color and extra corrosion resistance.
Chain link is ideal for:
- Pet containment
- Property boundary marking
- Pool enclosures (check local codes for height requirements)
- Large acreage where cost per foot matters most
Aluminum Ornamental Fencing
Aluminum fencing ($25-$45 per linear foot) mimics the look of wrought iron without the rust. It is lightweight, maintenance-free, and comes in a variety of styles from simple picket to ornate scrollwork. However, aluminum provides no privacy and is not strong enough to contain large dogs that lean or push against it.
Warning
Check your HOA rules before buying materials. Many homeowners associations restrict fence materials, heights, and colors. Some prohibit chain link entirely. Review your CC&Rs and submit your fence plan for approval before purchasing anything.
Ground Prep: Gravel, Concrete & Post Holes
Setting fence posts properly is the most critical step in the entire project. A well-set post lasts decades; a poorly set post fails within a few years.
Post Hole Dimensions
The general rule for fence post holes is:
- Diameter: 3 times the post width (4x4 post = 12-inch diameter hole)
- Depth: 1/3 of the total post length plus 6 inches for gravel base
For a standard 6-foot fence using 8-foot posts:
Post in ground = 8 ft ÷ 3 = 2.67 ft (32 inches) + 6 inches gravel = 38 inches total depth
Post Hole Concrete Requirements
Concrete anchors posts securely and prevents shifting in freeze-thaw cycles. Here is how much you need per post:
| Post Size | Hole Diameter | Hole Depth | Concrete per Post (50-lb bags) | Concrete per Post (80-lb bags) |
|---|---|---|---|---|
| 4x4 | 12" | 36" | 2 bags | 1.5 bags |
| 4x4 | 12" | 42" | 2.5 bags | 1.5 bags |
| 6x6 | 18" | 36" | 4 bags | 2.5 bags |
| 6x6 | 18" | 42" | 5 bags | 3 bags |
| Steel post (2-3/8") | 8" | 36" | 1 bag | 0.75 bags |
| Steel post (2-3/8") | 10" | 36" | 1.5 bags | 1 bag |
Setting Posts Step by Step
Step 1: Dig the hole to the correct depth and diameter. A post hole digger works for a few holes; rent a two-person auger for 10+ holes.
Step 2: Add 6 inches of gravel to the bottom for drainage. Compact it firmly.
Step 3: Place the post and brace it plumb in both directions.
Step 4: Mix and pour concrete around the post, slightly mounding the top so water runs away from the wood.
Step 5: Allow 24-48 hours of cure time before attaching panels or rails.
For larger concrete needs on your project, our Gravel Calculator can help you determine how much base material you need for the post holes, and our Concrete Calculator will give you exact bag counts based on hole dimensions. You can also learn more about working with concrete in our concrete calculator guide.
Tip
Use fast-setting concrete for fence posts. Products like Quikrete Fast-Setting Concrete set in 20-40 minutes, allowing you to remove bracing and hang panels the same day. Standard concrete requires overnight cure time.
Hardscaping Connections: Pavers & Soil Considerations
Fences often intersect with other yard features like patios, walkways, and garden beds. Planning these connections in advance prevents rework.
Fence Lines Along Patios and Walkways
When your fence runs along or connects to a paved area, you have two options:
- Set posts before paving. Install fence posts first, then lay pavers or pour concrete around them. This gives the strongest post connection.
- Core-drill into existing hardscape. If the patio or walkway already exists, use a core drill to cut post holes through the surface. Fill around the post with concrete as normal.
If you are planning a patio or walkway near your fence line, our Paver Calculator helps you estimate materials for the hardscaped area.
Soil Conditions
Different soil types affect post stability and concrete needs:
- Sandy soil: Posts may shift over time. Use wider holes and more concrete.
- Clay soil: Holds posts well but expands and contracts with moisture. Add extra gravel for drainage.
- Rocky soil: Difficult to dig but provides excellent post stability. You may need a rock bar or mechanical auger.
- High water table: Consider using steel posts with concrete bases rather than wood, which will rot faster in saturated ground.
If you are also preparing garden beds along your new fence line, our Soil Calculator estimates how much fill, topsoil, or compost you need.
DIY vs Professional Fence Installation
The labor portion of fence installation typically runs $5-$20 per linear foot. For a 150-foot fence, that is $750-$3,000 in labor savings if you do it yourself. But DIY is not always the best choice.
When to DIY
DIY fence installation makes sense when:
- You have basic tool skills and can operate a post hole digger or auger
- Your yard is relatively flat with no significant grade changes
- The fence line is straight or has simple 90-degree corners
- You have at least one helper for setting posts and hanging panels
- The total run is under 200 linear feet
When to Hire a Professional
Hire a contractor when:
- Your property has significant slope (stepped or racked panels require expertise)
- Local codes require engineered drawings or inspections
- You need to remove an existing fence first
- The fence line crosses utility easements or requires locating buried services
- You want the project completed in 1-2 days rather than several weekends
Cost Breakdown: DIY vs Installed (150 ft Cedar Privacy Fence)
| Cost Component | DIY | Professional |
|---|---|---|
| Posts (21 @ $18) | $378 | Included |
| Panels (18 @ $85) | $1,530 | Included |
| Concrete (42 bags @ $5) | $210 | Included |
| Gate hardware | $250 | Included |
| Post caps | $63 | Included |
| Fasteners/brackets | $120 | Included |
| Tool rental (auger, level) | $150 | N/A |
| Materials total | $2,701 | $2,701 |
| Labor | $0 | $1,500-$2,250 |
| Project total | $2,851 | $4,201-$4,951 |
Important
Call 811 before you dig. Every state requires you to contact your local utility locating service before digging fence post holes. This is free, and failure to call can result in severed gas, water, or electrical lines -- plus fines and personal liability.
Permit Requirements & Property Lines
Fence permitting and property line rules vary significantly by municipality, but there are common patterns across most jurisdictions.
When You Need a Permit
Most areas require a fence permit when:
- The fence exceeds 6 feet in height
- The fence is in a front yard
- The property is in a historic district
- The fence is within a certain distance of a street or sidewalk
Some municipalities require permits for any fence regardless of height. Check with your local building department or zoning office before starting work. The International Code Council (ICC) provides model codes that many jurisdictions adopt.
Property Line Setbacks
Common setback requirements include:
- Rear and side yards: Fence on or near the property line (0-6 inch setback)
- Front yards: 10-25 feet from the street, limited to 3-4 feet tall
- Corner lots: Additional restrictions on sight triangles at intersections
- Easements: No permanent structures within utility or drainage easements
Getting a Property Survey
A professional property survey costs $300-$800 and establishes your exact boundaries with legal precision. This is money well spent because:
- Fence disputes with neighbors are expensive and stressful to resolve
- Moving a completed fence costs more than the survey
- Survey pins may have shifted or been removed over time
- A survey protects you legally if a boundary dispute arises later
Warning
Talk to your neighbors before building. Even if you are building entirely on your property, courtesy requires informing adjacent property owners. Many fence disputes escalate because of surprise, not substance. A 10-minute conversation can prevent months of conflict.
How to Use Our Fence Calculator
Our Fence Calculator streamlines the entire planning process:
- Enter your total fence length in linear feet. Measure along the planned fence line using a tape measure or measuring wheel.
- Select your fence material -- wood, vinyl, chain link, or aluminum -- and the calculator adjusts pricing and post spacing automatically.
- Specify fence height (common options: 4 ft, 6 ft, 8 ft) to determine post length and panel size.
- Add gates -- enter the number and width of walk gates and drive gates.
- Review your material list -- the calculator provides posts, panels, concrete bags, rails, fasteners, and total cost with a detailed breakdown.
The calculator accounts for standard 8-foot post spacing (or 10-foot for chain link), adds corner posts automatically, and includes a 10% material buffer for cuts and waste.
For related yard projects, try our Gravel Calculator for base material, Paver Calculator for patios and walkways, or Soil Calculator for garden beds along your fence line. If you are also building a deck in the same yard, our deck building complete guide covers material estimation and cost planning. For interior renovation projects, our drywall installation guide walks through sheets, mud, and tape calculations.
Frequently Asked Questions
How much does a fence cost per foot?
A fence costs $12-$60 per linear foot for materials depending on the material chosen. Pressure-treated wood is the most affordable at $12-$20 per foot, cedar runs $15-$30, vinyl is $25-$50, and aluminum ornamental fencing costs $25-$45 per foot. Add $5-$20 per foot for professional installation labor. For a quick estimate, use our Fence Calculator to get a detailed cost breakdown based on your specific fence length and material choice.
How deep should fence posts be?
Fence posts should be buried to a depth equal to one-third of the total post length, plus 6 inches for a gravel drainage base. For a standard 6-foot privacy fence using 8-foot posts, that means approximately 32-38 inches deep. In areas with deep frost lines, posts may need to extend below the frost line -- typically 36-48 inches in northern climates. Always check your local building code for minimum depth requirements.
How far apart should fence posts be?
Standard spacing for wood and vinyl fence posts is 8 feet on center. This matches the width of prefabricated fence panels and provides adequate structural support for 6-foot-tall fences. Chain link fence posts are typically spaced 10 feet apart with lighter-gauge line posts between terminal (corner and end) posts. In high-wind areas or for fences taller than 6 feet, reduce spacing to 6 feet for additional strength.
Do I need a permit to build a fence?
Most municipalities require a permit for fences over 6 feet tall, fences in front yards, or fences in historic districts. Some jurisdictions require permits for any fence. Permit costs typically range from $20 to $200. Contact your local building or zoning department before starting. You should also check for HOA restrictions and utility easements. Failure to obtain a required permit can result in fines, mandatory removal, or complications when selling your home.
What is the best fence material for privacy?
Wood (cedar or pressure-treated) and vinyl are the best materials for privacy fencing. Both come in solid-panel designs that block visibility completely. Cedar offers a natural appearance and 20-25 year lifespan. Vinyl provides zero-maintenance privacy that lasts 25-30 years but costs 30-50% more upfront. Board-on-board wood designs, where pickets overlap on alternating sides, provide privacy from every angle while allowing some airflow -- reducing wind load on the fence.
How many bags of concrete do I need per fence post?
For a standard 4x4 fence post set in a 12-inch-diameter, 36-inch-deep hole, you need approximately 2 bags of 50-pound concrete or 1.5 bags of 80-pound concrete. Larger 6x6 posts in 18-inch-diameter holes require 4-5 bags of 50-pound mix. For a 150-foot fence with 21 posts, budget approximately 42 bags of 50-pound fast-setting concrete. Our concrete calculator guide covers concrete volume calculations in more detail.
How long does a wood fence last?
A pressure-treated pine fence lasts 15-20 years with regular maintenance (staining or sealing every 2-3 years). Cedar fences last 20-25 years and require less maintenance because of natural rot resistance. Redwood can last 25-30 years. The biggest enemies of wood fences are ground contact moisture, insect damage, and UV exposure. Setting posts in concrete with a gravel drainage base, keeping sprinklers away from fence boards, and applying a UV-blocking stain significantly extends lifespan.
Can I install a fence on a property line?
In most jurisdictions, you can install a fence directly on the property line, but both property owners then share ownership and maintenance responsibility. Many homeowners choose to set the fence 2-6 inches inside their property line to avoid disputes. A professional property survey ($300-$800) establishes the exact boundary. Some municipalities require specific setbacks from property lines -- check your local zoning code. If you and your neighbor agree to share the cost, get the agreement in writing.
Related Calculators
- Fence Calculator -- Calculate posts, panels, gates, concrete, and total cost for any fence project
- Gravel Calculator -- Estimate gravel for post hole bases, drainage, and landscaping
- Paver Calculator -- Plan patio and walkway materials where your fence meets hardscaping
- Soil Calculator -- Determine fill and topsoil needs for grading along fence lines
Related Articles
- Deck Building Complete Guide -- Plan materials and costs for building a deck alongside your fence project
- Drywall Installation Guide -- Calculate drywall sheets, mud, and tape for interior renovation projects
- How Much Concrete Do I Need? -- Step-by-step guide to calculating concrete for slabs, footings, and post holes
This article provides general estimates for educational purposes. Actual fence costs vary by region, supplier, and project complexity. Material prices fluctuate seasonally and with market conditions. Always obtain multiple contractor quotes and verify local building codes, permit requirements, and property boundaries before starting your fence project. Consult a licensed contractor for projects involving significant grade changes, retaining elements, or structural engineering requirements.
This article is provided for informational and educational purposes only. Content should not be considered professional financial, medical, legal, or other advice. Always consult a qualified professional before making important decisions. UseCalcPro is not responsible for any actions taken based on the information in this article.


