Updated on April 28th, 2026

Fence Calculator

Created By Jehan Wadia

1
Type & Style
2
Dimensions
3
Results
Select Fence Material Type
Wood
Classic & customizable
Vinyl / PVC
Low maintenance
Chain Link
Affordable & durable
Ornamental / Iron
Elegant & strong
Select Wood Fence Style
Solid Board
Privacy, no gaps
Shadowbox
Board-on-board
Stockade
Dog-ear pickets
Picket Fence
Spaced pickets
Rail Fence
Rails only, no pickets
Fence Layout & Dimensions
Total linear feet of fence (perimeter or single run).
Fence Specifications
Standard: 6-8 ft between posts.
0 = flush. Negative = overlap (shadowbox). Positive = gaps.
Usually fence height + 2 ft for burial.
Cost Estimates (Optional — adjust unit prices)
Fence Section Preview
Total Fence Length
150 ft
Total Posts
20
Estimated Material Cost
$2,400
Cost per Linear Foot
$16.00
Itemized Bill of Materials
Category Item Qty Unit Unit Price Total
Cost Breakdown
Project Notes

Introduction

Building a fence is a big project, and knowing how much material you need before you start can save you time and money. This Fence Calculator helps you figure out exactly how many posts, rails, and pickets you need based on the size of your fence. Just enter your fence length, height, and a few other details, and the calculator does the math for you. Whether you are putting up a privacy fence, a picket fence, or a ranch-style fence, this tool takes the guesswork out of planning. It also helps you estimate costs so you can set a budget before you head to the lumber yard. Stop wasting materials and start your fencing project the smart way.

How to Use Our Fence Calculator

Enter your fence type, dimensions, and layout details to get a full materials list and cost estimate for your fencing project.

Fence Material Type: Pick the kind of fence you want to build. Choose from wood, vinyl/PVC, chain link, or ornamental/iron. Each type has different styles, costs, and material needs.

Fence Style: Select a style within your chosen material type. For wood, options include solid board, shadowbox, stockade, picket, and rail. Vinyl and chain link each have their own style choices. The style you pick will set default values for spacing and dimensions.

Layout Input Mode: Choose how you want to enter your fence layout. Use Manual Entry to type in numbers directly, Draw on Canvas to sketch your fence line on a grid, or Map View to find your property by address.

Total Fence Length: Enter the total linear feet of fencing you need. This is the full distance your fence will cover, measured along its entire run or perimeter. If you need help converting measurements, our Square Footage Calculator can assist with area and dimension conversions.

Number of Gates: Enter how many gates you want in your fence. Each gate adds extra posts and hardware to your materials list.

Gate Width: Enter the width of each gate in feet. A standard walk-through gate is about 4 feet wide.

Fence Height: Enter how tall you want your fence in feet. Common heights are 4 feet for picket fences and 6 feet for privacy fences.

Post Spacing: Enter the distance between fence posts in feet. The standard range is 6 to 8 feet for wood fences and up to 10 feet for chain link.

Number of Rails: Select how many horizontal rails run between your posts. Most privacy fences use 3 rails, while shorter fences often use 2.

Picket Width: Enter the width of each picket board in inches. Standard pickets are 5.5 inches wide, but this varies by fence style.

Picket Spacing: Enter the gap between pickets in inches. Use 0 for flush boards with no gaps, a positive number for spaced pickets, or a negative number for overlapping shadowbox styles.

Post Length: Enter the full length of each post in feet, including the part buried underground. This is usually your fence height plus 2 feet for proper burial depth.

Cost Estimates: Adjust the unit price for each material if you want more accurate numbers. Default prices are provided, but you can change them to match your local supplier pricing.

After entering all your details, click Calculate Materials & Cost to see a full bill of materials, an itemized cost breakdown, a cost-per-linear-foot estimate, and a visual chart showing where your money goes.

Fence Calculator – Estimate Materials and Costs for Your Fence Project

Building a fence is one of the most common home improvement projects. Whether you want privacy, security, or just a nice border around your yard, knowing how much material you need and what it will cost is the first step. This fence calculator helps you figure out the number of posts, rails, pickets, panels, concrete bags, and hardware you need based on your specific fence type, style, and dimensions. It also gives you an estimated material cost so you can plan your budget before you start.

Types of Fences You Can Calculate

This tool covers three main types of fencing material:

  • Wood fences are the most popular choice for residential properties. They come in several styles, including solid board (full privacy with no gaps), shadowbox (alternating boards on each side for a finished look from both directions), stockade (dog-ear shaped pickets placed side by side), picket (short spaced boards often used for front yards), and rail fences (horizontal rails with no pickets, common on rural properties). Wood fences are usually built with pressure-treated pine, though cedar and redwood are premium options that resist rot naturally. Use our Board Foot Calculator to estimate lumber quantities if you are purchasing wood in board feet.
  • Vinyl (PVC) fences are a low-maintenance alternative to wood. They do not need painting or staining and resist rot, insects, and weather damage. Vinyl fences come as pre-assembled panels that fit between posts. Styles include privacy, semi-privacy, picket, and ranch rail. They cost more upfront than wood but save money over time because they need almost no upkeep.
  • Chain link fences are the most affordable option and are very durable. They use steel posts, a top rail, and woven wire mesh (called fabric). You can choose galvanized (standard silver), black vinyl-coated (better looking), or commercial grade (heavier wire for extra strength). Chain link fences require several types of fittings, including tension bars, tension bands, brace bands, loop caps, and tie wire.

Key Measurements You Need

Before using this calculator, measure the total length of your fence line in feet. This is the full distance the fence will cover, sometimes called the linear footage. You also need to know how many gates you want and how wide each gate will be. A standard walk-through gate is about 3 to 4 feet wide, while a driveway gate is usually 10 to 16 feet wide. The calculator subtracts the gate openings from your total fence length when figuring out materials.

How Fence Posts Work

Posts are the backbone of any fence. For wood and vinyl fences, posts are usually spaced 6 to 8 feet apart. For chain link, spacing is typically 10 feet. Each post needs to be set in concrete for stability. A general rule is to bury one-third of the post underground, or at least 2 feet deep. In areas with frost, posts should go below the frost line to prevent heaving. Most posts need about two 50-pound bags of concrete each. Our Concrete Calculator can help you determine the exact amount of concrete you need for setting your fence posts.

Understanding Picket Spacing

For wood fences with pickets, the spacing between boards matters a lot. A spacing of zero means the pickets are placed flush against each other with no gaps, which gives full privacy. Positive spacing creates gaps between pickets, like on a traditional picket fence. Negative spacing means the boards overlap, which is how a shadowbox or board-on-board fence is built. Shadowbox fences need about 50% more pickets than a standard solid board fence because boards are attached to both sides of the rails.

Cost Factors to Keep in Mind

The prices shown in this calculator are estimates for materials only. They do not include labor. If you hire a contractor, expect to pay an additional $5 to $15 per linear foot for installation, depending on your area and the fence type. Wood fences generally cost $10 to $25 per linear foot for materials. Vinyl runs $20 to $40 per foot. Chain link is the cheapest at $7 to $15 per foot. Lumber prices can change a lot depending on the season and market conditions, so always check with local suppliers for current pricing. If your fence project is part of a larger construction effort, you may also want to use our Decking Calculator for adjacent deck builds, our Retaining Wall Calculator for terrain grading needs, or our Paint Calculator if you plan to stain or paint your new wood fence.

Tips for a Successful Fence Project

Before you build, call 811 (in the United States) to have underground utility lines marked for free. Check your local building codes and HOA rules because many areas have height limits, setback requirements, and rules about which side of the fence faces your neighbor. Always buy 5 to 10 percent extra material to account for waste, mistakes, and odd cuts. This calculator already includes a small waste factor in its estimates, but having a little extra on hand is always smart.

If you are also working on other outdoor projects alongside your fence, consider using our Paver Calculator for walkways or patios, our Gravel Calculator for driveway or drainage projects, our Pea Gravel Calculator for decorative ground cover along your fence line, or our Concrete Block Calculator if you are building a combination fence with a block base. For landscaping around your new fence, check out our Mulch Calculator, Topsoil Calculator, or Grass Seed Calculator to help restore your yard after the build.


Frequently Asked Questions

How many fence posts do I need?

Divide your total fence length by your post spacing, then add 1. For example, a 150-foot fence with 8-foot post spacing needs about 20 posts (150 ÷ 8 = 18.75, rounded up to 19, plus 1 = 20). Add 2 extra posts for each gate opening. Corner posts count as part of your total.

How deep should fence posts be buried?

Fence posts should be buried at least 2 feet deep. A common rule is to bury one-third of the total post length. For a 6-foot fence, use 8-foot posts so 2 feet go underground. In cold areas, dig below the frost line to stop posts from shifting when the ground freezes and thaws.

How many bags of concrete do I need per fence post?

Most fence posts need about 2 bags of 50-pound concrete each. This fills a standard post hole that is about 10 inches wide and 24 inches deep. Larger posts or deeper holes may need 3 bags. The calculator figures this out for you based on your total post count.

What is the difference between a solid board fence and a shadowbox fence?

A solid board fence has all pickets on one side with no gaps, giving full privacy. A shadowbox fence has boards on both sides of the rails, staggered so they overlap slightly. This looks finished from both sides but uses about 50% more pickets than a solid board fence.

Does this calculator include labor costs?

No. This calculator estimates material costs only. If you hire a contractor, expect to pay an extra $5 to $15 per linear foot for labor, depending on your location and the type of fence. The total you see covers posts, rails, pickets or panels, concrete, hardware, and gates.

How do I measure my total fence length?

Use a tape measure or a measuring wheel to measure along the exact path where you want the fence to go. Measure the full distance in feet, including all straight runs and turns. Do not include gate openings in your fence length — the calculator subtracts those automatically based on the number and width of gates you enter.

What is the best post spacing for a wood fence?

Most wood fences use 6 to 8 feet between posts. Eight feet is the most common because standard lumber comes in 8-foot lengths, so rails fit perfectly between posts. If you live in a windy area or want extra strength, use 6-foot spacing instead.

How wide should a fence gate be?

A standard walk-through gate is 3 to 4 feet wide. This is enough for a person or a wheelbarrow. For a driveway gate or equipment access, make the gate 10 to 16 feet wide. You may need a double gate for wider openings.

Why does the calculator add a waste factor?

Building always involves some waste from cuts, mistakes, and boards that are warped or damaged. The calculator adds about 5 to 10 percent extra material so you do not run short during your project. It is cheaper to buy a few extra pieces upfront than to make a separate trip to the store later.

Is vinyl fencing cheaper than wood fencing?

No. Vinyl costs more upfront, usually $20 to $40 per linear foot for materials compared to $10 to $25 for wood. However, vinyl never needs painting, staining, or sealing. Over 10 to 20 years, vinyl can cost less overall because maintenance costs are almost zero.

What is the cheapest type of fence to build?

Chain link is the cheapest fence type, costing about $7 to $15 per linear foot for materials. Galvanized chain link is the most affordable option. It is very durable but does not provide privacy unless you add slats or screening.

How do I use the canvas drawing tool?

Switch to the Draw on Canvas mode in Step 2. Click on the grid to place fence posts. Each click adds a point. Double-click to finish a fence segment. Use the Place Gate button to add gates along existing segments. The grid shows scale, and the calculator automatically measures your drawn fence length in feet.

How many rails does a fence need?

Most privacy fences that are 6 feet tall use 3 horizontal rails. Shorter fences, like 4-foot picket fences, usually need only 2 rails. Very tall fences (8 feet or more) may need 4 rails to keep the pickets from warping or bowing.

What does negative picket spacing mean?

Negative picket spacing means the boards overlap. This is used for shadowbox and board-on-board fence styles. For example, a spacing of -1.5 inches means each board overlaps the next by 1.5 inches. This creates a fence that looks good from both sides but requires more pickets.

Can I change the material prices in the calculator?

Yes. In Step 2, there is a Cost Estimates section where you can change the unit price for every material. The default prices are average estimates. Update them with prices from your local supplier to get a more accurate total cost for your project.

What are terminal posts and line posts in chain link fencing?

Terminal posts are the heavy-duty posts used at corners, ends, and gate openings. They are thicker and stronger because they anchor the chain link fabric. Line posts are the lighter posts spaced evenly between terminal posts. They hold the fabric up but do not bear as much tension.

How accurate is this fence calculator?

This calculator gives a close estimate based on standard building practices. Actual material needs can vary based on your terrain, local building codes, and exact layout. The built-in waste factor helps cover small differences. Always double-check measurements on site before buying materials.