Fence Calculator

Choose a type of fence and enter its length. You get the posts, boards or panels or chain link, rails, fittings, gates, concrete and gravel to buy, a shopping list with a cost, and a drawing to scale.

Your fence

  1. Type of fence

    Boards side by side with no gaps, nailed or screwed to rails between 4 × 4 posts. A 6 ft fence has 3 rails in every section.

  2. Measure the fence

    Run

    Measure each straight run along the ground. Add a run for each side, and choose “Join end to end” if the runs meet at corners.

    • Wood and vinyl about 8 ft
    • Chain link line posts up to 10 ft
  3. Posts

    Posts go 24 in into the ground: a third of 6 ft above ground.

    Quikrete: bury a third to a half of the height above ground, on 6 in of gravel; go to half for gate posts and windy sites.

  4. Holes

    Quikrete: a hole about 3 times as wide as the post, 6 in of gravel in the bottom, and concrete up to 3–4 in below the ground, topped with soil.

  5. Concrete

    Poured dry into the hole around the post, then soaked with about 1 gallon (3.8 L) of water a bag. It sets in 20–40 minutes, with no mixing.

  6. Prices (optional)

    Enter your pricesUsing example prices

    The defaults are example prices from 2026 store listings. Enter what your store charges.

Your fence needs about

$1,372
estimated materials cost
14
posts
Fence to build (gates taken off)
96 ft
Pickets
231
Rails
40
Bags of 50 lb fast-setting
34
Gravel, 0.5 cu ft bags
9 bags

96 ft: 12 sections of 8 ft

Materials list
  • Posts, 4 × 4 wood (3½ in)14 posts$150

    8 ft long: 6 ft above ground and 24 in in the ground.

  • Rails, 2 × 4 × 8 ft40 rails$159

    3 rows of rail along 96 ft of fence, with 10% extra for cuts.

  • Pickets, 5/8 × 5½ in × 6 ft, dog-ear231 boards$480

    Boards 5.5 in wide, edge to edge, 6 ft tall, with 10% extra.

  • Nails or screws1 box$12

    About one box for every 100 ft of fence; a rough allowance.

  • Gates1 gate$75

    Walk gate, 4 ft wide, with hinges and latch.

  • Fast-setting concrete, 50 lb34 bags$442

    For 14 posts, about 2.4 bags a post, with 10% extra.

  • All-purpose gravel9 bags$54

    6 in in the bottom of each hole, so water drains away from the post.

Total, fence, concrete and gravel$1,372
Per foot of fence$14 a foot
Per post$98 a post

Using example prices. Open “Enter your prices” to use your own.

Find fence and lumber suppliers near you to compare prices.

Your fence

The fence

Two sections of wood privacy fence, 8 ft between posts and 6 ft tall, with the posts 24 in into the ground8 ft between posts6 ft

Two sections seen from the front, to scale. The dashed part of each post is in the ground.

One post hole

Cross-section of one post hole 10 in wide and 30 in deep: 6 in of gravel in the bottom, 21 in of concrete around the post, and 3 in of soil on top6 ft above ground30 inSoil3 inConcrete21 inGravel6 in10 in across

Drawn to scale below the ground; the post above the ground is cut short. The concrete stops below the ground so soil or grass can cover it.

Posts along the fence

Run 1: 96 ft with 13 posts96 ft, 13 posts 8 ft apart

Seen from above, each run to the same scale. Each run has a post at both ends.

$1,372 estimated materials cost14 posts

See details

Cost by length and height: wood privacy fence

Materials for a straight fence with no gates, at the prices entered above, including posts, concrete and gravel.

Length4 ft tall5 ft tall6 ft tall
50 ft$589$669$708
100 ft$1,099$1,233$1,324
150 ft$1,616$1,813$1,930
200 ft$2,122$2,376$2,531

Key numbers

Posts
one for each section, one to end each run and one for each gate
Rails
2 a section for a 4 ft fence, 3 for a 6 ft fence
Boards
the length in inches ÷ (board width + gap)
100 ft of 6 ft privacy fence
14 posts, 42 rails, 240 boards, 34 bags of concrete
Chain link
posts up to 10 ft apart, fabric in 50 ft rolls
Post depth
a third to a half of the height above ground

How the calculator works

  1. Length: add up each run, then take off every gate opening. Each gate adds one post, because the opening has a post on both sides and one of them ends a section.
  2. Posts: each run ÷ the spacing, rounded up, gives the sections; add one post to finish each run (runs that join end to end share it) plus one for each gate.
  3. Rails (wood fences): a row of rail for every 2 ft of height, at least 2, cut from 8 ft rails, with your extra for cuts.
  4. Boards: the length of fence in inches ÷ (the board’s width + the gap), rounded up, plus your extra. A privacy fence has no gap.
  5. Chain link: fabric in 50 ft rolls, top rail in 10½ ft lengths, larger posts at every end, corner and gate, and fittings: a tension bar for each of those posts (two at a corner) and one fewer tension bands than the height in feet for each bar.
  6. Vinyl: one panel for every section, and a cap for every post.
  7. Concrete and gravel: the same hole, depth and bag math as the fence post concrete calculator, for every post. Cost: every part at your prices.

Rails and posts by fence height

Fence heightRails in a sectionPost length (a third in the ground)Boards for 100 ft (5½ in, no gap)
4 ft28 ft240
5 ft38 ft240
6 ft38 ft240
8 ft412 ft240

Rails by one row for every 2 ft of height, which gives the 2 and 3 rails a section that Lowe’s uses for 4 and 6 ft fences. The boards column includes 10% extra and is the same at every height.

Worked example: 100 ft of 6 ft wood privacy fence

A 6 ft privacy fence 100 ft long, boards 5½ in wide edge to edge, 4 × 4 posts every 8 ft, 2 × 4 rails, fast-setting concrete and 10% extra. This is the same math the calculator runs.

  1. Posts: 100 ÷ 8 = 12.5, rounded up to 13 sections, plus one to finish the run = 14 posts.
  2. Rails: a 6 ft fence has 3 rows. 100 ft × 3 × 1.1 ÷ 8 ft = 41.3, rounded up to 42 rails.
  3. Boards: 100 ft × 12 = 1,200 in ÷ 5.5 in = 218.2, × 1.1 = 240.0, rounded up to 240 boards.
  4. Concrete: 14 holes 10 in wide and 30 in deep, 34 bags of 50 lb fast-setting mix, and 9 bags of gravel.
  5. One 4 ft gate: take 4 ft off the length (96 ft to build) and add one post. That gives 14 posts, 231 boards and 40 rails, and the gate itself.
  6. Cost at this page’s example prices: $828 for the fence and $496 for concrete and gravel = $1,324, about $13 a foot.

Answer: Buy 14 posts, 42 rails, 240 boards, 34 bags of concrete and 9 of gravel: about $1,324 for 100 ft.

How many fence posts do I need?

Divide the length of each run by the post spacing, round up, and add one post to finish the run. Lowe’s worksheet puts it as one post for each section, one to end a run and one for each gate. Most wood fences put posts 8 ft apart, according to Hunker, to suit 8 ft rails; chain link line posts go no more than 10 ft apart. So 100 ft of wood fence takes 14 posts and 100 ft of chain link at 10 ft takes 11.

Runs that turn a corner share the corner post, so a fence that wraps around a yard needs one post fewer for each corner than separate runs would. Choose “Join end to end” when you add a second run.

How many pickets or boards do I need?

Lowe’s method: divide the length of the fence in inches by the picket’s actual width plus the gap between pickets. A “6 in” board is really 5½ in wide, so a privacy fence with no gaps takes about 2.18 boards for every foot; with the 10% extra for cuts and bad boards, 100 ft takes 240.

A picket fence leaves a gap, usually 2–3 in. With 3½ in pickets and a 2½ in gap, 100 ft of fence takes 220 pickets including 10% extra. Change the gap and the board count changes with it. Fences built board on board or with a shadowbox pattern overlap their boards, which means a negative gap; for those, enter a smaller board width.

How many rails does a fence need?

Lowe’s uses 2 backer rails in each section of a 4 ft fence and 3 for a 6 ft fence. This calculator puts a row of rail for every 2 ft of height, at least 2, which gives the same answers at those heights, 3 rails at 5 ft and 4 rails at 8 ft. Rails are cut from 8 ft lengths, so one rail covers one 8 ft section when the posts are 8 ft apart, and the calculator counts the total length of rail and divides by the length sold.

Vinyl fence panels

Vinyl privacy fence comes as kits of panels that lock into routed 5 × 5 in posts, so you count one panel for each 8 ft section and one post for every panel plus one. For 100 ft that is 13 panels and 14 posts. Vinyl posts are usually 9 ft long for a 6 ft fence, so more of the post goes in the ground than the rule of a third gives. Follow the maker’s instructions for hole depth.

Gates

A gate opening has a post on each side. This calculator takes the width of each opening off the fence, counts one extra post for each gate, and lists the gate, with hinges and a latch, as a separate part. A walk gate is usually 3–4 ft wide; a drive-through gate is 10 ft or more. For a heavier gate, set the gate posts to half the height above ground, as Quikrete suggests for gates.

What does it cost to build a fence?

What you pay forExample price
4 × 4 × 8 ft ground-contact post$10.68
Dog-ear picket, 5/8 × 5½ in × 6 ft$2.08
2 × 4 × 8 ft ground-contact rail$3.98
Chain link fabric, 6 ft × 50 ft roll$139.00
Chain link line post, 1⅞ in × 8 ft$34.97
Chain link end or corner post, 2⅜ in × 8 ft$39.97
Vinyl privacy panel kit, 6 × 8 ft$130.90
100 ft of 6 ft wood privacy fence (example above)about $1,324

Sources: Home Depot product pages, November 2026. Fasteners, wood and vinyl gates, vinyl posts and caps, and the small chain link fittings are rounded estimates; enter your own prices above.

These are materials only, with no tax, delivery or labor. Prices vary a lot by region and by the grade and species of wood, so use the prices you are quoted.

Mistakes to avoid

  • Counting one post per section. Every run needs one more post than it has sections, and every gate needs its own.
  • Forgetting to take the gates off the length. A 4 ft gate is 4 ft of fence you do not need boards for.
  • Using the nominal width of a board. A “6 in” picket is 5½ in wide.
  • Buying exactly what the count says. Boards split and rails get cut wrong; buy 10% extra.
  • Going too shallow. Posts need a third to a half of the fence height in the ground, plus gravel underneath.
  • Digging before calling 811, and building without checking the height limit, setback and permit rules where you live.

Common questions

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

14 posts at 8 ft spacing, or 11 at 10 ft for chain link. Add one for each gate.

How many pickets do I need for a 100 ft fence?

240 boards 5½ in wide with no gaps, including 10% extra, or 220 pickets 3½ in wide with a 2½ in gap.

How many rails does a 6 ft fence need?

Three in each section, according to Lowe’s. A 4 ft fence takes two. For 100 ft with 8 ft sections that is 42 rails of 8 ft with 10% extra.

How far apart should fence posts be?

About 8 ft for wood and vinyl fences and up to 10 ft for chain link line posts, according to Hunker.

How much concrete do I need for fence posts?

About 2.4 bags of 50 lb fast-setting concrete a 4 × 4 post, which is 34 bags for the 100 ft privacy fence above. For a single post, use the fence post concrete calculator.

How many rolls of chain link fabric do I need?

One roll for every 50 ft of fence, rounded up. 100 ft takes 2 rolls.

How many tension bands does a chain link fence need?

One fewer than the height of the fence in feet for every tension bar, according to Ace Hardware: 5 for a 6 ft fence.

How do gates change the count?

Take the gate opening off the length of fence and add one post for each gate, as in the Lowe’s worksheet. The gate and its hardware are extra.

How much does it cost to build a fence?

The materials for 100 ft of the 6 ft wood privacy fence above come to about $1,324 at this page’s example prices, or $13 a foot. A 100 ft chain link fence is about $1,076 and a vinyl fence about $3,419, materials only.

Do I need a permit for a fence?

Often, yes, for fences over a certain height or in some neighborhoods. Check the height limit, setback rules and any homeowners’ association rules before you buy.

Sources

We checked the figures on this page against these sources on . Prices are national ranges from the dates shown; your local yard may charge more or less.

  1. Fence Calculator: Building with Pickets, Lowe's. Counting posts, pickets, backer rails and post caps.
  2. Fence Post Spacing Guide, Hunker (Shawn McClain) (May 2010). Post spacing for wood and chain link fences.
  3. 0.065 Wall Round Chain Link Posts and Pipes, Hoover Fence Co. Chain link line post and terminal post sizes.
  4. 2-3/8 in Galvanized Steel Chain-Link Tension Band, Ace Hardware. One fewer tension band than the height of the fence in feet.
  5. Setting Posts in Concrete, Quikrete. Hole width and depth, gravel and filling to below the ground.
  6. Quikrete Fast Setting Concrete Mix, 50 lb, Ace Hardware (October 2026). Price of a 50 lb bag of fast-setting concrete.
  7. 4 in. x 4 in. x 8 ft. #2 Ground Contact Pressure-Treated Southern Yellow Pine Wood Post, The Home Depot (November 2026). Price of a 4 × 4 × 8 ft ground-contact post.
  8. Wood Fence Pickets, The Home Depot (November 2026). Prices of dog-ear pickets.
  9. 2 in. x 4 in. x 8 ft. #2 Ground Contact Pressure-Treated Southern Yellow Pine Lumber, The Home Depot (November 2026). Price of a 2 × 4 × 8 ft ground-contact rail.
  10. 6 ft. x 50 ft. 11.5-Gauge Galvanized Steel Chain Link Fence Fabric, The Home Depot (Everbilt) (November 2026). Price of a roll of chain link fabric.
  11. 1-7/8 in. Dia. x 8 ft. 16-Gauge Galvanized Steel Chain Link Fence Line Post, The Home Depot (Everbilt) (November 2026). Price of a chain link line post.
  12. 2-3/8 in. Dia x 8 ft. 15-Gauge Galvanized Steel Chain Link Fence Corner Post, The Home Depot (Everbilt) (November 2026). Price of a chain link end or corner post.
  13. Chain Link Fence 2-3/8 in. Galvanized Steel Tension Band, The Home Depot (Everbilt) (November 2026). Price of a tension band.
  14. Chain Link Fence Gates, The Home Depot (November 2026). Prices of chain link gates.
  15. Dover 6 ft. H x 8 ft. W Vinyl Privacy Fence Panel Kit, The Home Depot (November 2026). Price of a vinyl privacy panel kit.

See a figure that does not match your supplier? Tell us and we will check it. How we check our numbers.

Add this calculator to your website

Run a supply yard, a landscaping business or a blog? Put this calculator on your own page, free. It works the same as here, resizes to fit, and shows nothing but the calculator: no ads.