Outdoor · Hardscape

Retaining Wall Calculator

Blocks by course including the buried course, caps, base and drainage stone, with the IRC height limits flagged before you dig.

Code basis: 2021 IRC R105.2, R404.4Sources

1 Wall
ft
ft
Above finished grade in front
Units
2 Block
%
5% for straight walls; 10% with curves or steps
3 Base and drainage
in
in
Blocks
170
7 courses × 23
Caps
23
16 in. caps
Base gravel
1.28yd³
1.9 t; trench 24 in. wide
Drain stone
3.89yd³
5.4 t of clean ¾ in. stone
1 course buried below grade (6.0 in.), 6 exposed. Total built height 3.50 ft.
Walls holding back a slope, a driveway, a pool or a building (a “surcharge”) need engineering at any height.

Retaining wall list

Retaining wall list
ItemQtyNotes
Wall blocks17016×6 in. face
Cap units23
Compacted base (¾ in. crushed with fines)1.50 yd³
Clean drainage stone4 yd³
Perforated drain pipe, 4 in.30 ftdaylighted at the low end
Filter fabric165 ft²
Caps are glued with a masonry adhesive; buy by the coverage printed on the tube.

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.

finished grade (front)compacted base (≥ 6 in.)drainage stoneperforated drainburied courseretained soil
Buried first course on a compacted base, clean drainage stone behind, perforated pipe at the bottom, each course set back slightly.
Buried courses = ceil(max(block height, 10% of exposed height) ÷ block height) Courses = buried + ceil(exposed height ÷ block height) Blocks = courses × ceil(length ÷ face width) × (1 + waste) Base = length × (block depth + 12 in.) × base depth × 1.15 Drain stone = length × built height × drain-zone width

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?
Count courses, not area: courses = exposed height ÷ block height (rounded up) plus the buried course(s); blocks per course = wall length ÷ block face width. A 30 ft wall, 3 ft high, in 16 × 6 in. block needs 7 courses × 23 blocks = 161, plus 5% = 170.
How deep should the first course be buried?
Segmental wall makers commonly call for burying at least one full course, or about 1 in. for every 8–10 in. of wall height, whichever is more. The calculator buries the larger of one course or 10% of the exposed height; follow your block’s installation guide.
How much gravel goes behind and under a retaining wall?
A compacted base about 6 in. deep and 12 in. wider than the block, and a zone of clean drainage stone about 12 in. thick behind the wall for its full height, with a perforated drain pipe at the bottom. For the 30 × 3 ft example that is about 1.3 yd³ of base and 3.9 yd³ of drainage stone.
How tall can I build a retaining wall without a permit or engineer?
Under IRC R105.2, retaining walls up to 4 ft from the bottom of the footing to the top of the wall are exempt from permits unless they support a surcharge (a slope, driveway or structure above). IRC R404.4 requires walls retaining more than 48 in. of unbalanced fill to be designed. Local rules may be stricter.
When does a wall need geogrid?
When it is taller than the block maker’s limit for a gravity wall (often around 3–4 ft for common units) or carries a surcharge. Geogrid layers reinforce the soil behind the wall; their length and spacing come from an engineered design.

Sources

  1. 2021 International Residential Code (IRC) — International Code Council, checked Nov 2026.

Related calculators

All outdoor tools →