Retaining Wall Calculator
Count the blocks, caps and base stone needed to build a retaining wall.
What you'll need to order
- retaining wall block
- cap block
- crushed stone base
- drainage gravel
- filter fabric
Prices vary by region and haul distance. Get quotes from at least two local suppliers.
How this calculator works
blocks = (length × 12 ÷ block length) × (height ÷ block height) × 1.05
The first course is buried, so a wall that stands 24 inches above grade needs a fourth course below it. Add one course to your height before calculating if you want a specific exposed height.
Switch the site to metric — the control is in the footer — and your inputs, your results and the tables below follow. The formula, the constants, the guidance text and the sources stay in US units on purpose: that is how the standards they come from are written, and restating them would detach each figure from the document you are meant to be able to check it against.
Where these numbers come from
- ICC International Residential Code 2021, R404.4 — retaining wall requirements; walls over 4 ft retained height need engineered design
Check the edition. Codes are amended every few years, and the one your inspector works from may not be the one named above.
Worked example
With wall length 20 ft, wall height 24 in, block length 12 in, block height 8 in, this calculator returns 63 .
Waste allowance
The headline figure includes a 5% allowance for waste and over-ordering. The exact requirement is shown alongside it.
Blocks needed for walls of common size
Every row here opens the calculator already filled in. Copy that link and the numbers travel with it.
| Job | Size | Wall blocks needed |
|---|---|---|
| Garden bed edge | 12 ft × 16 in × 12 in × 8 in | 25.20 |
| Low terrace wall | 20 ft × 24 in × 12 in × 8 in | 63.00 |
| Driveway edge wall | 40 ft × 32 in × 18 in × 8 in | 112.0 |
| Tall wall at the code limit Above 4 ft retained, engineered design is required |
30 ft × 48 in × 18 in × 8 in | 126.0 |
| Small planter | 8 ft × 16 in × 12 in × 6 in | 22.40 |
The first course is buried. Add a course below grade before working out the exposed height you want.
Frequently asked questions
How many blocks do I need for a retaining wall?
Divide the wall length in inches by the block length for blocks per course, divide wall height by block height for the number of courses, then multiply. A 20 ft wall 24 inches high using 12 by 8 inch blocks needs about 63 blocks.
How deep should the base of a retaining wall be?
Bury the first course entirely — a minimum of 6 inches, or one tenth of the wall height for taller walls. Below that goes 6 inches of compacted crushed stone in a trench at least twice the block width.
How tall can I build a retaining wall without an engineer?
Most jurisdictions cap unengineered walls at 3 to 4 ft. Above that you need a permit and a design, because the soil pressure grows with the square of the height. Check your local code before you buy.
Do I need drainage behind a retaining wall?
Yes, on any wall holding back soil. Backfill the first 12 inches behind the blocks with clean stone and run a perforated drain at the base. Water pressure behind a wall is what pushes it over, not the soil weight.