Builder's Math

Calculators / Retaining wall calculator

Retaining wall calculator

Find how many wall blocks and caps to buy for a garden or landscape wall, and how much gravel goes under and behind it.

US units (feet, inches, pounds); metric inputs accepted · Planning and purchasing estimate · Reviewed October 20, 2026

Start from a common job: 20 ft garden wall, 2 ftRaised bed wall, 12 ft × 1 ft40 ft wall, 3 ft, medium block

Before you build: Call 811 before you dig. Walls holding back more than 4 ft of soil, or a driveway, slope or building, need an engineered design under the IRC, and many towns require a permit.

in
in
%
in
in
Add prices (optional)
$
$

Result

Supplier or contractor? Put this calculator on your own website with your logo, and get the customer’s quantities with each quote request. See how it works.

The formula

Courses  = wall height (in) ÷ block height, rounded up, + buried courses
Blocks   = courses × wall length (in) ÷ block length × (1 + extra %)
Caps     = wall length (in) ÷ cap length × (1 + extra %)
Base     = length × 2 ft wide × base depth → cubic yards × 1.4 tons
Drainage = length × 1 ft wide × built height → cubic yards × 1.4 tons

Example: a wall 20 ft long and 2 ft high with 12 × 4 inch blocks has 6 courses above ground and 1 buried, so 7 courses of 20 blocks: 147 blocks with 5% extra, and 21 caps. A 6 inch base 24 inches wide is about 1.04 tons of gravel, and 12 inches of drainage stone behind the wall is about 2.42 tons.

Quick answers for common walls

One buried course, 5% extra, a 6 in base 24 in wide and 12 in of drainage stone behind the wall.
WallBlocks (12 × 4 in face)CapsBase gravelDrainage stone
10 ft long, 1 ft high42110.52 tons0.69 tons
20 ft long, 2 ft high147211.04 tons2.42 tons
20 ft long, 3 ft high210211.04 tons3.46 tons
30 ft long, 2 ft high221321.56 tons3.63 tons
50 ft long, 2 ft high368532.59 tons6.05 tons
50 ft long, 3 ft high525532.59 tons8.64 tons

How a block wall is built

  • Base: a trench about twice the block depth wide, with 6 inches of compacted crushed gravel, and the first course buried.
  • Drainage: 12 inches of clean stone behind the blocks, with landscape fabric between the stone and the soil. Taller walls and wet soil also need a perforated drain pipe at the base.
  • Setback: most blocks have a lip that steps each course back slightly, which helps the wall lean into the hill.
  • Height limits: the IRC requires an engineered design for walls holding back more than 4 ft of soil, or more than 2 ft when they also carry other loads such as a driveway or a slope above. Many block makers require geogrid reinforcement at lower heights; follow their installation guide.

Sources and assumptions

Block faces are typical sizes for segmental retaining wall blocks; check the size printed on your block and change Block face if needed. Gravel uses 1.4 tons per cubic yard. Height limits from the 2021 International Residential Code, section R404.4.

Questions

How many retaining wall blocks do I need?

Courses times blocks per course. A 20 ft wall 2 ft high with 12 × 4 inch blocks has 6 courses above ground plus 1 buried, 20 blocks each: 140 blocks, or 147 with 5% extra.

How much gravel goes behind a retaining wall?

A zone about 12 inches wide for the full height of the wall. For a 20 ft wall 2 ft high that is about 1.7 cubic yards, or 2.42 tons, of clean drainage stone.

How many blocks should be buried?

At least one course, and more for taller walls. The block maker’s installation guide gives the depth for each wall height.

When does a retaining wall need an engineer?

Under the IRC, when it holds back more than 4 ft of soil, or more than 2 ft while also carrying other loads such as a driveway or a slope above. Local rules can be stricter, and many towns require a permit for taller walls.

References and review

Units convert with exact definitions: 1 ft = 12 in = 0.3048 m, 1 yd³ = 27 ft³. Results round up to whole bags, sheets and pieces so you don’t come up short. Last reviewed October 20, 2026. If your bag, pallet or supplier lists a different figure, use theirs: change the matching field above.

Related calculators