Fence Calculator, Post Spacing & Cost

Planning a fence means counting posts, rails and pickets, a tedious job that is easy to get wrong by hand. This free fence post spacing calculator takes your fence length and works out the whole materials list for you: perfect post spacing, how many posts and rails you need, how many pickets will cover the run, and what it all costs. It follows the way a real wood fence goes up, so you can sanity check a contractor's quote or plan a weekend build before you order a single board.

Last updated: October 22, 2026

ft

ft

ft 8 ft is standard; use 6 ft on windy or sloping ground.

in

in Leave at 0 for a solid privacy fence.

$

$

$

The formula

  • Sections = fence length ÷ post spacing, rounded up
  • Posts = sections + 1
  • Rails = sections × rails per section
  • Pickets = (fence length × 12) ÷ (picket width + gap), rounded up
  • Total cost = (posts × post price) + (rails × rail price) + (pickets × picket price)

A worked example

A 100 ft fence at 6 ft high with posts every 8 ft needs 13 sections, so 14 posts and 26 rails at two rails per section. With 5.5 in pickets and no gap you need 219 pickets. At $12 a post, $7 a rail and $3.20 a picket the materials come to $1,050.80, or about $10.51 per linear foot.

More about the Fence Calculator

Posts, pickets and the spacing that matters

Here is how the numbers fall into place on a real fence. A 100 ft run at 6 ft high, posts every 8 ft: that gives 13 sections, so 14 posts, plus 26 rails at two per section. The pickets, 5.5 in wide with no gap, come to 219 for the run. Priced at $12 a post, $7 a rail and $3.20 a picket, you are looking at $1,050.80 in materials, about $10.51 per linear foot. Carry that figure to the lumber yard, or hold it up against whatever a contractor quotes you.

The calculator follows the same order you would build in: posts go in first, evenly spaced, set deep in concrete, then rails spanning each section (two per section on a 6 ft fence, three if it is taller), then pickets closing up the face. Plan your gates before you start counting: every gate opening needs two stout posts and its own hardware. Corners each take an extra post too. None of this is hard, honestly. It is just arithmetic. Tedious arithmetic, which is exactly what the calculator is for.

Setting posts that stay straight

A few habits separate fences that stand straight from fences that lean. Set every post in concrete, tamping dirt back into the hole is how the five year lean starts. Crown the concrete a touch above ground level so rainwater runs off instead of pooling against the wood. And buy posts pressure treated for ground contact, not just generic treated lumber, the stamp on the tag matters. One last thing before you dig: call your utility locator. Post holes and buried lines are a mix nobody wants.

A couple of honest limits: the numbers assume a straight run with even spacing and wood construction. Slopes need stepping or racking (which changes the picket count), curves need shorter sections, and gates, corners and tearing out an old fence sit outside these counts. Prices are materials only, and lumber prices move around, grab fresh numbers from your supplier. For a ballpark installed price, double the materials figure, then get two quotes anyway.

A 60 foot garden run worked end to end

Suppose you are fencing a 60 foot garden run, 6 feet high, with posts every 6 feet and pickets butted with a half inch gap. The run divides into 10 sections, so you need 11 posts, counting both ends. Two rails per section gives 20 rails. Each picket covers 5.5 inches of width plus its 0.5 inch gap, so 6 inches per picket, and 720 inches of run divided by 6 means 120 pickets exactly.

Now price that list before you shop. At $14 a post the posts cost $154, at $8 a rail the rails cost $160, and at $3.50 a picket the pickets cost $420, for a materials total of $734, or about $12.23 per linear foot. Running the numbers this way first means a supplier quote that lands far above $734 has to justify itself item by item, not just sound plausible.

Stepped panels versus racked sections on sloping ground

On a slope you choose between stepping and racking. Stepped fencing keeps every section level and drops it down in steps, like stairs. It suits prefabricated panels, which cannot twist, but it leaves triangular gaps under the low end of each panel that matter if you are keeping a small dog in or a determined one out. Measure the run in level sections and expect the uphill post of each step to need extra height.

Racked fencing lets rails and pickets follow the slope itself, so the top line runs parallel to the ground and no gaps open underneath. It suits individual pickets nailed to rails on site, because each picket can be cut or set to a slightly different length. For the calculator, racking changes little in the post count, but it does argue for ordering pickets a little long and trimming them in place.

Ordering extra without quietly wasting money

The classic fence mistakes happen at the order stage, not the digging stage. People forget to subtract the gate opening from the picket run, then wonder why a stack of pickets survives the job. Others count a shared corner post twice when two runs meet, or order rails by the section without checking whether their supplier sells the length their spacing actually needs, forcing every rail to be cut from a longer board.

A modest damage allowance is still wise, because pickets arrive warped and posts split. On the 120 picket run above, adding 5 percent means ordering 126 pickets, six spares, which at $3.50 each is $21 of insurance against a second trip. Keep the allowance deliberate and written down, though. A vague habit of adding a bit everywhere compounds until you have paid for a second, imaginary fence.

When the delivery arrives, store the pickets flat, stacked on a few offcuts so air can move underneath, and keep them out of standing water and harsh all day sun until you fix them. Pickets left leaning against a wall for a fortnight can bow before they ever reach the fence, and a bowed picket is waste you manufactured yourself, not a fault in the original calculation or the timber.

2026 fence prices per foot, by material

Installed prices in 2026 cluster in clear bands: chain link $15, $40 per linear foot, wood pine $17, $45, cedar $20, $55, vinyl $25, $60, aluminium $25, $55, and wrought iron $30, $75. Most homeowners land between $25 and $45 a foot all in. Materials alone, the DIY number, run roughly 35 to 45% of the installed price, which is exactly what the two modes above let you compare.

The ranges are wide because labour rates, height and terrain move every quote. The calculator's default prices sit mid range for 2026, so they are a sane starting point, but swap in your own per foot numbers from local suppliers or quotes whenever you have them. Need the actual materials list too? Our <a href="/fence-calculator/">fence post spacing calculator</a> counts your posts, rails and pickets from the same fence length.

Materials vs labour: where the money actually goes

Labour is the quiet giant of every fence bill, typically 55 to 65% of the installed price. Digging post holes, mixing concrete, setting posts plumb, hauling panels and cleaning up is slow, physical work, and that is what you are paying for. It is also why a DIY build can nearly halve the total: the materials are the smaller half of the maths.

That said, a pro earns the money on difficult sites, slopes, rocky soil, long runs and tight access, and most contractors warranty the workmanship. Use the DIY/pro toggle above to see both numbers side by side for your fence, then decide with real figures instead of gut feel.

How fence height changes the price

Height is a multiplier, not a flat add on. A 4 ft fence costs roughly 30% less per foot than a 6 ft one; an 8 ft fence costs about 40% more. Taller fences need longer posts set deeper in the ground, heavier panels, more concrete per hole, and they catch more wind, which sometimes means closer post spacing too.

Before you price the tall option, check the rulebook: many areas cap residential fences at 6 ft in back yards and 4 ft in front, and HOAs often have their own limits. Pool fences have separate safety codes on height and climbability. A fence that violates code is the most expensive kind. You pay to build it, then pay to fix it.

The hidden costs quotes love to bury

The fence itself is only the headline. Gates run $150, $500 each installed depending on size and hardware. Tearing out an old fence costs real money. Permits run $50, $200 in many areas. Sloped or rocky ground attracts surcharges, and staining or sealing a wood fence adds $1, $3 per foot. Together these extras routinely add 10 to 25% to the base price.

The defence is simple: get two or three quotes, and make sure every quote lists the same scope, same height, same material, same gate count, and whether tear out, permits and finishing are included. A cheap quote with a thin scope is not cheaper. Browse the <a href="/home-garden/">Home & Garden</a> hub for estimators covering the rest of your project list.

Using this calculator to beat a bad quote

Here is the workflow that works: measure your fence line, pick the material and height, toggle between DIY and pro, and adjust the per foot prices to match anything you have been quoted locally. The cost per linear foot row is your weapon. It reduces every quote to one comparable number.

If a contractor's per foot number sits far above this calculator's installed range for your material, ask what is driving it, difficult access, rock, demolition, and get a second quote. If two quotes cluster near the calculator's number, you have found the honest market price for your street.

A worked 120-foot comparison between vinyl and wood

Suppose you need 120 feet of fence and a quote prices vinyl at $28 a foot for materials and $18 a foot for labour. Materials come to $3,360, labour to $2,160, and the installed total is $5,520, which is $46 a linear foot. Price the same run in wood at $16 a foot for materials and $14 a foot for labour and you get $1,920 plus $1,680, a total of $3,600 or $30 a foot. The honest headline is the difference between the two totals: $1,920.

That $1,920 is the real question the comparison asks. It buys you vinyl’s freedom from staining and repainting, while wood buys you a lower starting bill and easier single board repairs. Neither answer is wrong for every household: a fence you plan to keep for decades can justify paying for lower upkeep, while a fence for a house you may sell soon may never repay the premium. Put your own quoted per foot figures into the calculator and argue about the difference, not the totals.

Estimate mistakes that turn a good quote into a bad surprise

The commonest mistake is measuring the fence line as a straight guess across a yard that turns corners, steps over a slope, or detours around trees and outbuildings. Every unmeasured ten feet at $30 to $46 a foot is $300 to $460 appearing mid project, when your bargaining position is weakest. Walk the line with a long tape or a measuring wheel, measure each straight run separately, and add the runs together before you ask anyone for a price.

The second mistake is comparing quotes that silently describe different fences. One contractor’s per foot price may include posts, concrete, hardware, and a gate, while another’s covers panels alone with everything else as an extra. Before comparing totals, list what each quote includes, posts and setting, gates and latches, removal of the old fence, and finishing, and use the calculator’s clean per foot breakdown as the shared yardstick both quotes have to answer to.

Paying for installation versus building it yourself: an honest split

On the worked example above, doing the work yourself removes $2,160 of vinyl labour or $1,680 of wood labour, which is a serious saving by any measure. What it does not remove is the work itself: digging and setting posts plumb, keeping a line straight across 120 feet, and handling panels in wind are the parts professionals make look easier than they are. A fence that leans or sags within two seasons returns the saved labour as rework, with interest.

A middle path suits many households. Pay for the skilled, structural part, setting posts accurately, especially on a slope or in difficult soil, and do the repetitive part yourself by hanging panels or boards once the posts are set and cured. Get the labour quote broken into those stages before you commit, then run the calculator in both modes for your material. The right answer is the one that matches your tools, your weekends, and your tolerance for a crooked line you will see every day.

How to use the Fence Calculator

  1. Walk the fence line with a tape and enter the total run in feet as the fence length.
  2. Set your post spacing, 8 ft is the usual choice for wood, 6 ft if the site catches wind.
  3. Enter the picket width and the gap between pickets; use 0 for a solid privacy fence.
  4. Add local prices per post, rail and picket, press Calculate, and copy the results into your quote or shopping list.

Fence cost questions

How much does a fence cost per foot?

In 2026, an installed fence typically costs $15, $75 per linear foot depending on material: chain link at the low end, wood in the middle, and vinyl, aluminium or wrought iron higher. DIY materials alone run roughly half of that. Enter your length, material and height above for a number matched to your project.

What is the cheapest fence material per foot?

Chain link is usually cheapest per foot, around $8, $18 installed, followed by basic pressure treated pine. Split rail is cheap too but offers no privacy. Remember the cheapest material is not always the cheapest fence: shorter lifespans and maintenance can erase the saving within a few years.

How much does a 150-foot wood privacy fence cost?

Materials for 150 ft of 6 ft wood privacy fence typically run $2,700, $4,000; professionally installed, expect $4,500, $6,750. Use the calculator above with your local per foot rates, then compare against two contractor quotes. For the full materials list, try our <a href="/fence-calculator/">fence post spacing calculator</a>.

Is it cheaper to build a fence myself or hire someone?

DIY is almost always cheaper, labour makes up roughly 55 to 65% of an installed fence bill. A handy homeowner can cut the total nearly in half. But pro installation buys speed, straight lines on slopes, and warranty coverage, so get quotes either way and decide with real numbers.

Does fence height change the cost per foot much?

Yes, an 8 ft fence uses about 40% more material than a 6 ft one, plus longer posts set deeper. A 4 ft fence costs roughly 30% less per foot than 6 ft. Taller fences may also need permits or HOA approval, so check local rules before pricing the tall option.

What hidden costs should I budget for besides the fence itself?

Gates ($150, $500 each installed), tearing out an old fence, permits ($50, $200 in many areas), rocky or sloped ground surcharges, and staining or sealing wood. These extras routinely add 10 to 25% to the base price, budget them in before you sign anything.

How does a sloping or uneven yard change the estimate?

A slope forces a choice between racking the fence to follow the ground or stepping each panel level, and stepping usually means more posts, more cuts, and taller panels on the downhill side of each step. Labour rises too, because setting posts at stepped heights takes longer than running a level line. Measure the sloped run separately, expect its per foot cost to sit above the flat run figure, and ask the installer which method the quote assumes.

Should I budget separately for removing and disposing of the old fence?

Yes, because many per foot quotes price the new fence only, and removal is real work: panels to dismantle, posts and concrete footings to pull, and a load of treated timber to dispose of lawfully. Ask whether removal and disposal are inside the quote, and if they are not, price them as their own line before you compare installers. Doing the removal yourself before the crew arrives is one of the safer places to save money.

How much extra should I allow for gates in the fence run?

Price gates separately from the per foot run, because a gate is a small machine, not a wide fence panel: it needs sturdier posts, hinges, a latch, and careful hanging so it swings without dragging. A wide vehicle gate costs considerably more than a narrow pedestrian gate. When you enter your fence length in the calculator, subtract the gate openings from the run, then add each gate as its own quoted item so the comparison stays honest.

How do corner, end, and gate posts change the material list?

Those posts carry the tension and weight of the whole run, so they are often larger, set deeper, and concreted more carefully than ordinary line posts, and corners may need bracing as well. A simple per foot estimate smooths those costs into the average, which is fine for budgeting but not for a shopping list. If you are buying materials yourself, count corners, ends, and gate positions explicitly and price their heavier posts and hardware as separate items.

Frequently asked questions

How deep do the posts need to go?

Bury about a third of the post, and always get it below your local frost line. For a 6 ft fence that usually means an 8 to 9 ft post with 2 to 3 ft in the ground, which is why the calculator gives you a recommended post length, not just a headcount. Shallow posts are how fences learn to lean.

Does the cost include installation labour?

No, materials only. Installed fencing usually runs one to two times the material price again in labour, so add your contractor's rate on top. That multiplier is exactly why fencing is such a popular DIY project, the labour saving is enormous for the skill it takes.

Can I use metric measurements?

It works in feet and inches, which is how fencing gets sold in the US, UK and Canada. If you think in metres, just convert first, 1 m is 3.28 ft, and the counts come out right. Prices go in your local currency either way.

How far apart should the posts be?

Eight feet on centre for wood is the classic setup; go down to six on windy or exposed ground, and chain link or vinyl can stretch to ten. One rule matters more than any of these: never space posts wider than your rails or panels can span, the spacing has to serve the materials. Enter any spacing above and everything recounts instantly.

How many pickets do I need for a 100-foot privacy fence?

With standard 1x6 boards (about 5.5 inches wide) butted tight together, plan on roughly two pickets per foot, about 200 boards for a 100-foot run. Wider gaps or wider boards change the math fast, so plug your actual board width into the calculator above. Order 10 percent extra for cuts, warped boards, and future repairs.

Do gate posts need to be set differently than regular posts?

Yes, a gate post works much harder than a line post, swinging and carrying weight every day, so it should be beefier and set deeper with more concrete. Most builders step up to a 6x6 post and pour extra around it. Skimping here is the most common reason gates sag and drag.

How many rails do I need if I want three rails per section?

Multiply your section count by three instead of two. On a 60 foot run with posts every 6 feet you have 10 sections, so three rails per section means 30 rails in total. Taller fences and fences on exposed, windy sites are the usual reasons to add the third rail, because it stiffens the pickets between posts and reduces bowing over time.

Should I subtract the gate opening from my picket count?

Yes. A gate is a framed structure, not a picketed section, so its width should come off the run before you count pickets. On a 60 foot run with a 4 foot gate, you are picketing 56 feet, which at 6 inches of coverage per picket is 112 pickets instead of 120. Price the gate, its posts, and its hardware as a separate line in your budget.

Why does my quote count one more post than my section count?

Because a fence needs a post at both ends of every run. Ten sections in a line are bounded by eleven posts, in the same way a ladder with ten gaps has eleven sides pieces. The only exception is a run that ties into an existing wall or building at one end, where that end post may be replaced by fixings into the structure itself.

Can I estimate a fence with two different heights in one calculation?

Run it as two separate fences and add the results. Suppose 40 feet at 6 feet high for privacy and 20 feet at 4 feet along the front: posts, rails, and pickets differ between the two, and blending them into one average height produces a materials list that is wrong for both parts. Two short calculations give you one accurate combined shopping list.