How much fencing do you need?
Short answer
Measure your yard's perimeter, pick a post spacing (6 to 8 feet is standard), then check the post count two ways: the fast formula (perimeter divided by spacing, plus one) and a side-by-side check that forces a post onto every corner. A rectangular yard 100 by 60 feet has a 320-foot perimeter; at 8-foot spacing, the fast formula gives 41 posts, but the corner-accurate side-by-side count comes to 42 posts and 42 sections. Add gate posts and a materials cushion on top of that. These are planning estimates, not a fabrication order.
Fence post and section formula
Fast estimate: sections = round UP(perimeter / spacing); posts = sections + 1, plus 1 per gate. Precise: sections per side = round UP(side length / spacing); total posts = sum of sections per side (closed perimeter)
- •perimeter is the total fence line length in feet
- •spacing is your target post spacing, typically 6 to 8 feet
- •the fast formula treats the fence as one run; the precise, per-side formula forces a post at every corner
- •rails per section is usually 2 for fences up to about 4 ft, 3 for 5 to 8 ft fencing
Start with the perimeter, not the yard's square footage
Fencing is sold by the linear foot, so square footage does not help you here. What matters is the distance around the area you are enclosing, measured at ground level along the actual fence line, not the property line if the two differ.
Walk the line with a tape measure or measuring wheel and add up each straight run. For a simple rectangle, perimeter = 2 x (length + width). For an irregular yard, measure each side separately and add them together, since a single average measurement will miss angles and offsets.
- Perimeter (rectangle) = 2 x (length + width)
- Irregular yard: measure and add each straight run separately
- Measure at the fence line itself, not the property line, if they differ
Choose your post spacing
Post spacing is the single biggest lever on both material count and cost, since posts, concrete, and labor scale with how many you set. Six to eight feet is the standard range for residential wood and vinyl fencing: 8 feet keeps material costs down and works fine for most privacy and picket fences, while 6 feet adds stiffness that matters for taller fences, windy sites, or heavier gate hardware.
Chain link and most pre-built panel systems come in fixed panel widths, commonly 6, 8, or 10 feet, so your spacing is dictated by the panel size you buy rather than a number you choose freely. Check your material before you plan spacing.
From perimeter to posts: the fast formula
A quick way to size a fence treats the whole perimeter as one continuous run: sections = perimeter divided by spacing, rounded up, and posts = sections plus one, with one more post added per gate. A 100-ft fence with posts every 8 ft, for example, comes out to 13 sections (100/8 = 12.5, rounded up) and 14 posts.
This is a solid, fast estimate, and it is exactly how the calculator above sizes a job. It has one blind spot worth knowing about: it does not force a post onto every corner of a multi-sided yard, since it treats the perimeter as a single number rather than four separate sides. The next section shows what that costs you.
A worked example: 100 x 60 ft yard, 8-ft spacing
Take a rectangular yard 100 feet by 60 feet. Perimeter = 2 x (100 + 60) = 320 feet.
Run the fast formula: 320 / 8 = 40 sections exactly, so posts = 40 + 1 = 41.
Now check it side by side, so a post lands on every one of the four corners. The two 100-ft sides: 100 / 8 = 12.5, round up to 13 sections each, which works out to about 7.69 feet between posts, just under the 8-ft target. The two 60-ft sides: 60 / 8 = 7.5, round up to 8 sections each, exactly 7.5 feet between posts. Total sections = 13 + 13 + 8 + 8 = 42, and because this is a closed shape, that is also the post count: 42.
The two methods land one post apart, 41 versus 42, because two of the four sides do not divide evenly by 8 and each needs its own extra section to keep a post square on the corner. On a yard where every side happens to divide evenly by your spacing, the two numbers will match; when they do not, build your material order around the side-by-side count.
Rails, panels, and gate allowances
Each section from the side-by-side count needs horizontal rails running post to post. A 3-ft to 4-ft picket or split-rail fence typically uses 2 rails per section (top and bottom); a 5-ft to 8-ft privacy or shadowbox fence uses 3 (top, middle, bottom) for the extra height and wind load. For the example yard built as a 6-ft privacy fence, that is 42 sections x 3 rails = 126 rail boards.
Build in at least one gate. A single walk gate, 3 to 4 ft wide, usually replaces one fence section and needs two heavier gate posts, often 6x6 instead of 4x4, set deeper and with more concrete to carry hinge weight. A double drive gate, 10 to 12 ft wide, typically replaces two sections. Subtract the sections a gate replaces from your panel or picket count, and add the extra post the fast formula already accounts for, one per gate.
Materials checklist
Once you have a post count you trust, the rest of the list follows directly from it.
- Posts: one per section from the side-by-side count, upsized at gates and any corner carrying extra load
- Concrete: about 2 bags of quick-set mix per post hole as a baseline, more for deeper-set gate posts
- Rails: 2 per section under about 4 ft tall, 3 per section for 5 to 8 ft fencing
- Pickets or panels: sized to your actual section spacing, plus trim waste on the shorter end sections
- Gate hardware: hinges, latch, and a drop rod for a double gate
- Fasteners and post caps: budget a box of exterior screws or nails per 10 to 15 sections
Common mistakes
Most fence-material shortfalls come from the same handful of gaps in the planning.
- Trusting the fast formula for an exact order: it is a good budgeting number, but the sections-plus-one shortcut does not force a post onto every corner, and can undercount by a post or more on multi-sided yards, exactly like the 41-vs-42 gap in the worked example.
- Measuring the property line instead of the fence line: setbacks and easements often push a real fence in a foot or more per side, which changes the perimeter.
- Forgetting gate posts need to be heavier: a 4x4 that is fine for a fence run will rack under gate hinge weight, so step up post size at every gate.
- Buying panels sized for flat ground: sloped yards need stepped or racked panels, or shorter custom sections, which changes both post count and material cost.
- Skipping a materials cushion: order 5 to 10 percent extra on rails, pickets, and fasteners for cuts, damage, and mistakes, since a mid-project short order rarely matches in color or batch.
A second worked example: an L-shaped yard
Rectangles are the easy case, so try a yard with a notch. Picture an 80 by 50 foot lot with a 30 by 20 foot corner removed, which leaves six sides of 80, 30, 30, 20, 50 and 50 feet. The perimeter is 260 feet, the same as a plain 80 by 50 rectangle, because cutting a notch out of a corner does not change the distance around.
Plan it as a 6-foot privacy fence with posts no more than 6 feet apart and one walk gate. The calculator's whole-run method gives 44 sections (260 divided by 6 is 43.33, rounded up), 46 posts once the gate post is added, and 132 rails at three per section.
Now count side by side so a post sits at every corner. The six sides need 14, 5, 5, 4, 9 and 9 sections, totaling 46. Because the fence closes on itself, 46 sections means 46 posts, plus one for the gate makes 47. Rails at three per section come to 138. The estimator is therefore short by two sections, one post and six rails, and the cause is rounding. Only the two 30-foot sides divide evenly by 6. The 80, 20, 50 and 50-foot sides each leave a remainder and each gets a rounded-up section, so the 20-foot side, for example, becomes four sections of 5 feet. Every extra side adds a chance of this, so the more corners a fence line has, the more the side-by-side count matters.
Sloped ground: stepped or racked
A fence on a hill does not need much more material, but it does need a decision. The length along a slope is only slightly longer than the length on the map. An 8-foot horizontal span on a 15 percent grade measures about 8.09 feet along the ground, an increase of roughly 1 percent, so your perimeter estimate holds up well.
What changes is the geometry. A stepped fence keeps each panel level and drops it in stages. On a 10 percent grade, each 8-foot panel sits 9.6 inches higher or lower than its neighbor, leaving a gap under the lower side that can be filled with a rot board, a gravel board or a small retaining edge. A racked fence tilts the rails to follow the ground. It looks continuous and leaves no gaps, but it needs panels or rails built to flex, and not every vinyl or pre-built system allows it.
Steeper sites push you toward shorter sections, since a long rack on a steep grade distorts the pickets. If you are splitting the difference, mark the grade at every post location with a stake and string line before ordering, then calculate post heights individually, because each post on a stepped fence sticks out of the ground by a different amount.
Setting the posts: depth, holes and concrete
Posts carry the whole fence, so depth matters more than the exact count. A typical residential guideline buries a post to roughly one-third to one-half of its height above grade, and deeper where the frost line is deep or the soil is loose, wet or sandy. A 6-foot fence is often built on an 8-foot post set about 2 feet in the ground, and a taller or gate-bearing post goes deeper. Local codes and frost depth control the final answer.
The calculator's default of two bags per hole is a reasonable planning number for a lighter fence, but you can test it. A 10-inch diameter hole 30 inches deep holds about 1.36 cubic feet. A 4x4 post, which actually measures about 3.5 inches square, takes up about 0.21 cubic feet of that, leaving roughly 1.15 cubic feet of concrete. A 60-pound bag of mix commonly yields about 0.45 cubic feet, so the hole needs around 2.6 bags.
A gate post makes the gap wider. A 12-inch hole 36 inches deep around a 6x6 post, which measures about 5.5 inches square, needs roughly 1.73 cubic feet, or nearly 4 of the 60-pound bags. Read the yield on the bag you buy, since sizes and mixes differ, and note that some installers backfill with compacted gravel in place of concrete.
Counting pickets and boards
Once the posts and rails are settled, the largest line item is the boards. For a solid privacy fence, divide the fence length in inches by the actual width of one board. A nominal 1x6 board is about 5.5 inches wide, so 320 feet of fence is 3,840 inches, and 3,840 divided by 5.5 is 698.2, which rounds up to 699 boards butted edge to edge. Add 5 to 10 percent for cuts, splits and mistakes and you are ordering roughly 735 to 770.
A spaced-picket fence works the same way with a gap added. A 3.5-inch picket with a 2.5-inch gap sets a 6-inch rhythm, which is two pickets per foot. A 100-foot run needs about 200 pickets plus a few extra for the end sections.
Two traps catch beginners. First, nominal lumber sizes are not actual sizes, so always use the real dimension printed on the tag or measured with a tape. Second, the board count has to be reduced where gates replace sections, because a gate usually arrives with its own frame and boards. Subtract the width of the gate opening from the length before dividing, and cost out the gate as a separate item.
Rules to settle before you order
The cheapest mistake to fix is the one you catch before the first hole. Many cities, counties and homeowners associations limit fence height, material and placement, and the limits often differ between front and back yards or corner lots. Some require a permit or a setback from the property line. Rules vary widely, so check with your local building or planning office and any HOA before buying materials.
Know exactly where your boundary is. A recorded survey or the pins at your corners is better than assumptions based on an old fence or a neighbor's lawn. If the fence will sit near the line, talk to the neighbor early, and ask which side the finished face is expected to show.
In the United States, dial 811 a few days before you dig. It routes your request to the local utilities, who mark buried gas, electric, water and communication lines for free. Post holes are deeper than most people think, and cutting a line is both dangerous and expensive. Mark your planned post locations in white paint or flags so locators can see where you intend to dig, and hold off on the order until those answers are in.
Frequently Asked Questions
Is 8 feet always the right post spacing?+
No. Eight feet is standard for wood privacy and picket fencing and keeps post count, and cost, down, but taller fences, high-wind areas, heavy gates, or vinyl and chain-link systems often call for tighter 6-foot spacing for stiffness. Pre-built panel fencing is not flexible here at all, since your spacing is fixed by whatever panel width you buy, commonly 6, 8, or 10 feet.
Why do I get a different post count if I check each side separately?+
The fast formula treats your whole perimeter as one run: sections = perimeter divided by spacing (rounded up), posts = sections plus one, plus one more per gate. For the 320-ft yard at 8-ft spacing that comes out to 41 posts. Checking each side separately, so a post lands on every one of the 4 corners, gives 42 posts instead, because two of the four sides (the 100-ft runs) do not divide evenly by 8 and need an extra section to keep spacing at or under 8 ft. When every side happens to divide evenly by your spacing, the two methods match; otherwise, trust the side-by-side count for your material order.
How much extra material should I order for waste?+
Plan on 5 to 10 percent extra for rails, pickets, and fasteners to cover cuts, splits, and the odd damaged board. Posts and concrete are less forgiving to over-order, since they cost more individually, so those are usually bought to the exact count from your side-by-side calculation, plus one or two spares for a remote job site.
Does a gate change my post count?+
Yes, and the fast formula already bakes that in: one extra post per gate, on top of the sections-plus-one baseline. In practice, a gate opening replaces one or two fence sections, and the posts on either side of it need to be upsized, commonly to 6x6, and set with extra concrete to handle hinge and swing weight. Price those specifically as gate posts, since they cost more than standard line posts.
How many fence posts do I need for 100 feet?+
With posts 8 feet apart, 100 feet divides into 12.5 sections, which rounds up to 13, so you need 14 posts for a straight run, plus one more for each gate. At 6-foot spacing, you need 17 sections and 18 posts. If the fence turns a corner, count each straight side separately, because a post has to sit on the corner and the extra rounding can add a post or two.
Do I need a permit to build a fence?+
It depends on where you live. Many jurisdictions require a permit above a certain height, often somewhere around 6 feet in back yards and lower in front yards, but this varies widely, and some places require none for ordinary residential fences. Homeowners associations add their own rules on style and color. Call your local building department and read any HOA covenants before you buy materials, since a non-compliant fence can be ordered down.
Should the fence go on the property line or inside it?+
Many owners set it a few inches inside the line so the entire structure sits on their own land, which avoids shared-boundary disputes. Some places require a minimum setback, and in others a fence directly on the line is considered a shared structure. Get a survey if the line is unclear, check local rules, and talk to the neighbor before work starts. Measure the fence line you will actually build, not the legal boundary, when you calculate materials.
Skip the math
Enter your numbers and the Fence Calculator does the work for you — free, and it runs entirely in your browser.
Open the free Fence Calculator to size your project