Retaining wall block calculator

Calculate how many retaining wall blocks and cap stones you need, plus drainage gravel.

Quick sizes:
ft
ft
in
in
in
$
Optional. Shows the total cost.

The numbers start with a worked example. Change any box and the result updates instantly. Your last entries are remembered on this device.

Wall blocks (5% extra)

315

blocks

Courses10
Blocks per course30
Cap stones30
Drain gravel (1 ft wide)3.89 cu yd
Estimated cost$1,103

Estimate only. Check product labels and local codes. Updated December 2026.

How to use the retaining wall block calculator

Segmental retaining wall blocks stack in courses. This calculator counts blocks per row, the number of rows including the buried course, the caps on top and the gravel behind the wall.

Enter your measurements in the boxes above. Every result updates as you type, and you can add a price to see the total cost. Use Copy result to save the numbers to your phone before you go to the store.

Formula

Blocks per course = wall length × 12 ÷ block length
Courses = height × 12 ÷ block height (+1 buried)
Caps = wall length × 12 ÷ cap length

Worked example

With wall length 30 ft, wall height (exposed) 3 ft, block length 12 in, block height 4 in, cap length 12 in, buried first course: Yes, you need 315 blocks (courses: 10; blocks per course: 30). With a price per block of $3.50, the estimated cost is $1,103.

Quick reference chart

Common sizes worked out with the same formula and the default settings above.

Wall (12×4 in block)BlocksCaps
10 ft long × 2 ft high7410
20 ft long × 2 ft high14720
20 ft long × 3 ft high21020
30 ft long × 3 ft high31530
40 ft long × 3 ft high42040
50 ft long × 4 ft high68350

Tips before you buy

  • Bury the first course about 1 inch for every 8 inches of wall height, at least one full block.
  • Fill 12 inches behind the wall with clean gravel and add a perforated drain pipe at the base.
  • Walls over 3 to 4 ft usually need geogrid and an engineer. Check local code.

Frequently asked questions

How many blocks for a 3 ft retaining wall?

A 20 ft long, 3 ft high wall with 12 × 4 inch blocks needs about 20 blocks per row and 10 rows, about 210 blocks with extra.

How deep should a retaining wall base be?

Dig a trench for 6 inches of compacted gravel base plus the buried block course.

Do I need gravel behind a retaining wall?

Yes. Water pressure behind the wall is the main reason walls fail.

Add this calculator to your website

Run a blog, a store or a contractor website? Paste this code to give your visitors this free retaining wall block calculator.

Retaining Wall Block Calculator by HatCalc – more free calculators →