Retaining Wall Calculator — Blocks and Base
Enter wall length and height with your block size. You get the block count, the courses, the base gravel — and a warning if the wall needs an engineer.
About the Retaining Wall Calculator
A retaining wall holds back soil, and soil is far heavier than it looks. Under about four feet this is a weekend job with a good base. Over four feet it becomes a structure that can fail, and most jurisdictions require an engineered design and a permit — so this calculator tells you which side of that line you are on before it tells you how many blocks to buy.
How to use it
- Measure the wall length and the finished height above grade.
- Enter your block dimensions — 12 inches long by 8 inches high is common.
- Check the engineering flag before ordering anything.
- Add the base gravel: a compacted trench under the first course is what keeps the wall straight.
The formula
Courses = (height × 12) ÷ block height
Blocks per course = (length × 12) ÷ block length
Total = courses × blocks per course
The first course should be buried about one tenth of the wall height, so a 3 ft wall has its bottom course below grade. That buried course is doing more work than any other.
Worked examples
| Wall | Block | Courses | Per course | Total blocks |
|---|---|---|---|---|
| 20 ft × 3 ft | 12" × 8" | 5 | 20 | 100 |
| 30 ft × 2 ft | 12" × 8" | 3 | 30 | 90 |
| 40 ft × 4 ft | 18" × 8" | 6 | 27 | 162 |
| 15 ft × 3 ft | 12" × 6" | 6 | 15 | 90 |
Anything above 4 ft almost always needs an engineered design, a permit, and usually geogrid reinforcement tied back into the soil. That is not a formality — failed retaining walls take patios and driveways with them.
Common mistakes
- Skipping the compacted base. Six inches of compacted gravel under the first course. A wall built on soil settles unevenly and bulges, and there is no fixing it afterwards.
- No drainage behind the wall. Water pressure behind a wall is what actually pushes it over. Gravel backfill and a drain pipe at the base are not optional.
- Building over 4 ft without engineering. Most codes require a permit and a design above 4 ft. Insurance may not cover a failure of unpermitted work.
- Forgetting the buried course. The bottom course goes below grade — about a tenth of wall height. Build it at grade and the wall has nothing anchoring its toe.
Terms explained
- Course
- One horizontal row of blocks. Height divided by block height, rounded up.
- Setback
- The slight backward step of each course, which leans the wall into the slope it retains.
- Geogrid
- Reinforcing mesh laid between courses and extending back into the soil. Required on most walls above 4 ft.
- Base trench
- The compacted gravel bed the first course sits in. Level it obsessively — every error above is inherited from it.
Common questions
- How many blocks do I need for a retaining wall?
- Divide wall height by block height for courses, and length by block length for blocks per course, then multiply. A 20 ft × 3 ft wall in 12×8 blocks needs about 100.
- How tall can a retaining wall be without engineering?
- Usually 4 feet, but it varies by jurisdiction. Check locally — above the limit you need a permit and an engineered design.
- How deep should the base of a retaining wall be?
- Six inches of compacted gravel, with the first course buried about one tenth of the wall height.
- Do I need drainage behind a retaining wall?
- Yes. Gravel backfill and a perforated drain at the base. Water pressure is the most common cause of retaining wall failure.
- What is geogrid and do I need it?
- Reinforcing mesh laid between courses and extending into the soil behind. Generally required above 4 feet, and worth it on lower walls holding heavy loads.
- How much gravel for a retaining wall base?
- A trench 12 inches wide by 6 inches deep along the wall — roughly 0.37 cubic yards for a 20 ft wall.
- Can I build a retaining wall on a slope?
- Yes, by stepping the base trench down in level sections. Never let the base follow the slope — each step must be level.