Fence Calculator

This fence calculator builds the materials list for a wood fence with up to four connected sides, sharing corner posts the way a real backyard fence does. Enter each side, the fence height, post spacing and gates to get posts, rails, pickets, the post length to buy, and concrete bags sized from your actual hole. Add prices to total the order.

Estimate your materials
ftEnter 0 or more.
ftEnter 0 or more.
ftEnter 0 or more.
ftEnter 0 or more.
ftEnter 0 or more.
Enter 0 or more.
Rails, pickets, post holes, concrete & prices
inEnter 1 or more.
inEnter 0 or more.
inEnter 0 or more.
inEnter 0 or more.
inEnter 0 or more.
Enter 0 or more.
Enter 0 or more.
Enter 0 or more.
Enter 0 or more.

Metric options use regional material sizes. Check your selected sizes after switching units.

Fence posts needed

29posts

  • Posts by role24 line · 2 corner · 2 end · 1 gate
  • Rails (3 per section × 27 sections)81 rails
  • Pickets (5.5″ wide, 0″ gap, at least 6 ft long)437 pickets
  • Post length: 6 ft above + 2 ft buried = 8 ftBuy 8 ft posts
  • Concrete (0.92 cu ft per post × 29; 24 in column)26.7 cu ft = 72 × 50 lb bags

Updated .

How the fence calculator counts posts, rails, pickets and concrete

Each side is a straight run between two direction changes. The calculator splits every side into bays, then adds the posts that the bays share:

sections per side = ceil(side ÷ spacing)
posts = Σ sections + 1 + gates (open chain)
posts = Σ sections + gates (closed loop)
rails = Σ sections × rails per section
pickets = ceil(total length in inches ÷ (picket width + gap))

Rounding up per side matters. A 50-foot side at 8-foot spacing is 6.25 bays, so it gets 7, and the short bay stays on that side; you can’t carry the leftover 2 feet around a corner. In an open chain the sides share their corner posts, so you add just one post to close the far end. A closed loop ends on the post it started from, so even that one drops out. Fewer than three sides can’t close, so the loop setting needs at least three. Each gate adds one post: a gate fits within one section, but it needs a post on both sides and only one of them comes from the fence line. That gate section’s rails and pickets stay in the count, because you build the gate frame and face from the same stock.

Below ground, the post length and concrete come from the hole you plan to dig:

burial = hole depth − gravel base
post length = fence height + burial, rounded up to 8, 10 or 12 ft stock
concrete per post = (π × (hole diameter ÷ 2)² − post side²) × burial
bags = ceil(posts × concrete per post ÷ bag yield)

The concrete column is the ring between a round hole and a square post, from the top of the gravel to grade. Bags are rounded once, on the total, not per post. Bag yields are approximate and vary by product, so check the bag label. Quikrete lists about 0.375 cu ft for its 50-pound fast-setting mix.

Worked example: a three-sided backyard privacy fence

A typical rear yard: the house closes the front, and you fence the other three sides. That’s 50 feet down one side, 100 feet across the back, and 50 feet up the other side, for 200 feet of 6-foot privacy fence. Posts go on 8-foot centers with three rails per section, 5.5-inch pickets butted tight, and one walk gate. Holes are 10 inches across and 30 inches deep with 6 inches of gravel, around 4×4 posts, set with 50-pound bags. These are the defaults above.

  1. Sections: 50 ÷ 8 = 6.25 → 7; 100 ÷ 8 = 12.5 → 13; the other side → 7. Total 27.
  2. Posts: 27 + 1 to close the chain + 1 for the gate = 29 posts: 24 line, 2 corner, 2 end (against the house) and 1 gate.
  3. Rails: 27 × 3 = 81 rails.
  4. Pickets: 200 ft = 2,400 in; 2,400 ÷ 5.5 = 436.4 → 437 pickets, at least 6 feet long.
  5. Post length: 30 − 6 = 24 inches buried, so 6 + 2 = 8 feet. Buy 8-foot posts.
  6. Concrete: π × 5² = 78.54 sq in, minus 3.5² = 12.25 for the post, leaves 66.29 sq in. Times 24 inches that’s 1,591 cu in, or 0.92 cu ft per post. 29 posts need 26.7 cu ft; 26.7 ÷ 0.375 = 71.2 → 72 fifty-pound bags.

If you had treated the yard as one 200-foot run, you’d get 25 sections and 27 posts. That undercounts the two short bays the corners force, and it misses 6 rails.

Fence materials by yard layout

Each row uses the calculator’s defaults: 8-foot spacing, three rails per section, 5.5-inch privacy pickets, one gate, and 10 × 30-inch holes with 6 inches of gravel around 4×4 posts, set with 50-pound bags. Open layouts end at the house; the rectangles are closed loops.

Posts, rails, pickets and 50 lb concrete bags by layout: 8 ft spacing, 3 rails, 5.5″ pickets, 1 gate, 10″ × 30″ holes.
Layout (ft)Total length (ft)PostsRailsPicketsConcrete bags (50 lb)
One side: 505092111023
One side: 100100153921937
L-shape: 50 + 50100164221940
Three sides: 50 + 100 + 50200298143772
Three sides: 75 + 100 + 75250359954686
Three sides: 100 + 150 + 10035047135764116
Closed loop: 50 × 10030041120655101
Closed loop: 100 × 10040053156873131

Compare the 50 × 100 loop with the three-sided yard. The loop adds 100 feet and 13 sections but only 12 posts, because the last side closes on the first post instead of needing an end post. Sides that are exact multiples of the spacing (48, 96 or 144 ft) avoid short bays and save one post on every side.

Laying out the fence line before you buy

Measure each side separately. Run a tape or string from corner to corner along the actual fence line, not the lot line on the plat. Many people set the fence a few inches inside the boundary to avoid disputes. Enter each straight run as its own side. A wide-angle bend counts as a corner too, because it needs a post.

Corners and ends. Corner and end posts carry rails from two directions, or tension from one side only, so they take the most load. Many builders use a 6×6 or set them deeper. If the fence ends at the house, plan a post right at the wall rather than fastening rails to the siding.

Gates by the house. Put the gate where you actually walk, usually beside the house, so you can reach the trash bins or the side yard. Leave enough width for a mower or wheelbarrow. Check whether a 4-foot opening suits you or a double gate is worth it. Hinge posts sag first, so give them the largest hole you dig.

Sloped yards. On a gentle, even slope, rack the fence: the rails follow the grade and the pickets stay plumb. On steeper or uneven ground, step it: each section is level and drops at the post, which leaves triangular gaps underneath. Stepped posts must be longer on the downhill side, so check the post length for the lowest bay.

Call 811 before digging. In the US, 811 is the free call-before-you-dig service. Contact it, or your state 811 center online, a few business days before you dig. Locators mark buried gas, power and communication lines for free. A 30-inch post hole is well within the depth of shallow service lines, so call even for a short fence.

Frequently asked questions

How deep should fence posts be set?

Follow the one-third rule: bury a third of the fence’s above-ground height, with 2 feet as the practical minimum. A 6-foot privacy fence wants posts 2 feet down in a hole about 30 inches deep, because the extra 6 inches holds a gravel bed for drainage. In cold climates, get below the frost line no matter what the rule says, or frost heave will push your posts up a little more every winter. Local code may set its own depth.

Should fence posts be 6 or 8 feet apart?

Eight feet is standard because rails come in 8-foot lengths and drop between posts without a cut. Choose 6-foot spacing when the fence takes more load: tall solid-privacy panels in windy areas, heavy hardwood pickets, or sloped yards where you rack each section. On the three-sided example, tightening to 6-foot centers adds 8 posts and 24 rails. The calculator shows the difference instantly.

How much concrete goes in each fence post hole?

Work it out from the hole: the circle’s area minus the post’s footprint, times the depth above the gravel. A 10-inch hole with 24 inches of concrete around a 4×4 holds about 0.92 cu ft, or roughly two and a half 50-pound bags. Quikrete’s sheet says two bags for a 2-foot hole, but it fills only to 3–4 inches below grade and tops off with soil. Hole size depends on your soil, frost depth and local code, so enter what you will actually dig.

How do I calculate pickets if I want gaps between them?

Add the gap to the picket width before dividing. With 5.5-inch pickets and a half-inch gap, each picket “occupies” 6 inches, so 200 feet of fence needs 2,400 ÷ 6 = 400 pickets instead of 437 butted tight. Set the gap in the advanced options and the calculator does exactly this. For shadowbox fences, run the numbers once per side of the rails, since the two alternating layers each cover the full length.

Do gates change how many posts I need?

Yes, each gate adds one post. A gate fits within one section, and it hangs between two posts, but only one of them does double duty with the fence line. Build the hinge side stout: a 4-foot gate swinging on a standard line post will pull it out of plumb within a season. Use a 6×6 or a steel-reinforced post there and set it in a wider hole.

What length posts do I need for a 6-foot fence?

Add the buried depth to the height. Two feet in the ground under a 6-foot fence makes 8 feet, which is a stock length. Go deeper for frost or a corner post and you need 9 feet, so you buy 10s and cut the tops. Pickets don’t go in the ground, so they only need the finished height, but buy them at least that long. Leave a 2-inch gap at the bottom to keep the wood out of wet soil.

Sources and assumptions

These results are planning estimates only — verify quantities with your supplier and local building code before you buy or build. See our terms of use.