Skip to content
HammerCalc

Retaining Wall Calculator

Count retaining wall blocks from the wall length and height, plus cap blocks and the gravel base and backfill behind it.

You need approximately
126 blocks
Courses (4" block height)6
Blocks per course20
Wall blocks incl. 5% extra126
Cap blocks (top course)21
Gravel base + backfill2.13 yd³
Formula shown below

Estimates are for planning. Confirm quantities against your measured site and product packaging before ordering, and follow local building codes.

How to measure for a retaining wall

Two numbers drive the count: wall length in feet and wall height in inches. Length is a tape measure along the line of the wall. Height is from the top of the gravel base to the top of the final block course, not from grade, because the first course should be partially buried (a rule of thumb is to bury an inch of block for every foot of wall height).

Pick the block last. Garden-border blocks around 12 × 4 inches suit edging and beds up to a couple of feet. The standard 16 × 6 inch segmental block is the workhorse for walls in the 2 to 4 ft range, and 18 × 8 inch units build faster on longer runs. Bigger blocks mean fewer pieces but each one weighs more; a typical 16 × 6 retaining block runs 50 to 75 pounds.

The formula and what it assumes

Courses equals wall height divided by block height, rounded up. Blocks per course equals wall length in inches divided by block length, rounded up. Wall blocks is courses times per-course times 1.05 for breakage and cuts, and caps equals one course’s worth plus the same 5%.

The gravel line covers two things at once: a base trench 6 inches deep by 12 inches wide under the wall, and a 12 inch thick column of clean gravel backfill behind the full height of the wall, with a 15% compaction allowance on the total. For a 20 ft wall at 24 inches that’s 2.13 cubic yards. This matches standard segmental wall practice: Allan Block’s installation manual calls for a compacted gravel base under the first course and wall rock filling the block cores and 12 inches behind the block at every course. Their full spec trench is wider (up to 24 inches) on bigger walls, so treat the calculator’s figure as a floor and order gravel by the gravel calculator if your trench is oversized.

The formula assumes a straight wall of uniform height. Curves consume extra blocks (figure 10% waste instead of 5%), and stepped walls on slopes need each segment calculated at its own height.

The height threshold that changes everything

Up to about 3 feet, a properly built gravity wall with good drainage is a solid DIY project. Above that, physics stops being forgiving. Many jurisdictions require a permit above 3 or 4 feet, and engineered design (often with geogrid reinforcement layered into the backfill) is commonly required above 4 feet or wherever the wall holds back a driveway, a slope, or another structure. The threshold and the measuring rules vary by city, so a ten-minute call to your building department before ordering is the cheapest engineering you’ll ever buy. If the project is really two short terraced walls instead of one tall one, note that terraces closer together than twice the lower wall’s height behave structurally like one tall wall.

Build notes

Drainage decides the wall’s lifespan, so spend your effort there. Clean angular gravel (not fines-heavy crusher run) goes behind the block, a perforated pipe wrapped in fabric sits at the base of taller walls and daylights at the ends, and the top of the backfill gets capped with a few inches of soil graded away from the wall. Compact the base in two passes, level the first course obsessively (every error telegraphs upward), and sweep each course clean before setting the next. Cap blocks go on last with masonry adhesive. If a patio meets the top or bottom of the wall, the paver calculator sizes that part of the job.

Frequently asked questions

How many retaining wall blocks do I need?

Courses times blocks per course, plus extra. Courses is the wall height divided by the block height, rounded up; blocks per course is the wall length in inches divided by the block length, rounded up. A 20 ft wall, 24 inches tall in standard 16 × 6 inch blocks, is 4 courses of 15 blocks: 60 blocks, or 63 with the 5% allowance, plus 16 caps.

Do I need a permit for a retaining wall?

Usually yes above a height threshold, commonly 3 or 4 feet measured from the bottom of the footing, and many jurisdictions also require an engineer's design above 4 feet or whenever the wall supports a slope, driveway, or structure. Allan Block's planning guidance says most walls above 4 feet need a soils report and engineered design before a permit is issued. Call your building department before you order block; the threshold varies by city.

Why do retaining walls fail?

Water, almost every time. Saturated soil behind a wall weighs far more than dry soil and pushes hard enough to tip blocks that were never designed for it. The fixes are built in from the start: 12 inches of clean gravel backfill directly behind the block, a perforated drain pipe at the base on taller walls, and grading that sends surface water around the wall instead of into it.

Should a retaining wall lean back into the hill?

Yes. The lean is called batter or setback, and segmental blocks build it in automatically with a lip or pin offset, typically stepping each course back 3 to 12 degrees. The setback shifts the wall's weight into the slope so the soil helps hold the wall instead of pushing it over. Stacking block dead vertical throws that advantage away.