Skip to content

Landscape & Aggregates

Retaining Wall Block Calculator

This retaining wall calculator counts blocks, caps, base gravel and drainage stone; our yard drainage guide covers wall types and limits. For a segmental (dry-stacked block) retaining wall, the calculator counts the courses — including a buried first course — the blocks per course, cap units, compacted base gravel and the clean drainage stone behind the wall.

Height matters. Under the International Residential Code (R404.4), retaining walls that are not laterally supported at the top and retain more than 48 in of unbalanced fill must be designed. Many manufacturers and municipalities set lower limits or require permits — check before you build.

Results from this retaining wall calculator are planning estimates; confirm quantities and prices with your supplier or contractor before you order.

Enter your project

ft
in
m
ft
in
m
in
cm
in
cm
in
cm
in
cm
in
cm
in
cm
%

Extra for cuts, breakage and spillage.

Results

Your results will appear here

Enter your measurements and press Calculate. Defaults show a typical example.

How to use the retaining wall calculator

  1. Enter the wall length and exposed height.
  2. Enter the block face size from the manufacturer.
  3. Keep the first course buried unless the manufacturer says otherwise.
  4. Adjust base and drainage dimensions to the manufacturer's installation guide.

Formula

Courses = ⌈height ÷ block height⌉ (+1 buried). Blocks = courses × ⌈length ÷ block length⌉ × (1 + waste). Base (yd³) = length × trench width × base depth ÷ 27. Drainage (yd³) = length × drainage width × total height ÷ 27.

Worked example

A 30 ft wall, 3 ft exposed, with 12 × 4 in blocks: 9 + 1 = 10 courses × 30 = 300, or 315 blocks with 5% waste, plus 30 caps, 1.11 yd³ of base and 3.70 yd³ of drainage stone (12 in wide behind the full 40 in of block).

Tips for using the retaining wall calculator

  • Bury the first course and set it on a compacted gravel base for a stable wall.
  • Backfill with clean drainage stone and add a perforated pipe behind taller walls.
  • Walls over about 4 ft, or walls holding loads, usually need an engineer and a permit.
Dry-stacked fieldstone garden wall with potted plants at its base

Retaining Wall Calculator FAQs

How much does a retaining wall cost?

National cost data show most walls at $20–$53 per sq ft of face (average $33), with interlocking block $15–$35 and natural stone $20–$90 (updated October 2026).

Do retaining walls need drainage?

Yes. Water pressure behind a wall is a leading cause of failure; manufacturers specify clean stone backfill and often a perforated drain pipe at the base.

When do I need an engineer?

Under IRC R404.4, walls retaining more than 48 in of unbalanced fill (not supported at the top) must be designed; walls with surcharges such as driveways or slopes above often need design at lower heights.

Estimate before you call a contractor

Run the numbers with our free calculators so you can compare bids with confidence.