Fence

Updated August 2026 · Written by Hussnain Mustafa

A fence calculator estimates how many posts, rails, and pickets (or panels) a fence project needs, based on the total length, style, and post spacing you enter. Use the tool above to get a materials list and a cost estimate for wood, vinyl, chain link, aluminum, or wrought iron fencing in under a minute.

Fence Calculator

Fence type

Dimensions

ft
ft

Layout

ft
ea

Board sizing

in
in

Waste & footings

%
bags
Pricing (optional)
$
$
$
$
$
$
0 ftLength
0Sections
0Posts
0Concrete bags
0Boards

Material takeoff

ItemQtyEst. cost
Estimated total

How to Use This Fence Calculator

  1. Enter your fence length. Measure each straight section separately and add them together rather than guessing at a total.
  2. Choose your fence type. Wood, vinyl, chain link, aluminum, and wrought iron all use different post spacing and material counts, so the type you pick changes the results.
  3. Set your post spacing. The default is 8 feet on center. Adjust it if your fence style, height, or manufacturer specs call for something tighter.
  4. Add your gate count and width. The calculator subtracts the right number of posts and materials for each opening.

You’ll get an instant post count, rail and picket totals, and an estimated cost range based on your inputs.

How Many Fence Posts Do You Need?

The formula is straightforward: divide your fence length by the post spacing, round up to the nearest whole section, then add one post to close out the run. Corners and gates each need an extra post.

Posts = (fence length ÷ post spacing, rounded up) + 1

Here’s what that looks like at the standard 8-foot spacing, for a straight run with no corners or gates:

Fence lengthSectionsPosts needed
50 ft78
100 ft1314
150 ft1920
200 ft2526

Add one post for every corner, and two posts for a single gate opening (one on each side of the gate). If your yard has multiple corners or more than one gate, the calculator above accounts for that automatically. This table is just for a quick sanity check.

Fence Post Spacing & Depth

Spacing depends on the fence type. Wood and vinyl privacy fencing typically run posts 6 to 8 feet apart on center. Chain link often stretches line posts further, sometimes 10 feet, since the mesh itself carries tension between them. Ornamental aluminum and wrought iron usually ship as fixed-width panels (commonly 6 or 8 feet), so the panel sets your spacing rather than the other way around.

Depth matters as much as spacing. As a general rule, bury about one-third of the post’s total length, so a 6-foot post supporting a 4-foot fence goes 2 feet into the ground. In colder climates, dig below your local frost line regardless of what that math says, since frost heave will push a shallow post up and out of alignment over a few winters. Frost depth swings enormously by region: it’s close to 0 inches across Florida, southern Arizona, and southern California, runs roughly 24 to 42 inches through the Midwest and mid-Atlantic, and climbs past 48 inches in the northern tier, New England, and the Mountain West. Look up your county’s exact required footing depth before digging. It’s a building-department number, not a fence-calculator one, and it can vary by 20 inches or more within a single state.

Corner, end, and gate posts carry more lateral load than line posts. Set them deeper, in a wider concrete footing, and consider a larger post size for those specific spots even if your line posts are standard.

How Much Fence Material Do You Need?

Rails

Most privacy fences use two horizontal rails per section on a 4-foot fence, and three on a 6-foot or taller fence (top, middle, bottom), running between each pair of posts.

Pickets and boards

For a standard dog-ear or board-on-board style, figure roughly one picket per 5.5 to 6 inches of run, including the gap between boards. That puts a 100-foot fence at around 200 pickets. Add 10% on top of the raw number to cover cuts, splits, and the odd bad board.

Pre-fab panels

If you’re buying pre-built 6- or 8-foot panels instead of assembling board-by-board, the math is simpler: panels needed equals fence length divided by panel width, rounded up, with one post at every panel joint. Panels cut installation time significantly but usually cost more per linear foot than raw lumber, and they don’t flex well for odd-length runs, so you may end up trimming or special-ordering a shorter panel to close the gap.

Fence Cost by Type

Fence typeInstalled cost per linear foot
Chain link$8 – $40 (typical projects land closer to $10–$20)
Wood picket, rail, or solid board$8 – $20
Wood privacy (cedar or pine)$10 – $30
Vinyl$15 – $40
Aluminum$22 – $72
Wrought iron$35 – $85, depending on style

Source: Angi’s 2026 national fence-installation cost data, by material. These are national averages for standard residential fencing 4 to 6 feet tall; confirm against two or three local quotes before you set a budget. Region, exact height, gate count, and site conditions (slope, tree roots, old fence removal) all move the number, sometimes by a lot.

DIY vs. Professional Installation

DIYProfessional
CostMaterials only, roughly 30–50% of the installed price above (Angi puts labor at up to half the total project cost, so the DIY share depends heavily on material)Full installed price shown in the cost table above
Time (100 ft, straight run)A weekend for one or two people, longer if you’re waiting on concrete to cureTypically 1 to 2 days
Tools neededPost-hole digger or gas auger, level, string line, circular saw, drill, concrete mixing tubContractor supplies all equipment
Permit handlingYou pull the permit and schedule any required inspectionMost contractors pull the permit and handle inspection as part of the job

Going DIY saves the most on labor-heavy styles like wood privacy fencing, where labor is a large share of the installed price. It saves less on chain link, which is already fast to install professionally, and it’s rarely worth it on wrought iron, where welding and heavy panels usually call for a crew.

Measuring an Irregular or Sloped Yard for Fencing

Measuring an Irregular or Sloped Yard for Fencing

Break the perimeter into straight segments at every point the direction changes, measure each one separately, and add them together. Don’t try to eyeball a curve or a wide angle as a single measurement. It’s rarely accurate.

For sloped ground, you have two options. Stepped panels stair-step down the slope in fixed sections, keeping the top rail level at each step. It’s the simpler and cheaper approach for wood and chain link. Raked (or racked) panels angle the whole section to follow the grade continuously, which looks more consistent from a distance but needs slope-rated panels and is more common with vinyl.

Mark your corners with stakes first, then run a string line between them and measure along the string, not along the ground. On a slope, measuring along the ground surface overstates how much fence material you actually need. Once you have the total, enter it as a single combined length. The calculator doesn’t need the individual angles, just the sum of the straight runs.

Gates, Corners & Concrete

Gate widths

A standard walk gate runs 3 to 4 feet wide, with 4 feet being the most common residential size since it clears foot traffic and a push mower. A single drive gate, wide enough for a car or small vehicle, typically runs 10 to 12 feet. A double drive gate, sized for a truck or trailer, usually spans 20 to 24 feet (in effect, two single gates hung together). Confirm the exact opening against your gate manufacturer’s hardware spec before ordering, since hinge and post clearance shave a couple of inches off the nominal size.

Corner and gate posts

These carry more load than a standard line post, so they’re commonly upsized (a 5×5 post where the rest of the fence uses 4×4, for example) and set in a wider, deeper footing.

Concrete

Most standard 4×4 line posts take one to two 50-lb bags of quick-setting concrete per hole, based on a typical 8- to 10-inch diameter hole 24 to 30 inches deep. Larger corner, end, and gate posts (often set in 6×6 lumber) need two to three bags, since they use a wider hole and carry more load. Those figures hold up consistently across major DIY and concrete-calculator references, but they still assume a standard hole; oversized or unusually deep holes take more. Let the concrete cure for the time printed on the bag, usually 24 to 48 hours, before hanging rails, panels, or gate hardware on top of it.

One practical note worth factoring into your material choice: a wood post buried directly in concrete tends to rot at the concrete line before any other part of the fence fails. A galvanized metal post, either freestanding or sleeved inside a wood post, sidesteps that failure point and typically outlasts an all-wood build by a wide margin.

Do I Need a Permit?

Many municipalities require a permit for fences over a certain height, often 6 feet, or for any fence built on or near a property line. Permit fees for small residential jobs like fencing typically run $50 to $300, with a national average landing around $170 across surveyed U.S. cities, though specific cities range from under $30 to over $800. Requirements vary widely by city and county, so check with your local building or zoning office, or ask your contractor to confirm as part of the quote, before you dig a single post hole.

Frequently Asked Questions

How many posts do I need for 100 feet of fence?

At standard 8-foot spacing, a straight 100-foot run needs 14 posts. Add one for each corner and two for a single gate opening.

How far apart should fence posts be?

Most wood and vinyl privacy fences use posts spaced 6 to 8 feet apart, on center. Chain link often runs wider, and aluminum or wrought iron panels set the spacing at their fixed panel width.

How much does a 100-ft, 150-ft, or 200-ft privacy fence cost?

Using the $10 to $30 per linear foot range for wood privacy fencing (Angi 2026 data): 100 feet runs about $1,000 to $3,000 installed, 150 feet runs about $1,500 to $4,500, and 200 feet runs about $2,000 to $6,000. Vinyl or metal privacy fencing costs more; check the cost-by-type table above and confirm against current local quotes.

How many fence boards or pickets do I need?

Figure about one picket per 5.5 to 6 inches of run for a standard dog-ear or board-on-board style, so a 100-foot fence needs roughly 200 pickets, plus 10% extra for cuts and waste.

What is a linear foot of fence?

A linear foot is one foot measured along the fence line, regardless of height. It’s the standard unit fence contractors and calculators use for pricing and materials, since it measures length without factoring in height separately.

How do I calculate linear feet for an L-shaped or irregular yard?

Measure each straight segment of the perimeter separately, then add the segments together. Measuring diagonally across a corner undercounts the actual fence length you’ll need to buy.

Related Calculators

ToolCalcPro Footer Preview