How to measure your fence
- Walk the fence line and measure every side. Add the sides up for the total fence length, gate openings included. A 100 ft tape or a measuring wheel is easiest. For long lines, check against your property survey.
- Count the straight sides. A fence along the back and two sides of a yard has 3 sides. Each change of direction is a corner, and adjoining sides share one corner post.
- Pick the layout. Open ends means the fence starts and stops somewhere, usually at the house, so each end needs its own post. Closed loop means the fence goes all the way around (at least 3 sides) and the last side ends on the first post.
- Add your gates. Enter how many gates you need and the width of each opening between gate posts. Choose a width that fits what you need to get through: a mower, a wheelbarrow or a vehicle.
- Choose height, spacing, style and hole depth. If your area has a frost depth or a local post-depth rule, enter it as the depth the bottom of the concrete must reach. Then open Hole base, waste & prices to pick the base under the posts and enter your local lumber prices.
The formulas
Posts. The calculator treats the sides as equal (total length ÷ sides) and spreads gates over them. One gate on a 3-sided fence goes on the middle side. Each gate splits its side into two straight segments of equal length, and every segment is divided into equal bays no wider than your post spacing:
Bays per segment = ⌈segment length ÷ max spacing⌉
Posts = Σ (bays per segment + 1) - shared corners
Shared corners are sides - 1 on an open fence and sides on a closed loop. Gate openings are never shared: each gate gets its own pair of posts. The 3D preview draws exactly this layout, so the posts you see are the posts you buy. If your sides are very different in length, the real count can differ by a post or two, so run each side separately to check.
Rails. Each bay gets one rail per rail line: 2, 3 or 4 rails. Auto picks a common rule of thumb, not a code requirement. Rails must break over a post, so an 8 ft board covers one 8 ft or one 6 ft bay, while a 12 ft board can span two 6 ft bays.
Gate leaves. Each gate gets its own leaf, counted as wide as the opening. Each leaf has:
- pickets across the width,
- one 2×4 per rail line,
- a corner-to-corner brace.
Rails and brace are structural, so each one is one continuous board, never two shorter boards spliced together. The brace is sized to the full leaf diagonal, √(width² + height²), which is a little longer than the real brace. Any member longer than your rail board is bought at the next stock length (8, 10, 12, 14 or 16 ft, so check what your yard stocks) and priced per foot from your 2×4 price. A 4 ft × 6 ft leaf needs a 7.2 ft brace, so an 8 ft board. An 8 ft × 6 ft leaf needs a 10 ft board. If a rail or brace would be longer than 16 ft, the calculator asks for a double gate or a manufactured gate frame instead. Hinges, latch and any anti-sag kit are not priced.
Pickets. On a privacy fence the pickets butt together. On a spaced fence each picket comes with one gap:
Privacy pickets = ⌈length (in) ÷ picket width (in)⌉
Spaced pickets = ⌈(length + gap) ÷ (picket width + gap)⌉
Use the actual board width: a 1×6 picket is 5.5 in wide, a 1×4 is 3.5 in.
Concrete. Each hole is a cylinder with a base layer in the bottom for the post to stand on. Quikrete’s two methods use different bases. The Concrete Mix data sheet says to “place 6 in (150 mm) of dry concrete mix in the bottom of the hole” and then position the post. The Fast-Setting how-to page uses about 6 in of compacted gravel instead. Auto follows the method for the mix you choose, and you can switch it. Concrete fills the space around the post above the base. A concrete base is a full cylinder of concrete under the post:
Around the post (cu ft) = (π × (hole diameter ÷ 2)² - post width²) × (hole depth - base - soil cap) ÷ 1,728
Concrete base (cu ft) = π × (hole diameter ÷ 2)² × base ÷ 1,728 (0 with gravel)
A 4×4 post is actually 3.5 × 3.5 in and a 6×6 is 5.5 × 5.5 in. The post is set (hole depth - base) deep, and its length is the height above ground plus that depth.
Regular Concrete Mix is mixed first, filled to grade and sloped away from the post, so its soil cap is 0. Quikrete’s Fast-Setting method pours the mix in dry to 3-4 in below the top of the hole under soil or sod, and the calculator stops at 3 in so you don’t run short. The dry-mix base counts at the same yield as mixed concrete. Bags come from the total volume plus waste at Quikrete’s published yields: 0.60 cu ft per 80 lb bag of Concrete Mix and 0.375 cu ft per 50 lb bag of Fast-Setting Concrete Mix.
The hole must be wider than the post’s diagonal (4.95 in for a 4×4, 7.78 in for a 6×6), or the post won’t fit. The calculator shows an error for a hole that narrow.
Fasteners (rule of thumb). There is no single published fastening schedule for a wood fence, so the shopping list shows a labeled estimate. It counts 2 nails or screws per picket at each rail, and 2 screws wherever a rail meets a post: at every post the rail passes, plus one extra connection where two boards butt over a post. Follow the instructions for the fasteners and lumber you buy.
Frost depth and permits
Frost-depth and code minimums are measured to the bottom of the footing. The American Wood Council’s deck guide (DCA 6), for example, requires footings “at least 12 inches below the undisturbed ground surface or below the frost line, whichever is deeper”. So the calculator reads your entry as the depth of the bottom of the concrete. With a gravel base the hole is your depth plus the gravel (42 in + 6 in = 48 in). With a dry-mix base the hole is your depth.
There is no national frost depth. Under the International Residential Code, each jurisdiction fills in its own “frost line depth”, “the minimum depth of footing below finish grade”, in its design-criteria table (2024 IRC R301.2, Table R301.2, note b). Fence posts are not deck or house footings, so ask your building department for that local value and which rule applies to fences where you live.
Permits. The model 2024 IRC lists “fences not over 7 feet high” among work exempt from a building permit (R105.2). Cities, counties and HOAs often have their own fence rules on height, setbacks, materials and corner visibility, so check them before you buy materials.
Worked example: 150 ft privacy fence with one gate
A 6 ft privacy fence around three sides of a backyard: 150 ft total, so three 50 ft sides. Posts at most 8 ft apart, one 4 ft gate, 4×4 posts, 1×6 pickets and 3 rails. The posts go in 80 lb Concrete Mix with Quikrete’s 6 in dry-mix base, in holes dug by the default ½ rule.
- Sides: the gate goes on the middle side, which leaves 46 ft of fence there in two 23 ft segments. The other two sides are 50 ft each
- Bays: 50 ÷ 8 = 6.25 → 7 bays of 7 ft 2 in; 23 ÷ 8 = 2.9 → 3 bays of 7 ft 8 in; 20 sections in total
- Posts: (8 + 4 + 4 + 8) - 2 shared corners = 22 posts, including 2 gate posts
- Rails: 20 sections × 3 rails = 60 rails, plus 4 for the gate frame (3 rails + one continuous brace of √(4² + 6²) = 7.2 ft) = 64 boards (8 ft 2×4s)
- Pickets: 600 in ÷ 5.5 = 109.1 → 110 per 50 ft side, 276 ÷ 5.5 = 50.2 → 51 per 23 ft segment, and 48 ÷ 5.5 = 8.7 → 9 for the gate leaf: 331, 348 with 5% extra
- Holes: 12 in wide × 36 in deep (½ of 6 ft) with a 6 in dry-mix base. Each post stands on the base, is set 30 in and is 8 ft 6 in long, so buy 10 ft posts
- Concrete: base π × 6² × 6 ÷ 1,728 = 0.39 cu ft, plus (π × 6² - 3.5²) × 30 ÷ 1,728 = 1.75 cu ft around the post = 2.14 cu ft per hole. 22 × 2.14 × 1.10 waste = 51.9 cu ft → 87 bags of 80 lb mix
- Fast-setting alternative: a 6 in gravel base instead (22 × 0.39 = 8.6 cu ft of gravel) and concrete to 3 in below grade, 1.58 cu ft per hole → 102 bags of 50 lb mix
At $15 per post, $6 per 2×4, $4 per picket and $6.50 per 80 lb bag, the lumber and concrete come to about $2,672 before fasteners, gate hardware and tax. With the ⅓ depth from Quikrete’s how-to page (24 in holes, 8 ft posts), you buy shorter posts and less concrete, but the holes are shallower than Quikrete’s data sheets call for.
How deep should fence posts be?
Quikrete’s current data sheets say the hole should be ⅓ of the overall post height. If the post went to the bottom of the hole, that would be exactly ½ of the height above ground. With a base of thickness G under the post, the exact figure is (height above ground - G) ÷ 2, or 33 in for a 6 ft fence on a 6 in base. The calculator’s ½ rule is slightly deeper, which is the conservative choice. Quikrete’s how-to page gives ⅓ to ½ of the height above ground with about 6 in of gravel in the bottom.
The table puts a 6 in base (gravel or dry mix) inside the hole depth, with the post standing on it. These are product instructions, not a structural design. Local codes, frost depth, soil and wind exposure can require more, so ask your building department where the ground freezes.
| Fence height | Hole depth (½ rule, default) | Post set in concrete | Post length | Buy | Hole depth (⅓, how-to page, shallower) | Rails (rule of thumb) |
|---|---|---|---|---|---|---|
| 4 ft | 24 in | 18 in | 5 ft 6 in | 8 ft | 16 in | 2 |
| 5 ft | 30 in | 24 in | 7 ft | 8 ft | 20 in | 3 |
| 6 ft | 36 in | 30 in | 8 ft 6 in | 10 ft | 24 in | 3 |
| 8 ft | 48 in | 42 in | 11 ft 6 in | 12 ft | 32 in | 4 |
Quikrete’s hole width is 3× the post width: 12 in for a 4×4, 18 in for a 6×6. If a frost depth applies, the hole gets deeper: the bottom of the concrete must reach it, and a gravel base goes below that.
Setting the posts
- Fast-Setting mix (50 lb): pour it dry around the braced post to 3-4 in below the top, add about 1 gallon of water per 50 lb bag, and fill the rest with soil. For holes deeper than 30 in, Quikrete says to fill to 30 in or less, let the water soak in, then add the rest. It sets in 20-40 minutes, but wait 4 hours before putting any strain on the post.
- Concrete Mix (80 lb): place 6 in of dry mix in the bottom of the hole and stand the post on it. Mix the rest with water before placing it around the post. Smooth the top and taper it away from the post so rain runs off, and wait 24 hours before the post takes any strain.
- Fast-Setting, gravel base: add about 6 in of gravel, compact and level it, then set and brace the post on it.
Cost tips
- Pickets are often the biggest line item. In the worked example they are more than half the material cost, so price them carefully.
- Buy posts for ground contact. They sit in soil and concrete, so use pressure-treated posts labeled for ground contact (check the end tag).
- 8 ft spacing saves posts and concrete. A 100 ft straight run takes 14 posts at 8 ft against 18 at 6 ft. Compare the totals for your fence in the calculator.
- Fast-setting mix costs about twice as much per cubic foot at the default prices. It needs no mixing, but a 50 lb bag yields 0.375 cu ft against 0.60 cu ft for an 80 lb bag of regular mix. At $8 and $6.50 a bag, that’s about $21.33 against $10.83 per cubic foot. Compare your own store’s prices per cubic foot.
- Leftover concrete is fine. Running short is not. Holes are rarely perfect cylinders, so keep the 10% extra. If you are also pouring a pad for trash cans or an AC unit, add it with our concrete slab calculator.
Frequently asked questions
How many fence posts do I need for 100 feet?
A straight 100 ft run with posts no more than 8 ft apart takes 14 posts: 100 ÷ 8 = 12.5, which rounds up to 13 sections. At 6 ft spacing it's 17 sections and 18 posts. Corners don't add posts on their own, because adjoining sides share the corner post, so 96 ft in one straight line and three 32 ft sides both take 13 posts. Splitting a side into shorter pieces can round up an extra bay, though. A gate needs its own pair of posts, but it also takes its width out of the fence, so it doesn't always add one: 100 ft straight with one 4 ft gate is two 48 ft segments of 6 bays, still 14 posts. The calculator counts the posts for your layout.
How many bags of concrete per fence post?
About 3.6 bags of 80 lb Concrete Mix (0.60 cu ft per bag) for a 4×4 post in a 12 in wide, 36 in deep hole. The amount depends on the method and the post:
- Quikrete's Concrete Mix method: 6 in of dry mix in the bottom, the post stood on it and concrete around the post to grade. That's about 2.14 cu ft in all (0.39 cu ft of it in the base).
- Quikrete's Fast-Setting method: about 6 in of gravel in the bottom instead, with the concrete stopped 3-4 in below grade under a soil cap. Stopping at 3 in, that's about 1.58 cu ft, or 4.2 bags of 50 lb mix (0.375 cu ft per bag).
- A 6×6 post with the dry-mix base needs less in the same 12 in hole, about 1.83 cu ft, because the bigger post fills more of the hole. In the 18 in hole that Quikrete's 3× rule gives for a 6×6, it needs about 4.8 cu ft.
How deep should fence post holes be?
One third of the overall post height, according to Quikrete's current data sheets for Fast-Setting Concrete Mix and Concrete Mix. With 6 in of base under the post, that's 33 in for a 6 ft fence. The calculator uses half of the height above ground (36 in), which is a little deeper and equals the one-third rule if the post reached the bottom of the hole. Quikrete's how-to page gives a range of one third to one half of the above-ground height, with about 6 in of gravel in the bottom ("a 6-foot tall fence would require a hole depth of at least 2 feet"). You can pick that one-third option, but it's shallower than the data sheets (24 in instead of 33 in for a 6 ft fence), and the calculator warns you when the hole is shallower than the data-sheet depth. Where the ground freezes, ask your building department about frost depth and local fence-post rules. Frost-depth minimums are measured to the bottom of the concrete, so enter that depth and the calculator adds any gravel below it.
How long before I can attach rails to new posts?
Wait 4 hours with Quikrete Fast-Setting Concrete Mix and 24 hours with regular Quikrete Concrete Mix, according to their data sheets. Fast-setting mix sets in 20 to 40 minutes, but its data sheet says to wait the 4 hours before the post is subjected to any strain. Setting time is not the same as being ready for load.
How many pickets do I need for an 8 ft section?
18 pickets butted tight for privacy, or 14 with a 2 in gap, using 1×6 pickets (5.5 in actual width). An 8 ft section is 96 in wide, so tight pickets take 96 ÷ 5.5 = 17.5, rounded up to 18. With a 2 in gap it's (96 + 2) ÷ (5.5 + 2) = 13.1, rounded up to 14. Add an allowance for split or warped boards (the calculator uses 5% by default).
Do I need to call 811 before digging fence post holes?
Yes. 811 says installing a fence requires contacting your state 811 center, by calling 811 or filing online, a few business days before you dig. Wait the time your state requires, and use your ticket to confirm that all utilities have responded before you dig. Keep the marks visible, avoid digging within 18-24 in of them on any side (the tolerance zone varies by state), and hand-dig if you must work near them. 811 doesn't mark private lines such as sprinkler systems, pet fences, lamppost wiring or lines to a shed or detached garage. A private locator can mark those.
Sources
- ICC - 2024 IRC, Chapter 1 (R105.2 work exempt from permit; official text, Oct 2026 version, checked Oct 9, 2026)
- ICC - 2024 IRC, Chapter 3 (R301.2 climatic and geographic design criteria, frost line depth; official text, Oct 2026 version, checked Oct 9, 2026)
- Quikrete - Setting Posts without Mixing (hole 3× post width, depth ⅓-½ of height above ground, 6 in gravel, 3-4 in below grade, wait about 4 hours)
- Quikrete Fast-Setting Concrete Mix No. 1004 data sheet, rev. Nov 2025 (0.375 cu ft per 50 lb bag; hole ⅓ of overall post height; fill to 3-4 in below the top; wait 4 hours)
- Quikrete Concrete Mix No. 1101 data sheet, rev. Oct 2022 (0.60 cu ft per 80 lb bag; hole ⅓ of overall post height; 6 in dry mix in the bottom, then position the post; wait 24 hours)
- American Wood Council - DCA 6, Prescriptive Residential Wood Deck Construction Guide (2015 IRC edition): footings at least 12 in below undisturbed ground or below the frost line, whichever is deeper
- 811 Before You Dig (Common Ground Alliance) - notice, wait and confirm all utilities responded
- 811 Before You Dig - For Homeowners (notify, wait, confirm, respect the marks, 18-24 in)
- 811 Before You Dig - For Professionals (tolerance zone, hand digging near marks)
- NC811 - FAQ: private lines are not marked by 811
- MISS DIG 811 - Homeowner FAQ: private utility lines