Skip to content
Yardox

Retaining wall calculator

Work out how many retaining wall blocks you need, how many courses including the buried one, how big the base trench is and how much gravel goes under and behind the wall, following the Allan Block installation guide.

Wall

3 ft4 in4 in

Wall sections

Height above the finished ground in front of the wall. The buried course is added for you.

Block

in
in
in
lb
in

Leave empty if the wall has no caps.

Blocks to buy100 blocks
Add this calculator to your website

Free for any website: paste this code where the calculator should appear. It keeps itself up to date, fits its height to the content and links back to the full page with the explanations.

How to use it

  1. 01Enter each straight section of the wall with its length and its height above the finished ground in front of it.
  2. 02Pick the block or enter the face size and weight from the product sheet. Add the cap length if the wall gets caps.
  3. 03Read the blocks, the courses, the trench and the gravel for the base and behind the wall.
  4. 04If the wall is over 4 ft, stop here and get it engineered: the calculator only covers gravity walls.

How it is calculated

Allan Block buries the first course 1 in for every foot of wall height, sets the blocks on a compacted gravel base in a trench, and fills 12 in behind the blocks with wall rock so water can drain.

Courses
n = ⌈H / (11/12) / block height⌉
Blocks per course
⌈L / block length⌉
Base gravel
L × trench width × base depth
Wall rock
L × 12 in × total wall height

The buried part is 1/12 of the total height, so the total is the height above ground divided by 11/12, rounded up to whole courses.

Walls under 4 ft get an 18 in wide trench with 4 in of base; taller walls get 24 in and 6 in. Walls over 4 ft also need a drain pipe behind the base.

The Versa-Lok engineering bulletin says that, generally, any wall over 4 ft should be engineered. Taller walls usually need geogrid, which this calculator does not size.

Worked example

A 30 ft wall, 3 ft above the lawn, in AB Classic

  1. 36 in / (11/12) = 39.3 in, so 5 courses of 8 in = 40 in, with 4 in below ground.
  2. 360 / 18 = 20 blocks per course, 100 blocks, about 7,500 lb.
  3. Trench 18 in wide with 4 in of gravel, dug 8 in deep: 15 cu ft of base gravel.
  4. Wall rock behind the wall: 30 ft × 1 ft × 3.33 ft = 100 cu ft, about 3.7 cu yd.

Getting the order right

Get the first course right

Level the first course carefully, block to block and front to back. Every error there shows up higher up.

Compact in thin lifts

Allan Block fills and compacts behind the wall in lifts of 8 in or less, on the blocks and behind them.

Step the base on slopes

On sloping ground, step the base trench up in course heights instead of following the slope.

Common mistakes

  • Setting the first course on top of the ground instead of burying it.
  • Backfilling with clay soil instead of free-draining wall rock.
  • Building a tall wall without an engineer or geogrid.
  • Forgetting the drain pipe on a wall over 4 ft.

Questions

How many retaining wall blocks do I need?

Divide the wall length by the block length for blocks per course, then multiply by the number of courses, including the buried one. A 30 ft wall 3 ft high in 8 × 18 in blocks takes 5 courses of 20, or 100 blocks.

How deep should the first course be buried?

Allan Block buries 1 in for every foot of wall height. In practice you round up to whole courses, so a 3 ft wall in 8 in blocks ends up with 4 in below ground.

How much gravel goes behind a retaining wall?

Allan Block fills 12 in behind the blocks with wall rock for the full height. For a 30 ft wall with 40 in of block, that is 100 cu ft.

How tall can I build a retaining wall myself?

The Versa-Lok engineering bulletin says that, generally, walls over 4 ft should be engineered. Local rules may require a permit at a lower height, so check before you dig.

Guides on this topic

  • How many blocks for a retaining wall?

    Count retaining wall blocks from length and height, including the buried course, base trench and drainage gravel, and know when a wall needs an engineer.

Sources

  1. [1]Basic installation – residential retaining walls. Allan Block. Base trench 24 in (600 mm) wide and 6 in (150 mm) deep, or 18 in (460 mm) and 4 in (100 mm) for walls under 4 ft (1.2 m), plus buried block of 1 in per 1 ft (25 mm per 300 mm) of wall height; 12 in (300 mm) of wall rock behind the block; drain pipe for gravity walls over 4 ft; compact in lifts of 8 in (200 mm) or less.. Checked November 6, 2026
  2. [2]AB Collection – unit specifications. Allan Block. AB Classic and AB Stones: 8 × 18 in face (200 × 460 mm), 12 in (300 mm) deep, 75 lb (34 kg), about 1 sq ft of face, about 11 blocks per m².. Checked November 6, 2026
  3. [3]Versa-Lok SRW Walls – Rule of Thumb Guidelines (Engineering Services Technical Bulletin, 06/10/10). Versa-Lok. Generally, any wall greater than 4 ft high should be engineered. Standard unit 6 × 16 in face, 12 in deep, 82 lb, 0.66 sq ft.. Checked November 6, 2026

Formulas and sources last checked on November 6, 2026. How we calculate