The fence calculator turns a run length, a finished height and a post spacing into a bill of materials: posts, panel spans, rails and the bagged concrete to set the posts. Enter the prices from a local store and it totals the materials; enter a quote's price per linear foot and it totals the installed job.
It is a takeoff, not a quote. The count assumes one straight run on level ground with every post set in concrete. Corners, gates, slopes and rock all change the number, and the sections below say how.
How to use it
- 01
Measure the run
Walk the fence line with a tape or a measuring wheel and measure each straight segment separately, then add them. The slider takes the total. Measure where the fence will actually stand, not the surveyed property line — many people inset a fence a few inches for maintenance access or to stay clear of an easement.
- 02
Set the finished height
Height is the panel height above grade, not the post length. The model code needs no permit for a fence up to 7 feet, but each city caps a fence by where it stands: Austin at 6 feet for a solid fence on a property line, Los Angeles at 3½ feet in an R zone's required front yard. The fence permit guide sets out both cities' lines.
- 03
Choose the post spacing
The default is 8 feet on center, the widest spacing allowed by the city rules this site found that set one: Federal Heights, Colorado's wood fence standards put posts at most 8 feet apart on a fence 5 feet or taller; Mansfield, Texas, spaces a wood privacy fence's galvanized steel posts 8 feet on center or less; and Heath, Texas, sets a privacy fence's metal or galvanized steel posts no more than 8 feet apart. The Austin and Los Angeles fence rules this site cites set no spacing; ask your building department. Enter the spacing your fence calls for instead: the width of the prefabricated panels you are buying, or the spacing a vinyl or aluminum system's instructions give.
- 04
Pick a material
Material changes the drawing and the Project Brief, not the count. Post count and rails follow spacing and height. The concrete assumes a 4×4 post, 3½ inches dressed, for every material; Quikrete sizes a hole at three times the post's own width, so a narrower metal or vinyl post takes a smaller hole and less concrete.
How the math works
Posts
Posts = the run divided by the spacing, rounded up, plus one — with a floor of two. Rounding up matters: a partial last bay gets its own end post and ends up shorter than the spacing you chose, never longer. An 80-foot run at 8-foot spacing is 10 spans and 11 posts.
Rails and panels
Every span is one panel. Rails follow Mansfield, Texas, whose code wants one horizontal rail for every 2 feet of a wood privacy fence's height, three on a 6-foot fence and four on an 8-foot one. The calculator counts one rail a span for every 2 feet, rounded up to a whole rail: two for a 3- or 4-foot fence, three for 5 or 6 feet and four for 7 or 8. Federal Heights, Colorado, wants at least three 2×4 rails on a wooden stockade-style fence that is 5 feet or taller or that you cannot see through, so a solid 3- or 4-foot stockade fence there takes a third. Both rules are for wood; a chain-link, vinyl or aluminum system's rails follow its instructions, and the Austin and Los Angeles fence rules this site cites set no count. The same 80-foot, 6-foot fence needs 30 rails.
Post holes and concrete
The holes follow Quikrete's steps for setting posts: a hole three times the post's width, so 10½ inches for a 4×4, whose face dresses to 3½ inches; a depth of one third of the post's height above the ground plus 6 inches, the least of the one third to one half Quikrete gives, taking the post to stand as high as the fence; 6 inches of compacted gravel in the bottom; and concrete from the gravel to 3 inches below the ground, the fuller end of Quikrete's 3 to 4. A 6-foot fence gets holes 2½ feet deep holding 1¾ feet of concrete, about 1.05 cubic feet each, and the bag count is the concrete divided by the 0.6 cubic feet an 80-lb bag yields. The post's own volume is not subtracted: a 4×4 fills about a seventh of a 10½-inch hole, so the concrete runs about 16% high, a margin for spillage and an uneven bottom; with the post subtracted, the same eleven posts would take 17 bags. Eleven posts come to 20 bags.
Pricing it
Materials = posts × the post price + panels × the panel price + bags × the bag price, plus rails if your panels come without them. Installed = the run × a quoted price per linear foot. No price is filled in: no primary source publishes one for a residential fence, and a number the site typed would read as data. What is published is the labor side: fence erectors earned a median $23.07 an hour in the U.S. in May 2025, $26.95 in California and $17.92 in Texas (BLS). That is a wage for employees, not a contractor's rate. Neither total covers gates, removal of an old fence, haul-away, survey work or permits.
Where the number goes wrong
- Forgetting gates. A gate's width comes out of the panel run, and its hardware is a separate line.
- Counting a corner as ordinary footage. A corner is the end of two runs, so enter each run on its own and add up the posts.
- Skipping the form in loose soil. Quikrete recommends a tube form for loose or sandy soil; the calculator's volume assumes a clean round hole.
- Comparing per-foot prices across different scopes. Rock, roots, slope and narrow access add labor without adding a single foot of fence, so two per-foot numbers compare only when the quotes cover the same work.
- Digging before utilities are marked. Call 811 a few days before the first hole, whether or not a permit is required.
Questions people ask
How deep should fence posts be?
Quikrete's steps put a post hole at one third to one half of the post's height above the ground, plus 6 inches for a gravel base. For a 6-foot fence whose posts stand 6 feet out of the ground, that is 2½ to 3½ feet; the calculator uses the shallower end, 2½ feet. A post that stands taller than the panels needs a hole a third of its own height above the ground, plus 6 inches. In loose or sandy soil, Quikrete recommends a tube form. Some cities set a minimum for the concrete or for the post set in it: Heath, Texas, sets a privacy fence's posts in concrete at least 18 inches deep; Federal Heights, Colorado, sets a 4×4 in a concrete pier at least 10 inches wide and 2 feet deep; and Mansfield, Texas, wants concrete footings at least 24 inches deep under a 6-foot wood privacy fence and 36 inches under an 8-foot one. Those are not hole depths: the calculator's hole puts 6 inches of gravel under the concrete and stops the concrete 3 inches below the ground, so it can fall short of them. Where your city sets one, ask how it measures and deepen the hole to reach it; the bag count then rises.
How far apart should fence posts be?
No more than 8 feet on center in the city rules this site found that set a spacing: Federal Heights, Colorado's wood fence standards, for a fence 5 feet or taller; Mansfield, Texas, for a wood privacy fence on galvanized steel posts; and Heath, Texas, for a privacy fence on metal or galvanized steel posts. The Austin and Los Angeles fence rules this site cites set none; ask your building department. The calculator defaults to 8 feet; for prefabricated panels, or a vinyl or aluminum system, enter the panel's width or the spacing the system's instructions give.
How many bags of concrete does one fence post take?
For a 6-foot fence, a 10½-inch hole with 1¾ feet of concrete above the gravel holds about 1.05 cubic feet, which is two 80-lb bags. A deeper or wider hole takes more.
Do I need a permit for a fence?
Under the model code, not for a fence up to 7 feet high. Austin wants one in a floodplain, over 7 feet, or over 6 feet along the public right-of-way; Los Angeles for masonry or concrete over 3½ feet, any other fence over 10 feet and swimming pool barriers. The fence permit guide covers both cities.