Fence Calculator

Fence calculator that counts posts, rails, boards or panels, concrete and gravel for wood, vinyl, aluminum or chain link, then prices that fence by length, layout, acres or budget.

Fence Layout, Type & Height

One straight run between two end posts.

Posts, Rails, Gates & Concrete8 ft Spacing · 1 Gate · 50 lb Fast Bags
Your Local Prices, Labor & Tax7% Tax · $15.00/ft Labor
DIY Fence Cost With 7% Tax
$2,335 DIY Fence Cost
$23.35 per ft · $76.61 per m · 100 ft of 6 ft Wood Privacy
14 Fence Posts
Post TypesEnd 2 · Gate 2 · Line 10
Post Length & DepthStock 10 ft · Buried 3 ft
Posts are each run divided by your spacing, rounded up, plus one, with corners shared. Quikrete sizing buries one third of the post, so posts run 1.5 × fence height.
64 Bags of 50 lb Concrete
Per Line Post, 10-1/2 in Hole1.55 cu ft = 4.1 Bags
Gravel Base, 6 in per HoleGravel: 9 Bags of 0.5 cu ft
Holes are 3 × the post width across and one third of the post length deep, on 6 in of gravel, as Quikrete specifies. Concrete fills around each post, plus your waste.
231 Boards at 6 ft
Treated 2×4 Rails, 3 per BayRails: 36 · 12 Sections
Screws, 1-5/8 + 3-1/2 inScrews: 1,386 + 144
Boards = net fence length ÷ board width, plus your waste. Every board takes 2 screws at each rail, and each rail end takes 2 longer 3-1/2 in screws into the post.
Saves $1,500 vs Installer
Installed at $15.00/ftInstalled: $3,835
Fence Face AreaOne Face: 576 sq ft
Labor is your installer rate times the full fence line. Face area is the whole fence’s net length times height on one face; double it to stain both faces.
Fence Section & Post Hole Diagram8 ft Bays · 3 ft Deep
One Section, Not to ScalePost Spacing8 ftPost Length10 ft StockBuried3 ftHole Diameter10-1/2 inHole Depth3 ft 6 inRails per Bay3
Itemized Fence Material List8 Line Items
ItemQuantityUnit PriceCost
Treated 4×4 posts14 × 10 ft$13.00/8 ft$228
50 lb Fast-Setting concrete64 bags (21.68 cu ft)$6.50/bag$416
Gravel base, 6 in per hole9 bags (4.21 cu ft)$6.00/bag$54
Posts & Footings Subtotal$698
Boards, 5-1/2 in wide × 6 ft231 (210 + waste)$3.50 each$809
Boards Subtotal$809
Treated 2×4 rails, 3 per section36 pcs (288 ft)$6.50/8 ft$234
Exterior screws (1-5/8 in + 3-1/2 in)1,386 + 144$8.00/100$128
Rails & Hardware Subtotal$362
Exterior stain or paint, both faces, 1 coat6 gal (1,152 sq ft)$38.00/gal$228
Stain & Finish Subtotal$228
Wood Privacy gates, 4 ft opening1$85.00 each$85
Gates Subtotal$85
Sales Tax (7%)On $2,182$153
DIY Fence Total100 ft of fence line$2,335
Installer Labor100 ft$15.00/ft$1,500
Installed Total$3,835
Fence Cost by Length, 25 to 1,000 ftStraight Runs, Your Fence Type
Fence LinePostsDIY CostInstalledDIY per ft
25 ft Straight6$807$1,182$32.28
50 ft Straight8$1,255$2,005$25.10
100 ft Straight14$2,335$3,835$23.35
150 ft Straight22$3,563$5,813$23.75
200 ft Straight28$4,646$7,646$23.23
300 ft Straight40$6,812$11,312$22.71
500 ft Straight64$11,132$18,632$22.26
1,000 ft Straight128$22,246$37,246$22.25
Wood vs Vinyl vs Chain Link Cost7 Fence Types, Same Layout
Fence TypePostsDIY CostInstalledDIY per ft
Wood Privacy (Yours)14$2,335$3,835$23.35
Wood Picket14$1,930$3,430$19.30
Wood Shadowbox14$2,551$4,051$25.51
Wood Panel14$2,114$3,614$21.14
Vinyl Panel14$3,534$5,034$35.34
Aluminum18$2,579$4,079$25.79
Chain Link12$1,113$2,613$11.13
Step-by-Step MathPosts, Concrete, Infill, Cost
  1. Fence line = 100 ft; minus 1 gate of 4 ft = 96 ft of net fence.
  2. Posts = Σ (⌈run ÷ 8 ft⌉ + 1) over 2 runs = 14 posts, 12 sections at 8 ft on center.
  3. Post length = 1.5 × 6 ft = 9 ft; buried 3 ft, hole 3 ft 6 in deep with 6 in gravel.
  4. Concrete per line post = (π/4 × 10-1/2 in² - post area) × 3 ft = 1.549 cu ft; all posts 21.68 cu ft × (1 + waste) ÷ 0.375 = 64 bags.
  5. Boards = 1,152 in ÷ 5.5 in = 210, with waste 231; rails = 12 sections × 3 = 36.
  6. Materials $2,182 + 7% tax $153 = $2,335 DIY Fence Cost.
$2,335 Builds 100 ft of Fence
That is $23.35 per foot with 14 posts set 3 ft deep. Call 811 before digging so buried utility lines get marked for free.

How a Fence Calculator Counts Posts, Rails and Boards

A fence calculator splits the fence line into runs between corners, ends and gates, then counts sections, posts, rails and boards for each run. Counting per run matters because every gate opening adds a post on each side of it.

Lrun is the length of each run, S is the maximum post spacing and Ncorners removes the posts that two runs share at a corner. Rails are the number of sections times the rails per section, and a 6 ft fence uses three rails, one per 24 in of height.

Lnet is the fence length minus gate openings in feet, w is the board width in inches and g is the gap. A solid privacy fence has no gap, so 96 ft of net fence with 5-1/2 in boards takes 210 boards, or 231 with 10% waste.

For 100 ft of 6 ft wood privacy fence with one 4 ft gate, that adds up to 14 posts, 12 sections, 36 rails and 231 boards. At the starting prices, with stain on both faces, it costs $2,335 with 7% tax, or $23.35 per foot, and $2,091 left unstained.

Fence Post Spacing and Post Length

Wood fences and vinyl panels usually set posts 8 ft on center, which matches 8 ft rails and panels. The fence calculator starts aluminum at 6 ft and chain link at 10 ft, the spacing those systems are commonly built to.

A 100 ft wood fence with no gate needs 13 sections and 14 posts at 8 ft spacing. An 8 m fence, about 26.2 ft, needs 5 posts and 4 sections, with posts just over 2 m apart.

P is the post length and H is the fence height. Quikrete's Fast-Setting Concrete Mix data sheet sets hole depth at half the post's above-ground height, which buries one-third of the post. A 6 ft fence needs 9 ft posts set 3 ft deep, so you buy 10 ft stock.

Fence HeightPost BuriedPost Length NeededStock to BuyRails per Section
4 ft2 ft6 ft6 ft2
6 ft3 ft9 ft10 ft3
8 ft4 ft12 ft12 ft4

In cold climates, the fence calculator sets posts 6 in below the frost line you enter, so frost heave has less grip on them. With a 42 in frost line, a 6 ft fence post is buried 4 ft and the full 10 ft stock goes into use. The Fence Post Depth Calculator works through that depth on its own.

Concrete per Fence Post

Each hole is three times the post width, per the same Quikrete data sheet, so a 4×4 post (3-1/2 in) gets a 10-1/2 in hole. Concrete fills the ring around the post for the buried depth, with 6 in of gravel underneath for drainage.

V is concrete in cubic feet, d is the hole diameter in inches, Apost is the post cross-section in square inches and D is the burial depth in inches. A 4×4 post buried 3 ft takes 1.55 cu ft, which is 4.1 bags of 50 lb fast-setting mix at 0.375 cu ft per bag.

Post and FenceHole DiameterBuriedConcrete per Post50 lb Bags per Post
4×4 wood, 4 ft fence10-1/2 in2 ft1.03 cu ft2.8
4×4 wood, 6 ft fence10-1/2 in3 ft1.55 cu ft4.1
4×4 wood, 8 ft fence10-1/2 in4 ft2.07 cu ft5.5
5×5 vinyl, 6 ft fence15 in3 ft3.16 cu ft8.4

The common rule of two bags per post fits a shallow hole. Quikrete's own example uses two 50 lb bags for a 4 in post in a 10 in hole 2 ft deep, so a 6 ft fence set 3 ft deep needs about double that.

Across 14 posts on a 100 ft wood fence, that is 64 bags of 50 lb mix with 10% waste and 9 bags of gravel. Switching to 80 lb bags at 0.60 cu ft each cuts the bag count, though not the weight you carry.

How Much 100, 200, 500 and 1,000 Feet of Fence Costs

At the fence calculator's starting prices, 100 ft of 6 ft wood privacy fence costs about $2,335 to build yourself and $3,835 installed. Cost per foot drops as the run grows, because the gate and end posts are spread over more fence.

Straight Fence LinePostsDIY CostInstalledDIY per ft
25 ft6$807$1,182$32.28
50 ft8$1,255$2,005$25.10
100 ft14$2,335$3,835$23.35
150 ft22$3,563$5,813$23.75
200 ft28$4,646$7,646$23.23
300 ft40$6,812$11,312$22.71
500 ft64$11,132$18,632$22.26
1,000 ft128$22,246$37,246$22.25

Every fence calculator row here has one 4 ft gate, 4×4 posts, 10% waste and one coat of stain on both faces. Starting prices include $13 per 8 ft treated post, $3.50 per 6 ft board, $6.50 per bag of concrete, $38 per gallon of stain and $15 per foot of installer labor, so enter your store's prices before you order.

The formula for fencing cost is the sum of each material quantity times its price, plus sales tax, plus labor per foot if you hire out the work. On the 100 ft wood privacy fence, posts and footings take 32% of the materials, boards 37%, rails and screws 17%, stain 10% and the gate the last 4%.

Wood vs Vinyl vs Chain Link Fence Cost

Chain link is the cheapest fence type to build, and vinyl privacy panels cost the most of these seven styles at the starting prices. Every row below is the same 100 ft, 6 ft line with one gate, except chain link and aluminum, which keep their own post spacing. Wood rows include one coat of stain on both faces, while vinyl, aluminum and chain link need none.

Fence TypePostsDIY CostInstalledDIY per ft
Chain link12$1,113$2,613$11.13
Wood picket14$1,930$3,430$19.30
Pre-built wood panels14$2,114$3,614$21.14
Wood privacy, solid boards14$2,335$3,835$23.35
Wood shadowbox14$2,551$4,051$25.51
Aluminum ornamental18$2,579$4,079$25.79
Vinyl privacy panels14$3,534$5,034$35.34

Vinyl costs more partly in the ground. Its 5×5 posts get 15 in holes, so each post takes 8.4 bags of concrete, and the 100 ft run uses 130 bags against 64 for wood. The Vinyl Fence Cost Calculator breaks that style down further.

A chain link fence calculator counts different parts. For 100 ft of 4 ft chain link, that is 4 terminal posts, 8 line posts, two 50 ft fabric rolls, 10 top rails, 4 tension bars, 12 tension bands and 80 ties, for $1,060 at the starting prices.

For a full wood privacy breakdown, the Wood Fence Calculator and Fence Picket Calculator go deeper into boards and pickets. Farm and pasture lines are covered by the Barbed Wire Fence Calculator.

Building a Fence on a Slope

A fence on a slope is built one of two ways. A racked fence tilts its rails to follow the ground with boards kept plumb, while a stepped fence keeps each section level and drops it at every post.

L is the level length and g is the grade as a decimal, so a 10% slope is 0.10. Racked rails run 0.5% longer at that grade, which pushes an 8 ft section just past 8 ft and moves every rail onto 10 ft stock.

100 ft Wood Privacy, 10% GradePostsRailsConcreteDIY Cost
Level ground14 × 10 ft288 ft64 bags$2,335
Racked, follows the grade14 × 10 ft360 ft64 bags$2,398
Stepped, level sections14 × 12 ft288 ft73 bags$2,446

Stepping costs more in posts, and the fence calculator raises every post to match. At a 10% grade each 8 ft section drops 9-5/8 in, so every post stands that much taller, goes deeper and needs 12 ft stock. A triangle gap also opens under the downhill end of each section, which soil, gravel or a cut kickboard fills.

In the fence calculator, boards keep the same count either way, because they stay plumb and cover the level length. Pre-built panels usually step, since most can't rack, while chain link and aluminum follow the grade.

Fence Stain, Kickboards and Post Caps

The fence calculator figures about 6 gallons of stain for both faces of 100 ft of 6 ft fence at the 200 sq ft per gallon starting coverage, or 3 gallons for one face. Coverage varies widely by product and wood, so enter the rate from your can label.

A kickboard is a treated 2×6 along the bottom of each section that keeps the boards off the soil. On 100 ft of fence that is 12 kickboards and 48 more screws, about $108 at $9 per board, and it also closes the gap under a stepped section.

Post caps shed water off the cut end grain of wood posts. At $5 each, caps for 14 posts add $70, and vinyl and aluminum posts already include theirs in the system post price.

Linear Feet, Fencing Area and Fence by Acre

A linear foot of fence is one foot of fence line measured along the ground, whatever the height. Fencing area is length times height, so 100 ft of 6 ft fence has 600 sq ft of face, or 576 sq ft after a 4 ft gate.

A fence calculator uses square footage for stain and paint, while linear feet drive posts, rails and boards. The Deck Stain Calculator turns fence face area into gallons, and stain both sides by doubling it.

A fence calculator by acre treats the lot as a square. One acre is 43,560 sq ft, so each side is 208.7 ft and the perimeter is 834.8 ft, which takes 108 posts and about $18,678 of stained 6 ft wood privacy fence at the starting prices.

LayoutFence LinePostsDIY CostDIY per ft
10 × 10 ft enclosure40 ft9$1,233$30.83
Backyard, 100 ft back and two 50 ft sides200 ft28$4,646$23.23
1 acre square lot834.8 ft108$18,678$22.37

A 10 × 10 ft fence costs more per foot because corners and a gate sit in only 40 ft of line. The Rectangle Fence Perimeter Calculator finds the line length for any rectangular yard, and the Round Pen Calculator handles circular horse pens.

Fence Cost per Meter

A 20 m fence, about 65.6 ft, costs around $1,604 in materials for stained 6 ft wood privacy with one gate, or $80 per meter. The fence calculator works in meters for readers in Canada, the UK and Australia, though prices stay in dollars.

One meter of fence costs about $76.61 on a 100 ft run at the starting prices and climbs to $102 per meter on an 8 m run. Short fences pay for end posts and a gate over fewer meters, so the per-meter price is never a flat number.

Pool Fence Rules for a Barrier

A pool fence has to be at least 48 in tall, under the 2021 International Swimming Pool and Spa Code Section 305, as summarized by the City of Prosper, Texas. Gates must open away from the pool, close on their own and latch themselves.

Barrier Rule2021 ISPSC Limit
Barrier height48 in minimum
Gap under fence, grass or gravel2 in maximum
Gap under fence, concrete4 in maximum
Any openingMust stop a 4 in sphere
Picket spacing, rails under 45 in apart1-3/4 in maximum
Chain link opening1-3/4 in maximum
Residential gate latch release54 in maximum

Most picket fences fail the spacing rule. A 4 ft picket fence with two rails has them well under 45 in apart, so the pickets can't be more than 1-3/4 in apart, and the usual 3-1/2 in gap is too wide for a pool barrier.

Standard Fence Height and Permits

The standard backyard privacy fence is 6 ft tall, and front-yard fences usually run 3 to 4 ft. Many towns cap fence height by yard location in their zoning code, so check those limits before ordering longer posts.

The 2021 IRC Section R105.2 exempts fences up to 7 ft high from a building permit, as quoted by Grant County, Washington. Zoning approval and HOA rules can still apply to shorter fences.

Call 811 a few days before digging so buried utility lines get marked for free. A 100 ft fence means 14 holes up to 3-1/2 ft deep, and any one of them can hit a gas or power line.

Fence Calculator Waste and Store Tools

Store fence tools and estimating rules give different numbers, mostly because of waste allowances and the prices they assume.

What is a fence calculator?

A fence calculator turns a fence length, height and style into posts, rails, boards or panels, concrete and cost. A full one also handles gates, corners, post depth and the hole size that sets the concrete count.

How much fencing material should I buy?

Buy the counted quantity plus about 10% extra on boards and concrete for split boards, miscuts and spillage. Posts, rails and panels are counted exactly, and a spare post or rail is cheap insurance against one bad piece.

How does a Home Depot or Lowe's fence calculator compare?

Store fence calculators price their own stocked parts. Enter the same store's post, board, panel and concrete prices here to compare the full list, including concrete and gravel for every hole.