A segmental retaining wall is made of interlocking blocks stacked without mortar on a compacted gravel base, with clean drainage stone behind. It is a popular way to hold back a garden bed, level a yard or build terraces. This calculator estimates the wall blocks, the cap blocks on top, and the two gravel volumes: the base under the wall and the drainage zone behind it.
How to use the retaining wall calculator
- Enter the length and the exposed height of the wall.
- Enter the block height and face length from the label or spec sheet. Common units are 4, 6 or 8 inches high, and 12 to 18 inches long.
- Set the buried courses. The bottom course is set below ground so the wall is anchored; follow your block manufacturer’s guidance.
- Set the base trench width and depth, the drainage gravel width and the waste allowance.
Retaining wall formula
Blocks per course = ⌈ length ÷ block length ⌉
Wall blocks = courses × blocks per course
Caps = ⌈ length ÷ cap length ⌉
Base gravel = length × trench width × base depth ÷ 27
Drainage gravel = length × drainage width × height ÷ 27 (cubic yards)
Because each block is rounded up, you will normally have a few pieces left to cut. Walls with curves or corners need additional blocks and cuts.
Worked example: 30 ft long, 3 ft tall, 8 × 18 in blocks
- Courses: 36 ÷ 8 = 4.5 → 5, plus 1 buried = 6 courses.
- Per course: 360 ÷ 18 = 20 blocks. Total: 6 × 20 = 120 blocks.
- Caps (12 in long): 360 ÷ 12 = 30 caps.
- Base gravel: 30 × 2 × 0.5 ÷ 27 = 1.11 cu yd.
- Drainage gravel: 30 × 1 × 3 ÷ 27 = 3.33 cu yd.
Materials for common walls (8 × 18 in block, 5% waste)
| Wall | Courses | Blocks | With waste | Caps | Base gravel (cu yd) | Drainage (cu yd) |
|---|---|---|---|---|---|---|
| 10 × 2 ft | 4 | 28 | 30 | 7 | 0.37 | 0.74 |
| 20 × 2 ft | 4 | 56 | 59 | 14 | 0.74 | 1.48 |
| 20 × 3 ft | 6 | 84 | 89 | 14 | 0.74 | 2.22 |
| 30 × 3 ft | 6 | 120 | 126 | 20 | 1.11 | 3.33 |
| 40 × 3 ft | 6 | 162 | 171 | 27 | 1.48 | 4.44 |
| 50 × 4 ft | 7 | 238 | 250 | 34 | 1.85 | 7.41 |
Caps are 18 in long in this table. Gravel volumes are net compacted volumes; order a little extra, because compaction reduces loose stone.
Build it to last
- Compact the base in lifts and level it carefully, because every course depends on it.
- Add a drain. A perforated pipe at the bottom of the drainage zone, outlet to daylight, prevents pressure.
- Batter the wall. Many systems lean back slightly each course. The batter is built into the block lip.
- Know the limits. Walls over about 4 feet, walls near a structure, and walls with a slope or driveway above need an engineer.
For the gravel quantities by weight, see the Gravel Calculator; for patio bases use the Paver Base Calculator. If you are building a mortared concrete block wall instead, start with the Concrete Block Calculator, and for a footing use the Concrete Footing Calculator.
Frequently asked questions
How many blocks do I need for a retaining wall?
Divide the wall height (plus any buried course) by the block height to get the number of courses, divide the length by the block length to get blocks per course, and multiply the two. Add a few percent for cuts and breakage.
How tall can a DIY retaining wall be?
Many jurisdictions require a permit and an engineered design for walls above about 4 feet, measured from the base of the wall, or where there is a slope or a load above it. Check local rules; this calculator estimates materials only.
Why is drainage gravel needed?
Water trapped behind a wall builds pressure and is a leading cause of failure. A column of clean gravel and a perforated drain pipe behind the wall lets water escape.
How deep should the base be?
Block manufacturers typically call for a compacted gravel base, often at least 6 inches deep for walls up to a few feet; your block’s installation guide sets the number. Enter it in the base depth box.
Do I need geogrid?
Taller walls or walls with a steep slope or heavy surcharge use geogrid layers tied into the backfill. These are engineering decisions and are not included here.