Retaining Wall Calculator
Blocks by course including the buried course, caps, base and drainage stone, with the IRC height limits flagged before you dig.
Retaining wall list
| Item | Qty | Notes |
|---|---|---|
| Wall blocks | 170 | 16×6 in. face |
| Cap units | 23 | |
| Compacted base (¾ in. crushed with fines) | 1.50 yd³ | |
| Clean drainage stone | 4 yd³ | |
| Perforated drain pipe, 4 in. | 30 ft | daylighted at the low end |
| Filter fabric | 165 ft² |
How the calculator builds the wall
A segmental retaining wall is a gravity structure: the weight of the blocks and the stone behind them holds back the soil. That only works if the base is solid, the first course is buried, and water drains out instead of building up pressure. The calculator counts each of those parts, not just the visible face.
Worked example: 30 ft long, 3 ft high
- Block face 16 × 6 in., 12 in. deep. Exposed 36 in. → 6 courses; buried max(6, 3.6) in. → 1 course; 7 courses.
- Per course: 360 ÷ 16 = 22.5 → 23. Blocks: 7 × 23 = 161 + 5% = 170. Caps: 23.
- Base trench 24 in. wide × 6 in. deep: 30 ft³ + 15% compaction = 1.28 yd³.
- Drainage zone 12 in. × 3.5 ft built height × 30 ft = 3.9 yd³ of clean stone, plus 30 ft of perforated pipe.
- Height check: 42 in. of block on 6 in. of base = 48 in., right at the 4 ft permit threshold. Exposed height is under 48 in., so no IRC design trigger.
Mistakes that make walls fail
- No drainage. Saturated soil pushes much harder than dry soil. Clean stone and a pipe that daylights at the low end are not optional.
- Base on topsoil. Dig to firm subsoil, compact it, then build up with crushed stone compacted in lifts.
- A level-looking base that isn’t. The first course must be dead level along its length; every error multiplies up the wall.
- Backfilling with the dug soil right against the blocks. Use the drainage stone zone, then soil behind it, compacted in layers.
- Ignoring what is above the wall. A driveway, a slope or a shed above the wall adds load; that wall needs engineering at any height.
Next step: price it in the retaining wall cost calculator, or order base and drainage stone separately with the gravel calculator.
Questions people ask
How many retaining wall blocks do I need?
How deep should the first course be buried?
How much gravel goes behind and under a retaining wall?
How tall can I build a retaining wall without a permit or engineer?
When does a wall need geogrid?
Sources
- 2021 International Residential Code (IRC) — International Code Council, checked Nov 2026.
Related calculators
All outdoor tools →Retaining Wall Cost Calculator
Installed cost per square foot of wall face for eight wall materials.
Gravel Calculator
Cubic yards and tons of gravel or base, with a compaction allowance.
Paver Calculator
Pavers by size and pattern, base gravel, bedding sand, edging and joint sand.
Concrete Block Calculator
CMU blocks by course, mortar bags and core-fill grout for any wall.
Concrete Calculator
Slabs, footings, columns, post holes and steps in cubic yards and 40–80 lb bags.
Concrete Slab Cost Calculator
Installed slab cost or ready-mix by the yard, any thickness, adjusted for your region.