DollarMath Home

Home › Retaining wall calculator

Retaining Wall Calculator: Blocks, Caps and Gravel

Plan a segmental block retaining wall. Enter the wall length, exposed height and block size to get the number of rows and blocks (including the buried course), cap blocks, base and drainage gravel, drain pipe and cost.

How to calculate retaining wall blocks

  1. Rows: exposed height in inches ÷ block height, rounded up, plus the buried course. Manufacturers call for the first row to be buried at least 1 in for every 8 in of wall height, or 6 in, whichever is more, so one buried row is typical for walls under 4 ft.
  2. Blocks per row: wall length in inches ÷ block face length, rounded up.
  3. Total: rows × blocks per row, plus 5% for cuts and breakage. Caps run along the top row.

Worked example

A 30 ft wall, 3 ft high, with 16 × 6 in blocks needs 36 ÷ 6 = 6 exposed rows plus 1 buried, so 7 rows. Each row is 360 ÷ 16 = 22.5, so 23 blocks. That is 161 blocks, or 170 with 5% extra, and 23 caps. The 24 in wide, 6 in deep base trench takes 1.1 cu yd of crushed stone, and 12 in of drainage gravel behind the wall takes about 3.9 cu yd more. At $4 a block, $5 a cap and $45 a yard of gravel, the materials cost about $1,020.

Gravel and drainage

Water pressure behind a wall is the main reason walls bulge and fail. Good drainage is not optional:

  • Base: 6 in of compacted crushed stone (¾ in minus), at least 24 in wide, perfectly level front to back and side to side.
  • Backfill: 12 in of clean ¾ in drainage stone directly behind the blocks for the full height, with landscape fabric between the stone and the soil.
  • Drain pipe: 4 in perforated pipe at the base behind the wall, sloped to daylight at one end.

Height limits

Wall heightWhat you need
Up to 3 ftGravity wall, DIY friendly with proper base and drainage
3 to 4 ftGravity wall with careful setback; check the block maker's chart
Over 4 ft or with a slope, driveway or building aboveEngineered design with geogrid; most places require a permit

For the gravel itself, see our gravel calculator; for a patio at the top or bottom of the wall, try the paver calculator.

Frequently asked questions

How many retaining wall blocks do I need?

Divide the wall length in inches by the block length to get blocks per row, and the height in inches by the block height (plus one buried row) to get rows. Multiply and add 5%. A 30 ft wall, 3 ft tall, in 16 × 6 in blocks needs about 170.

How deep should the base be for a retaining wall?

Dig a trench about 24 in wide and deep enough for 6 in of compacted crushed stone plus a buried course of block, roughly 1 in of buried block for every 8 in of wall height.

Do I need a permit for a retaining wall?

In many places walls over 4 ft tall, or any wall holding up a driveway, slope or building, need a permit and an engineered design. Check with your local building department.

Estimates for common situations. Check the coverage on the product you buy and follow your local building code.