Free to use No registration 100% private Instant results Metric & Imperial
✅ Free to use✅ No registration required✅ Metric & Imperial✅ Instant results

Fence Calculator

Estimate the number of posts, panels, rails, and concrete needed for your fence project. Get a cost breakdown by material type.

How to Use This Fence Calculator

Our fence calculator helps you estimate all the materials you need for your fencing project. Enter your fence dimensions, choose your material type, and get instant estimates for posts, panels, rails, concrete, and total cost.

  1. Enter fence length — Measure the total linear distance of your fence line in feet or meters.
  2. Set post spacing — The default is 8 feet, which works for most wood and vinyl fences. Chain link fences can use 10-foot spacing.
  3. Choose fence height — 6 feet is standard for privacy fences. 4 feet is common for decorative fences.
  4. Set panel width — Standard panels are 6 or 8 feet wide. The calculator adjusts the number of sections accordingly.
  5. Specify gates — Add gate openings to reduce the number of posts and panels needed.
  6. Adjust post depth — The default of 36 inches works for most climates. In cold regions, posts should extend below the frost line.

Fence Material Comparison

MaterialCost/Linear FtLifespanMaintenanceBest For
Wood$15-3010-20 yearsHigh (staining/painting)Classic look, budget-friendly
Chain Link$10-2015-20 yearsLowSecurity, pets, budget
Vinyl$20-4020-30 yearsVery lowLow maintenance, durability
Composite$25-4525-30+ yearsVery lowPremium look, eco-friendly

Fence Height Regulations

Most residential areas have specific height requirements for fences. Here are common standards:

Fence TypeTypical HeightNotes
Privacy fence6 ftMost common; check local codes for maximum allowed
Decorative/picket3-4 ftUsually allowed in front yards
Pet fence4-6 ftHeight depends on pet size and breed
Pool fence4-5 ftRequired by code in most jurisdictions; must be non-climbable
Security fence6-8 ftMay require special permits above 6 ft

Post Depth Guidelines

Proper post depth is critical for fence stability. Posts that are too shallow will lean or fall over time, especially in windy conditions or soft soil.

  • General rule — Set posts at least 1/3 of the above-ground fence height. For a 6-foot fence, bury at least 2 feet of post.
  • Frost line — In cold climates, posts must extend below the frost line to prevent heaving. Common depths: 36-42 inches in northern states, 24-30 inches in southern states.
  • Soil type — Sandy or loose soil requires deeper posts. Clay soil provides more stability but can expand and contract with moisture changes.
  • Concrete collars — Use 2-3 bags of quick-set concrete per post for maximum stability. Taper the concrete above grade to shed water away from the post.

Neighbor Boundary & Legal Considerations

Building a fence near property lines requires careful planning to avoid disputes:

  • Check property lines — Have your property surveyed before building. Fence placement errors can result in costly legal disputes and required removal.
  • Good neighbor policy — Many jurisdictions require the "finished" side of the fence to face outward toward neighbors. Some areas require shared cost agreements for boundary fences.
  • Setback requirements — Most areas require fences to be set back 2-6 inches from the property line. Some HOAs require larger setbacks.
  • Easements — Check for utility easements on your property. Fences may not be allowed in easement areas, or may need to be removable for utility access.
  • Height restrictions — Front yard fences are typically limited to 3-4 feet. Backyard fences can usually be 6 feet. Side yard fences may have different limits.

Do You Need a Fence Permit?

Most municipalities require permits for fence construction, especially for fences over 6 feet tall or those along property boundaries. Common requirements include:

  • Fence permit application (typically $20-100)
  • Property survey or plot plan showing fence location
  • Material specifications and fence height
  • Neighbor notification in some areas
  • HOA approval if applicable

Contact your local building department or zoning office to determine specific requirements in your area. Fences built without required permits may need to be removed or modified at your expense.

Cost Breakdown by Fence Type

Fence costs vary significantly by material, height, and local labor rates. Here is what you can expect to pay per linear foot for materials and installation:

MaterialMaterials OnlyInstalledDIY Savings
Pressure-treated wood$8-15/ft$15-30/ft40-50%
Cedar wood$12-20/ft$20-35/ft40-50%
Chain link$5-10/ft$10-20/ft50%
Vinyl$12-25/ft$20-40/ft35-45%
Composite$15-30/ft$25-45/ft35-45%

Fence Engineering: Building a Boundary That Lasts

A fence is one of the few structures on a residential property that must simultaneously resist wind loads, soil movement, moisture decay, and impact forces — all while remaining visually appealing and code-compliant. The American Society for Testing and Materials (ASTM) and the International Code Council (ICC) publish standards that govern fence materials, post depth, and wind load requirements, yet thousands of fences fail prematurely every year because builders skip the engineering fundamentals. Understanding the structural, material, and code factors that govern fence performance is the difference between a fence that lasts 5 years and one that lasts 25.

Post Embedment Depth and Frost Heave

Post depth is the single most important factor in fence longevity. The American Fence Association (AFA) recommends burying posts at least one-third of the above-ground height plus 6 inches — so a 6-foot fence requires at least 30 inches of embedment (24 inches for one-third height, plus 6 inches for gravel drainage). In cold climates where the ground freezes, posts must extend below the local frost line to avoid frost heave. Frost heave occurs when freezing water in the soil expands and lifts the post upward, eventually tilting or pulling the post out of the ground.

Frost depth varies dramatically by region: 12-18 inches in the southern U.S., 24-36 inches across the Midwest and Mid-Atlantic, and 48-60 inches in New England, Minnesota, and mountain regions. Local building departments publish frost depth maps that should be consulted before digging. Posts installed above the frost line in cold climates will tilt within 1-3 winters. Concrete collars (the bell-shaped base of the concrete footing) provide additional resistance to heave by creating a wider base at the bottom of the hole.

For sandy or loose soils, deeper embedment or wider concrete footings compensate for poor soil bearing capacity. The minimum post hole diameter is three times the post diameter — a 4×4 wood post (3.5" actual) requires a 10-12 inch hole, while a 6×6 post needs a 14-16 inch hole. In clay soils that drain poorly, add 6 inches of gravel at the bottom of the hole to prevent water pooling around the post base, which accelerates decay.

Wind Load Engineering for Privacy Fences

Privacy fences — solid panels 6 feet or taller — act as sails in the wind, and the posts must resist significant lateral loads. The International Building Code (IBC) Section 1609 specifies wind load design for buildings, but the same principles apply to fences. A 6-foot solid fence in a 90 mph wind zone experiences approximately 20-30 pounds per square foot of lateral pressure, which translates to about 720-1080 pounds of force on each 8-foot panel section. The posts and footings must be sized to resist this force without failing.

In high-wind regions (Florida, the Gulf Coast, mountain passes), solid privacy fences may be prohibited or require engineered designs. Wind-permeable designs like shadowbox (alternating boards on each side of the rail), picket fences with gaps, or lattice-top panels reduce wind load by 40-60%. The AFA recommends gaps of at least 1/4 inch between boards in any region prone to wind gusts above 70 mph. Vinyl fence manufacturers often publish wind ratings — premium vinyl fences are rated to 110-130 mph when installed per the manufacturer's specifications.

Post spacing is the primary variable for wind resistance. Standard 8-foot spacing works for most wood and vinyl fences in normal wind zones. For fences in exposed locations (open fields, hilltops, coastal areas), reduce post spacing to 6 feet. Steel posts (Schedule 40 galvanized) provide 2-3x the wind resistance of wood posts at the same embedment depth, which is why commercial chain link fences use steel exclusively.

Material Selection: Wood, Vinyl, Composite, and Metal

Each fence material has distinct performance characteristics that affect both initial cost and lifetime maintenance. Pressure-treated southern yellow pine remains the most popular wood fence material because it's inexpensive ($8-15 per linear foot for materials) and widely available. Treated with copper-based preservatives (ACQ or MCQ), PT pine resists rot and insect attack for 15-20 years when properly installed and maintained. However, it requires staining or sealing every 2-3 years to prevent checking, warping, and UV damage.

Cedar and redwood are naturally rot-resistant due to extractives in the heartwood. Western Red Cedar is the premium wood fence material, lasting 20-25 years with proper maintenance. Cedar costs about 50% more than PT pine but ages to an attractive silver-gray patina without treatment. Redwood is even more durable (25-30 years) but costs 2-3x PT pine and is primarily available on the West Coast. Both cedar and redwood should be sealed every 3-5 years to maintain color and prevent surface checking.

Vinyl (PVC) fences have grown from 5% market share in 2000 to over 25% today. They require no painting or staining, never rot, and last 20-30+ years. However, vinyl expands and contracts significantly with temperature changes (up to 1/4 inch per 8-foot panel in direct sun), requiring specialized installation that accommodates movement. Premium vinyl fence systems use thicker walls (0.150" or greater), internal aluminum reinforcement for rails, and titanium dioxide UV stabilizers that prevent yellowing. Composite fences (wood fiber + recycled plastic) combine the look of wood with the durability of vinyl but cost 30-50% more than vinyl.

Property Lines, Permits, and Legal Considerations

Before building any fence, three legal documents must be reviewed: your property survey, local zoning ordinances, and any HOA covenants. The property survey, typically provided at closing, shows the exact location of property lines and any easements. Building a fence on a neighbor's property — even by a few inches — can result in a court order to remove the fence at your expense, plus legal fees. Many disputes between neighbors begin with fence placement, so consider hiring a surveyor to mark the property line if there's any ambiguity.

Zoning ordinances typically regulate fence height, setback from property lines and street corners, and acceptable materials. Front yard fences are usually limited to 3-4 feet in height, while side and rear yards may allow 6-8 feet. Corner lots often have additional restrictions to maintain traffic sight lines — fences within 15-25 feet of an intersection may be limited to 3 feet tall. Some municipalities prohibit certain materials (barbed wire, electrified fencing, chain link in front yards) in residential zones.

HOA covenants may be more restrictive than zoning, dictating fence color, style, material, and even orientation (which side faces out). Building a fence without HOA approval can result in fines and a court order to remove the fence. Always submit fence plans to the HOA architectural review committee before beginning work. Boundary fence laws in many states also require neighbors to share the cost of fences built on property lines — check your state's specific "partition fence" statute before approaching a neighbor about cost-sharing.

Concrete Footings and Post Setting

Concrete footings are essential for fence stability, but the type of concrete and installation method matter as much as the depth. Fast-setting concrete (like Quikrete Fast-Setting or Sakrete Fast Setting) cures in 20-40 minutes and is ideal for fence posts because it eliminates the wait time before attaching rails and panels. Standard concrete takes 24-48 hours to cure sufficiently for fence loading. For a typical 4×4 post set 30 inches deep in a 12-inch diameter hole, you need approximately 2.5 bags of 50-lb concrete (or 1.5 bags of 80-lb).

A common mistake is using dry-pour concrete — dumping dry mix into the hole and adding water on top. This method leaves dry pockets in the mix, producing weak, porous concrete that fails within a few years. Always mix concrete with water to a uniform consistency before pouring. For best results, use a slope-topped concrete footing — shape the top of the concrete so it slopes away from the post, preventing water from pooling at the post base. This simple detail adds 5-10 years to wood post lifespan.

For sandy or high-drainage soils, an alternative to concrete is tamped crushed stone (3/4 inch minus gravel). This method allows water to drain freely away from the post, eliminating the moisture that causes decay. Tamped stone is appropriate for non-load-bearing fences in well-drained soils but is not recommended for solid privacy fences or for posts subject to wind loads. Some premium fence installers use both — a concrete collar below grade for structural support, with gravel at the surface for drainage.

Maintenance and Lifespan Extension

Proper maintenance can extend fence life by 50-100%. For wood fences, the most critical maintenance is keeping the wood dry and protected from UV. Apply a semi-transparent penetrating oil stain every 2-3 years for the first 10 years, then every 4-5 years as the wood weathers. Solid-color stains last longer (5-7 years) but hide the wood grain. Paint is not recommended for fences because it cracks and peels, requiring extensive scraping before recoating. Always stain fences in spring or fall when temperatures are 50-90°F and humidity is below 70%.

For vinyl fences, maintenance is mostly cleaning. Wash with mild soap and water annually to remove dirt, mold, and pollution stains. Avoid pressure washing above 1500 PSI — the stream can etch the vinyl surface. For tough stains (rust, hard water, paint overspray), use a dedicated vinyl fence cleaner like SuperDeck or Spray & Forget. Never use solvents like acetone or lacquer thinner — they dissolve the PVC. Minor scratches can be buffed out with automotive polishing compound.

Inspect fences annually for loose posts, broken boards, and rusted fasteners. Replace damaged components promptly to prevent the damage from spreading — a single broken board can stress adjacent posts and rails, accelerating overall fence failure. For metal fences (chain link, aluminum, wrought iron), check for rust annually and treat affected areas with a rust converter (like Loctite Extend) followed by rust-inhibiting paint. Properly maintained metal fences can last 30-50+ years.

Frequently Asked Questions

How far apart should fence posts be?

For most wood, vinyl, and chain link fences, 8 feet is the standard post spacing. Chain link fences can sometimes use 10-foot spacing, while some vinyl fence systems allow up to 10 feet between posts.

How deep should fence posts be set?

Fence posts should generally be set at least one-third the height of the fence above ground. For a 6-foot fence, posts should be buried 24-36 inches deep. In cold climates, posts should extend below the frost line, typically 36-42 inches.

How much concrete is needed per fence post?

A standard 4-inch diameter post set 36 inches deep requires approximately 0.03 cubic feet of concrete per post. For a 6-inch diameter post, you will need about 0.07 cubic feet per post. Most contractors use two 50-lb bags of concrete per post.

What is the standard fence height?

The most common residential fence height is 6 feet for privacy fences. Decorative or picket fences are typically 3-4 feet tall. Some areas allow 8-foot fences, but check your local zoning regulations as many municipalities have height restrictions.

Do I need a permit to build a fence?

Most municipalities require a fence permit, especially for fences over 6 feet tall or those on property boundaries. Contact your local building department to determine permit requirements. Some HOAs also have specific fence rules regarding materials, colors, and heights.

How much does it cost to build a fence per linear foot?

Fence costs vary by material: wood fences cost $15-30 per linear foot, chain link costs $10-20, vinyl costs $20-40, and composite costs $25-45. These prices include materials and basic installation. Premium materials or complex terrain can increase costs significantly.

Which fence material lasts the longest?

Vinyl and composite fences typically last the longest, with lifespans of 20-30+ years. Chain link fences last 15-20 years with minimal maintenance. Wood fences last 10-20 years depending on the wood type and maintenance, with cedar and redwood lasting longer than pressure-treated pine.

Related Calculators

Plan every component of your fencing project — from footings to finish — with these complementary construction calculators.

References & Sources

The information in this guide is based on industry standards, model building codes, and best practices from leading fence and construction authorities.

  • American Fence Association (AFA) — "Fence Installation Best Practices Manual" and "Post Embedment and Concrete Footing Guidelines." AFA is the leading trade association for professional fence contractors, providing certification, training, and engineering data used throughout North America.
    americanfenceassociation.com
  • International Code Council (ICC) — "International Residential Code (IRC), Section R317: Protection of Wood and Wood-Based Products" and "International Building Code (IBC), Section 1609: Wind Loads." ICC develops the model codes governing fence height, material protection, and wind load design adopted by most U.S. jurisdictions.
    iccsafe.org
  • ASTM International — "ASTM F567: Standard Practice for Establishing and Controlling Installation Tolerances for Chain-Link Fence" and "ASTM F2408: Standard Specification for Ornamental Fences." ASTM develops the material and installation specifications referenced by fence manufacturers and building codes.
    astm.org
  • This Old House — "How to Build a Wood Fence: Complete Step-by-Step Guide." This Old House's contractor team publishes photo-illustrated tutorials vetted by licensed builders with decades of fencing and outdoor construction experience.
    thisoldhouse.com
Disclaimer: Fence material calculations assume 8-foot post spacing. Local building codes may dictate maximum post spacing and height restrictions. Always call 811 (Call Before You Dig) before installing fence posts to locate underground utilities.
B
BuildFormulas Editorial Team
Construction Content Editors

The BuildFormulas Editorial Team comprises construction industry writers and estimation specialists who create practical, accurate building calculators and guides. Our construction content is reviewed by the BuildFormulas Construction Engineering Panel to ensure calculations align with current building codes and industry best practices.

Reviewed by BuildFormulas Construction Engineering Panel, Technical Review
Last updated: February 2025