Retaining Wall Calculator

Estimate wall blocks, cap blocks, base gravel and drainage gravel for a segmental retaining wall from its length and height.

Commonly one course, or about 10% of the height; check your block maker’s guide.
%

Result

Courses (including buried)—
Wall blocks (no waste)—blocks
Wall blocks to order—blocks
Cap blocks—caps
Base gravel—
Drainage gravel—

A segmental retaining wall is made of interlocking blocks stacked without mortar on a compacted gravel base, with clean drainage stone behind. It is a popular way to hold back a garden bed, level a yard or build terraces. This calculator estimates the wall blocks, the cap blocks on top, and the two gravel volumes: the base under the wall and the drainage zone behind it.

How to use the retaining wall calculator

  1. Enter the length and the exposed height of the wall.
  2. Enter the block height and face length from the label or spec sheet. Common units are 4, 6 or 8 inches high, and 12 to 18 inches long.
  3. Set the buried courses. The bottom course is set below ground so the wall is anchored; follow your block manufacturer’s guidance.
  4. Set the base trench width and depth, the drainage gravel width and the waste allowance.

Retaining wall formula

Courses = ⌈ height ÷ block height ⌉ + buried compacted soil base gravel drainage gravel buried course cap wall height Blocks per course = ⌈ length ÷ block length ⌉ calcmaple.com
Section through a block wall: one course is buried, the wall height stacks the visible courses, and gravel sits under and behind the blocks.
Courses = ⌈ height ÷ block height ⌉ + buried courses
Blocks per course = ⌈ length ÷ block length ⌉
Wall blocks = courses × blocks per course
Caps = ⌈ length ÷ cap length ⌉
Base gravel = length × trench width × base depth ÷ 27
Drainage gravel = length × drainage width × height ÷ 27 (cubic yards)

Because each block is rounded up, you will normally have a few pieces left to cut. Walls with curves or corners need additional blocks and cuts.

Worked example: 30 ft long, 3 ft tall, 8 × 18 in blocks

  1. Courses: 36 ÷ 8 = 4.5 → 5, plus 1 buried = 6 courses.
  2. Per course: 360 ÷ 18 = 20 blocks. Total: 6 × 20 = 120 blocks.
  3. Caps (12 in long): 360 ÷ 12 = 30 caps.
  4. Base gravel: 30 × 2 × 0.5 ÷ 27 = 1.11 cu yd.
  5. Drainage gravel: 30 × 1 × 3 ÷ 27 = 3.33 cu yd.

Materials for common walls (8 × 18 in block, 5% waste)

WallCoursesBlocksWith wasteCapsBase gravel (cu yd)Drainage (cu yd)
10 × 2 ft4283070.370.74
20 × 2 ft45659140.741.48
20 × 3 ft68489140.742.22
30 × 3 ft6120126201.113.33
40 × 3 ft6162171271.484.44
50 × 4 ft7238250341.857.41

Caps are 18 in long in this table. Gravel volumes are net compacted volumes; order a little extra, because compaction reduces loose stone.

Build it to last

  • Compact the base in lifts and level it carefully, because every course depends on it.
  • Add a drain. A perforated pipe at the bottom of the drainage zone, outlet to daylight, prevents pressure.
  • Batter the wall. Many systems lean back slightly each course. The batter is built into the block lip.
  • Know the limits. Walls over about 4 feet, walls near a structure, and walls with a slope or driveway above need an engineer.

For the gravel quantities by weight, see the Gravel Calculator; for patio bases use the Paver Base Calculator. If you are building a mortared concrete block wall instead, start with the Concrete Block Calculator, and for a footing use the Concrete Footing Calculator.

Frequently asked questions

How many blocks do I need for a retaining wall?

Divide the wall height (plus any buried course) by the block height to get the number of courses, divide the length by the block length to get blocks per course, and multiply the two. Add a few percent for cuts and breakage.

How tall can a DIY retaining wall be?

Many jurisdictions require a permit and an engineered design for walls above about 4 feet, measured from the base of the wall, or where there is a slope or a load above it. Check local rules; this calculator estimates materials only.

Why is drainage gravel needed?

Water trapped behind a wall builds pressure and is a leading cause of failure. A column of clean gravel and a perforated drain pipe behind the wall lets water escape.

How deep should the base be?

Block manufacturers typically call for a compacted gravel base, often at least 6 inches deep for walls up to a few feet; your block’s installation guide sets the number. Enter it in the base depth box.

Do I need geogrid?

Taller walls or walls with a steep slope or heavy surcharge use geogrid layers tied into the backfill. These are engineering decisions and are not included here.

Related calculators

Last updated October 21, 2026. Found a problem with this calculator? Tell us.