Structures and exteriors

Fence Calculator - Posts, Pickets, Concrete & Cost

Work out everything a fence needs before you order a pile of lumber. Enter the total length of the fence line, pick wood, vinyl or chain link, set the height and post spacing, and the tool counts the posts by type, the rails, the pickets or panels or fabric, the fasteners, the concrete bags per post hole, and the gates, then draws a live elevation of one section and totals a material cost you can price to your own store. Built for homeowners and fence crews who would rather get the counts right on paper than come up two posts short on a Saturday. No address, no map drawing, no quote form: everything runs in your browser, so nothing you type is uploaded. One honest note up front: post depth and hole size here are common residential rules of thumb to confirm with your local building department, and pool barriers and code-mandated safety fencing are out of scope.

  • Free
  • Private, runs in your browser
  • No sign-up

1The fence line

ft

The whole line, corner to corner, gates included. Run a string along it and measure. The tool subtracts the gate openings for you.

Shape

One straight run: two end posts, no corners.

6 ft privacy is standard. Height sets the rails per section.

2Style & spacing

Fence style
Board style

Privacy sets a 0 in gap for a solid wall of boards.

8 ft is standard; 6 ft for tall or windy runs.

Blank = auto from height.

A dog-ear 1x6 is 5 1/2 in.

0 for privacy, 1 3/4 for picket.

Overlapping pickets, no gaps to see through.

3Gates

Each gate removes its width from the fencing and adds two heavier posts and a gate kit.

Walk gates

A single swing gate.

Drive gates

A wide double gate.

4Posts & footing

Rule: 3x the post width.

Rule: 1/3 of height, 2 ft min.

6 in, for drainage.

Set posts below your local frost line. The depth here is a rule of thumb to confirm with your building department, not a code figure.

5Waste & cost prices editable

On pickets and rails. 10% on a slope.

Fence section

wood privacy

-

Posts

-

Sections

-

Conc. bags

Fence takeoff

Enter your fence length to build the takeoff.

Before you dig

Call 811 first. It is a free service that marks buried gas, power and water lines so you do not hit one setting a post. Post depths here are a rule of thumb: your frost line and local building department have the final say, and pool barriers and code-mandated safety fencing are out of scope for this estimate.

Buying the rails, pickets and posts as lumber rather than by the panel? Convert the list to board feet on the board foot calculator.

How to use it

  1. Measure the fence line. Run a string along where the fence will go and measure the total length in feet, corner to corner around every side. The tool subtracts the gate openings for you, so measure the whole line including where gates will sit.
  2. Set the shape: a single straight run, an L or a U with one or two corners, or a full enclosed perimeter. This tells the tool how to count corner posts and whether there are end posts.
  3. Call 811 before you dig. It is a free national service that marks buried gas, power and water lines so you do not hit one setting a post. Do this a few days before, not the morning of.
  4. Choose the style: wood (privacy or picket), vinyl panels, or chain link. Each mode changes which materials are counted and shows only the inputs that matter for it.
  5. Set the height and the post spacing (8 ft is standard for wood, up to 10 ft for chain-link line posts), then add any gates with their widths.
  6. For a wood fence, set the picket width and gap: 0 gap for solid privacy, around 1 3/4 in for a classic picket look, or turn on board-on-board for an overlapped heavy-privacy fence.
  7. Check the footing settings: post size, hole diameter (the rule is three times the post width), hole depth (a third of the above-ground height, 2 ft minimum, and below your frost line), and whether to add a 6 in gravel base for drainage.
  8. Read the takeoff, watch the section diagram redraw as you go, then type your local prices into the cost ledger for a full material total and a cost per foot.

At a glance

  • 150 ft wood privacy fence, one 4 ft gate, 8 ft posts, 6 ft tall: 146 ft of fencing in 19 sections, 22 posts (18 line, 2 end, 2 gate), 57 rails to buy as 60 boards, 335 pickets with 5% waste, and about 65 bags of 80 lb concrete.
  • 60 ft classic picket, 4 ft tall, 1 3/4 in gaps, 6 ft posts: 10 sections, 11 posts, 20 rails as 21 boards, 105 pickets with waste, and about 31 bags of 50 lb concrete for the holes.
  • 100 ft chain-link dog run, 5 ft tall, one 4 ft gate: 96 ft of fabric, 10 top-rail sticks, 6 line posts and 6 terminal posts, plus tension bars, bands, ties and caps, and about 28 bags of concrete.

How the math works

Everything starts from the total length of the fence line. The tool subtracts the gate openings to get the length that actually carries fencing, then divides that by the post spacing and rounds up to get the number of sections, the bays between posts. An open run has one more post than sections, because there is a post on each end; an enclosed perimeter has exactly as many posts as sections. Of those, the corners and ends are classified out and the rest are line posts, and each gate frames its opening with its own two heavier posts added on top. From there each style has its own rollup. Wood: rails per section come from the height (two rails to 4 ft, three to 6 ft, four at 8 ft), and pickets are the fencing run in inches divided by the picket width plus the gap, rounded up, plus a waste factor. Vinyl: one pre-made panel fills each bay, plus a cap on every post. Chain link: the fabric runs the full length, the top rail is counted in 10 ft 6 in sticks, the posts split into line and terminal, and the fittings (tension bars, bands, ties, caps and rail ends) follow the terminal and line counts. For the footings, the tool computes the volume of each post hole as a cylinder, subtracts the volume of the post inside it, subtracts a 6 in gravel plug if you add one, and divides by the bag yield to get bags per hole and total bags. Those bag yields are the same verified figures our concrete calculator uses, so a bag count here matches a bag count there. The cost ledger prices each line at the numbers you enter and divides the total by the fence length for a cost per foot.

  1. 1. Subtract the gates from the run

    Say you measured 150 ft of fence line with one 4 ft walk gate. The gate does not get pickets or fabric, so the tool subtracts it: 150 - 4 = 146 ft of actual fencing. Measure the whole line first, gates included, and let the tool remove the openings, because it is easy to forget a gate and come up a panel short.

  2. 2. Divide the run into sections

    Divide the fencing run by the post spacing and round up. 146 ft at 8 ft spacing is 146 / 8 = 18.25, which rounds up to 19 sections. That last short section is normal; posts are rarely a perfect multiple of the spacing, and the extra post keeps every bay at or under 8 ft.

  3. 3. Count the posts by type

    A straight open run has one more post than sections, so 19 sections gives 20 posts: 2 end posts and 18 line posts, with no corners on a straight run. Then each gate adds two heavier posts to hang and latch it, so one gate brings the total to 22 posts. An L or U shape trades a line post for a corner post at each turn, and a fully enclosed yard has no end posts at all.

  4. 4. Size the rails from the height

    A 6 ft fence takes three rails per section (top, middle, bottom), so 3 x 19 = 57 rails. Rails are 2x4 stock cut to the bay width, so with 8 ft spacing you buy one 8 ft board per rail, and a 5% waste factor rounds 57 up to 60 boards. A low 3 to 4 ft fence needs only two rails; an 8 ft fence needs four.

  5. 5. Work out the pickets

    Pickets are the fencing run in inches divided by one picket plus its gap. A solid privacy fence uses a 5 1/2 in dog-ear picket with a 0 in gap, so each picket advances 5.5 in: 146 ft is 1752 in, and 1752 / 5.5 = 319 pickets. Add 5% for cuts and culls and you buy 335. A classic picket look with a 1 3/4 in gap advances 7 1/4 in per picket, which drops the count sharply.

  6. 6. Estimate the fasteners

    Each picket is fastened to every rail it crosses, usually with two screws or ring-shank nails per joint. With 319 pickets, 3 rails and 2 fasteners each, that is 319 x 3 x 2 = 1,914 fasteners, or 20 boxes of 100. Screws hold better than nails on a fence that swells and shrinks with the weather.

  7. 7. Size the concrete per hole

    Each post sits in a hole three times its width across and a third of its height deep. For a 4x4 that is roughly a 12 in wide, 30 in deep hole, a cylinder of about 1.96 cubic feet. Subtract the post inside it (about 0.21 cubic feet) and you need 1.75 cubic feet of concrete per hole. An 80 lb bag yields 0.6 cubic feet, so that is about 2.9 bags per hole, and 22 posts take about 65 bags. Add a 6 in gravel base under each post for drainage and the concrete depth drops accordingly.

  8. 8. Price the takeoff

    Type your store prices into the ledger: per post, per rail, per picket or panel or foot of fabric, per bag of concrete, per gate kit, and an optional labor rate per foot. The tool sums the lines and divides by the fence length for a cost per foot, which is the fastest way to compare a cedar privacy fence against vinyl or chain link before you commit.

Worked scenarios, start to finish

Real jobs with the numbers carried all the way through, so you can see how the estimate is built and check your own figures against them.

6 ft cedar privacy fence around a 50 by 100 ft backyard

Enclosing a 50 by 100 ft rear yard with a 6 ft solid cedar privacy fence, a 4 ft walk gate at the side path and a 10 ft double drive gate for the trailer, posts every 8 ft in concrete.

  1. Perimeter: 2 x (50 + 100) = 300 ft of fence line, with a 4 ft and a 10 ft gate.
  2. Fencing run: 300 - 14 = 286 ft; 286 / 8 rounds up to 36 sections.
  3. Posts: an enclosed loop gives 36 posts (4 corners, 32 line), plus 4 gate posts for the two gates, so 40 in all.
  4. Rails: 3 per section x 36 = 108 rails, 114 boards with waste. Pickets: 286 ft is 3432 in, /5.5 = 624, plus 5% = 656 pickets.
  5. Concrete: 40 posts in 10 1/2 in by 24 in holes take about 2.3 bags of 60 lb each, roughly 92 bags.

Takeaway. A fully enclosed yard has no end posts, which is why the post count equals the section count before the gates are added. The two gates are the easy thing to forget: they remove 14 ft of pickets and rails but add four heavy gate posts and two gate kits, so counting them properly swings both the material list and the cost.

60 ft classic picket fence across a front yard

A 60 ft straight run of 4 ft white picket across the front of a yard, a traditional 1 3/4 in gap between 5 1/2 in pickets, posts every 6 ft, no gate in this run.

  1. Run: 60 ft straight, no gates, so 60 / 6 = 10 sections and 11 posts (2 end, 9 line).
  2. Rails: a 4 ft fence needs only 2 rails per section, so 2 x 10 = 20 rails, 21 boards with waste.
  3. Pickets: each advances 5.5 + 1.75 = 7.25 in; 60 ft is 720 in, /7.25 = 100 pickets, 105 with 5% waste.
  4. Fasteners: 100 pickets x 2 rails x 2 = 400, or 4 boxes of 100.
  5. Concrete: 11 posts in the default holes take about 31 bags of 50 lb mix.

Takeaway. The gap is what makes a picket fence a picket fence, and it changes the count more than anything else: widening from 0 to 1 3/4 in cut this run from around 130 pickets to 100. Keep the gap consistent by ripping a spacer block to set every picket, or the spacing drifts visibly over a long run.

5 ft chain-link dog run, 30 by 20 ft

A 5 ft chain-link enclosure for a dog, 30 by 20 ft, with one 4 ft walk gate, line posts at 10 ft, terminal posts at every corner and the gate.

  1. Perimeter: 2 x (30 + 20) = 100 ft, minus the 4 ft gate = 96 ft of fabric.
  2. Sections: 96 / 10 rounds up to 10; posts total 12 (6 line, 4 corner, 2 gate).
  3. Fabric and rail: 96 ft of 5 ft fabric and 10 top-rail sticks at 10 ft 6 in each.
  4. Fittings: 10 tension bars and rail-end cups, about 40 tension bands, loop caps on the 6 line posts, dome caps on the 6 terminals, and roughly 66 tie wires.
  5. Concrete: 12 posts take about 28 bags of 60 lb mix.

Takeaway. Chain link splits its posts into line posts, which carry the top rail through a loop cap, and heavier terminal posts at every corner, end and gate, which the fabric is stretched and tied against with a tension bar. Getting the terminal count right matters because the fittings, tension bars, bands and rail ends, all hang off the terminals, and they are the parts people forget at the store.

The judgement calls a pro makes

Decisions the tool cannot make for you, and how someone who does this for a living thinks them through.

6 ft or 8 ft post spacing
Eight feet is the standard because rails come in 8 ft stock and it uses the fewest posts. Tighten to 6 ft where wind load is high, on a tall solid privacy fence that acts like a sail, on a slope, or where the soil is soft and posts want to lean. Closer posts cost more in posts and concrete but make a noticeably stiffer fence, and they are cheap insurance on an exposed 8 ft privacy run.
Set posts in concrete, gravel, or driven
Concrete is the strongest and the default for a gate or corner post and for most privacy fences, but it can trap water against a wood post and speed rot if there is no drainage. A 6 in gravel base under the post lets water escape and is worth adding. Compacted gravel alone (no concrete) drains best and lets you reset a post later, and it suits chain-link line posts and low fences. Driven posts are fast in firm soil but do not hold a gate. Match the method to the post's job.
Pressure-treated, cedar, or vinyl
Pressure-treated pine is the cheapest and takes stain, but it can twist as it dries. Cedar costs more, resists rot and bugs naturally, and stays straighter, so it is the common choice for a fence you want to look good for years. Vinyl costs the most up front and never needs paint or stain, so over 20 years it can win on total cost even though the first invoice is higher. The cost ledger here lets you price all three on the same run and compare the cost per foot.
Nails or screws
Ring-shank nails go fast with a gun and hold well, but a fence swells and shrinks every season and nails can work loose over years. Exterior screws cost more and are slower, but they hold tight, let you take a picket off cleanly to replace it, and do not pop. On a fence you plan to keep, screws on the pickets are usually worth the extra time; nails are fine on rails that stay captured.
Which side faces out
A board fence has a smooth side (the pickets) and a framed side (the rails). The convention, and the rule in many cities and most HOAs, is that the finished picket side faces your neighbor and the street, with the rails toward your own yard. Check your local ordinance and any HOA rule before you build, because facing the good side in can mean tearing it down and reversing it.
How deep to set a post
The rule of thumb is a third of the above-ground height in the ground, with a 2 ft minimum, so a 6 ft fence wants at least 2 ft of post below grade. The overriding rule is your frost line: a post set above the frost depth will heave up and down with freeze and thaw and eventually lean. In cold regions that means 3 to 4 ft deep. Your local building department publishes the frost depth; confirm it before you dig.

Common mistakes, and the fix

  • Measuring the fence line without subtracting the gates.

    Measure the whole line, then let the tool remove the gate openings. Pickets, panels and fabric do not run across a gate, so counting the gate width as fence over-orders material and hides the gate posts you actually need.

  • Forgetting the corner and end posts.

    Set the shape correctly. A straight run has 2 end posts; every corner adds a corner post; a fully enclosed yard has none of the end posts but a post at each corner. Counting only line posts leaves you short exactly where the fence needs its strongest posts.

  • Digging the holes too shallow for the frost line.

    Set posts below your local frost depth, not just to the 2 ft rule of thumb. A post that stops above the frost line heaves with every freeze and thaw until it leans. Look up the frost depth for your area and dig past it.

  • Pouring concrete around a wood post with no drainage.

    Add a 6 in gravel base under each post and crown the concrete to shed water. Concrete poured in a bowl shape holds water against the post and rots it from the base up. The gravel toggle here sizes that base and shortens the concrete accordingly.

  • Letting the picket gap drift over a long run.

    Rip a spacer block to the exact gap and use it to set every picket. Eyeballing the gap looks fine for ten feet and visibly wanders over a hundred, and an uneven gap is the first thing the eye catches on a finished fence.

  • Buying rails or top rail in the wrong length.

    Match the stock to the spacing. Wood rails are 8 ft, so 8 ft spacing gives one board per bay with no splice; wider spacing forces a splice at a mid-post. Chain-link top rail comes in 10 ft 6 in sticks that sleeve together, counted here as whole sticks.

Material and unit specifics

Dog-ear picket, actual width
A standard dog-ear fence picket is sold as a 1x6 but actually measures about 5 1/2 in wide, the same as a 2x6 face. The picket formula uses the real 5 1/2 in, not the nominal 6 in, so the count comes out right. A 1x4 picket is about 3 1/2 in. Set the picket width to what your boards actually measure.
2x4 rails and stock length
Fence rails are 2x4 lumber run horizontally between posts and cut to the bay width. They come in 8, 10, 12 and 16 ft stock; 8 ft is the match for standard 8 ft post spacing, giving one board per rail with no splice. A 6 ft fence uses three rails per bay, an 8 ft fence four.
Post real dimensions
A 4x4 post actually measures 3 1/2 in square, a 6x6 about 5 1/2 in. The tool uses the real dimension to size the hole (three times the post width) and to subtract the post from the concrete volume. A 4x4 suits most line posts; step up to a 6x6 or a doubled post for gates and for tall or heavy fences.
Concrete bag yields
A dry-mix bag yields set concrete at about 0.6 cubic feet for an 80 lb bag, 0.45 for a 60 lb, and 0.375 for a 50 lb. These are the same figures our concrete calculator uses, so the bag counts match. A 12 in wide, 30 in deep hole around a 4x4 needs roughly 1.75 cubic feet of concrete, about three 80 lb bags.
Chain-link parts, by name
For the store run: fabric is the mesh, sold by the foot at your height. Top rail comes in 10 ft 6 in sticks. Line posts carry the rail through a loop cap; terminal posts (ends, corners, gates) take a dome cap. A tension bar threads the fabric end and bolts to the terminal with tension bands; brace bands and rail-end cups tie the top rail in; tie wires clip the fabric to the rail and line posts.
Vinyl panels
Vinyl privacy and picket fences come as pre-assembled panels, usually 6 or 8 ft wide, that slot between routed posts. You buy one panel per bay and one cap per post. Because the panel width sets the spacing, the post spacing and panel width are the same number in vinyl mode, and you cannot stretch a bay past the panel you buy.

Reading your result

Read the post counts first: line, corner, end and gate posts are listed separately because they are different parts. Line posts are usually 4x4s; corner, end and gate posts take more load and are often 6x6 or doubled, and the gate posts especially need to be set deep in concrete. The section count is your number of bays, and it drives the rails and panels. The picket count already includes the waste factor, so it is the number to buy, while the raw count is what actually goes on the fence. The concrete figure is bags per hole times the number of holes, rounded up to whole bags at your chosen bag size; buy an extra bag or two, because a hole that hits a rock ends up wider than planned. The cost per foot at the bottom is the quickest way to compare styles and spacings on the same run. Everything here is a materials estimate: the hole depth and diameter are rules of thumb, and your local frost line and building department have the final say.

Limitations

  • This is a materials and cost estimate, not a code approval or an engineered design. Post depth, hole diameter and spacing are common residential rules of thumb to confirm with your local building department, which can be stricter.
  • Footing depth depends on your local frost line, which varies widely by region. The 2 ft minimum and one-third-of-height rule are starting points; a cold-climate post may need 3 to 4 ft. Confirm the frost depth for your area before digging.
  • Pool barriers and other code-mandated safety fencing are out of scope. Those carry specific self-closing, self-latching, height and gap requirements that a general estimate must not be used for; follow your local pool code and a qualified installer.
  • The tool models straight runs and simple multi-side shapes (L, U, and a rectangular enclosed perimeter). It does not lay out curved fences, stepped or racked panels on a steep slope, or irregular polygons; on a slope, plan to rack or step each section separately.
  • It counts material from the total length and the spacing, so a run whose corners fall at odd spots may need a post or two more than the round-number estimate. Walk the line and confirm post positions before you order.
  • HOA rules, setback and easement limits, permit requirements, and which side must face out are the reader's to check with the local authority and any homeowners association. This tool does not know your local rules.

Frequently asked questions

How many pickets do I need for 100 feet of fence?
Divide the fence length in inches by one picket plus its gap. For 100 ft of solid privacy fence with 5 1/2 in dog-ear pickets and no gap, that is 1200 in / 5.5 = about 219 pickets, and adding 5% for waste means buying around 230. A 1 3/4 in gap for a classic picket look widens each picket to 7 1/4 in and drops the count to about 166. Set the picket width and gap in the tool to match your boards.
How many bags of concrete do I need per fence post?
It depends on the hole size and the bag. A 4x4 post in a 12 in wide, 30 in deep hole needs about 1.75 cubic feet of concrete after subtracting the post, which is roughly three 80 lb bags, four 60 lb bags, or five 50 lb bags per hole. A shallower 24 in hole needs about two 80 lb bags. The tool computes the exact bags per hole and the total for your post count and shows it for every bag size.
How deep should a fence post be for a 6 foot fence?
The rule of thumb is a third of the above-ground height, so a 6 ft fence wants at least 2 ft of post in the ground, in a hole about three times the post width across. The bigger rule is your frost line: set the post below the depth the ground freezes, or it will heave and lean over the winters. In cold regions that means 3 to 4 ft. Look up your local frost depth and confirm the requirement with your building department.
How far apart should fence posts be?
For a wood fence, 8 ft on center is standard because rails come in 8 ft stock, and 6 ft is better for tall privacy fences, windy sites, slopes or soft soil. Chain-link line posts can go up to 10 ft apart. Vinyl spacing is fixed by the panel width, usually 6 or 8 ft. Closer posts cost more but make a stiffer fence, so tighten the spacing where the fence is tall or exposed.
How much does it cost to fence a yard?
It depends on the length, the style and your local prices, which is why this tool lets you enter your own. As a rough guide, materials for a wood privacy fence often land around 15 to 35 dollars a linear foot, chain link less, and vinyl more up front but with almost no upkeep. Enter your fence length, pick a style, and type your store prices into the cost ledger to get a real material total and a cost per foot for your yard.