Retaining wall calculator

This retaining wall calculator counts the blocks, rows and cap blocks for a segmental block wall from its length, height and block size, then works out the gravel base in the trench and the drainage stone behind the wall in cubic yards and tons.

  • Block size presets or your own, with buried rows
  • Cap blocks, rows and trench depth
  • Base gravel and drainage stone in yards and tons

Last updated

How many retaining wall blocks do I need?

ft
ft
in
in
rows
%
$
in
in
$
in
in
in wide
%
tons/cu yd
Wall blocks to order 70 blocks 240 in ÷ 18 in = 13.33 blocks per row × 5 rows = 66.7 blocks, + 5% = 70 blocks
Rows
5 (4 above, 1 buried)
Cap blocks
14
Wall face
66.7 sq ft
Trench depth
14 in
Base gravel
0.81 cu yd, 1.1 tons
Drainage stone
2.72 cu yd, 3.67 tons
Block cost
Add a price
Height: 36 in − 4 in cap = 32 in ÷ 8 in = 4 rows above ground, + 1 buried row = 5 rows (40 in of block) Base: 20 × 2 ft × (6 ÷ 12) = 20 cu ft, + 10% = 22 cu ft = 0.81 cu yd. Drainage: 20 × 1 ft × 3.33 ft = 66.7 cu ft, + 10% = 73.3 cu ft = 2.72 cu yd

Next: price the base gravel, check the drainage stone in cubic yards, or plan a patio at the foot of the wall with the paver calculator.

How to use the retaining wall calculator

  1. Enter the wall length in feet and how tall it should stand above the ground, including the cap.
  2. Pick a block size, or enter the face length and height printed on the pallet tag or spec sheet. Measure the face, the side you see.
  3. Set the rows buried below ground. One full row is the usual starting point; taller walls need more.
  4. Keep the cap box ticked if the top gets cap blocks, and enter the cap size from the spec sheet.
  5. Enter the trench width, base depth and the width of drainage stone behind the wall, then read the gravel in cubic yards and tons.

How to calculate retaining wall blocks

Work out the rows first, then the blocks in each row. Rows come in whole blocks, so round the row count up.

rows above ground = (height above ground − cap height) ÷ block height, rounded up
total rows = rows above ground + buried rows

blocks = (wall length in inches ÷ block face length) × total rows × (1 + extra %)

caps = (wall length in inches ÷ cap length) × (1 + extra %)

Round blocks and caps up to whole units. The gravel is a volume, the same as any gravel job:

base gravel (cu yd) = length (ft) × trench width (ft) × base depth (ft) ÷ 27
drainage stone (cu yd) = length (ft) × stone width (ft) × block height of the wall (ft) ÷ 27
tons = cubic yards × density

The drainage stone runs the full height of the block rows, buried rows included. Allan Block also fills the hollow cores of its blocks with the same stone; that is not counted here, so add a little if your blocks have cores. The trench depth is the base depth plus the buried rows.

Worked example

The default: a wall 20 ft long that stands 3 ft above the ground, built with Allan Block AB Classic blocks (18 in long, 8 in high), one row buried, AB Capstone caps (18 in long, 4 in high), 5% extra blocks, a 24 in wide trench with 6 in of base gravel, 12 in of drainage stone behind the wall, 10% extra gravel and crushed stone at 1.35 tons per cubic yard.

  1. Rows: 36 in − 4 in cap = 32 in, ÷ 8 in = 4 rows above ground, + 1 buried row = 5 rows. That is 40 in of block.
  2. Blocks per row: 20 ft × 12 = 240 in, ÷ 18 in = 13.33 blocks.
  3. Blocks: 13.33 × 5 rows = 66.7, + 5% = 70 blocks.
  4. Caps: 13.33, + 5% = 14 caps.
  5. Base gravel: 20 × 2 ft × 0.5 ft = 20 cu ft, + 10% = 22 cu ft, ÷ 27 = 0.81 cubic yards, × 1.35 = 1.1 tons.
  6. Drainage stone: 20 × 1 ft × 3.33 ft = 66.7 cu ft, + 10% = 73.3 cu ft, ÷ 27 = 2.72 cubic yards, × 1.35 = 3.67 tons.
  7. Trench depth: 6 in of base + 8 in buried row = 14 in.

Order 70 blocks, 14 caps, about 1 yard of base gravel and about 3 yards of drainage stone. The wall face, buried row included, is 20 × 3.33 = 66.7 square feet.

How deep should the first row of a retaining wall be buried?

Bury at least 6 inches of block. Allan Block sets 6 inches as the minimum on flat ground and adds 1 inch for each foot of wall height over 6 feet. Unilock says the trench should hold at least one complete row below grade. With 8 inch blocks, one buried row meets both rules for walls up to 8 feet; 4 inch blocks need 2 rows (last checked 15 November 2026).

Wall heightAllan Block minimum buried blockBuried rows, 4 in blockBuried rows, 6 in blockBuried rows, 8 in block
2 ft6 in211
3 ft6 in211
4 ft6 in211
6 ft6 in211
7 ft7 in221
8 ft8 in221

Allan Block asks for more when the ground slopes away in front of the wall, when the soil may wash out, or when someone may dig near the wall later. Its guide says to bury the wall at least one full row below the lowest planned future digging. The trench depth is the base gravel plus the buried rows: 6 inches of base under one 8 inch row makes a 14 inch trench.

How tall can a retaining wall be without an engineer?

About 3 to 4 feet. VERSA-LOK says its walls can be built 3 to 4 feet tall without engineering or soil reinforcement in most situations. Unilock says walls over 4 feet must be reinforced with geogrid, and treats walls over 2 feet as structural walls. Allan Block requires a drain pipe on gravity walls over 4 feet (all last checked 15 November 2026).

ManufacturerWhat it says
VERSA-LOK3 to 4 ft without engineering or soil reinforcement in most situations; taller walls need engineering and reinforcement
UnilockWalls over 4 ft need geogrid; walls over 2 ft are generally structural; never build past the product’s stated maximum height
Allan BlockA drain pipe for gravity walls over 4 ft, vented to daylight every 50 ft; the AB Collection suits common residential walls up to 6 ft when designed properly

The limit for your wall depends on the block, the soil, any slope above the wall, and loads such as a driveway. Check the maximum height on your block’s spec sheet, and ask your local building department whether a permit or an engineered design is needed before you dig.

Retaining wall materials, block by block

An Allan Block AB Classic has an 18 × 8 inch face, about 1 square foot, so a wall takes about 1 block per square foot of face. Smaller 12 × 4 inch blocks take 3 per square foot. Divide 144 by the face length times the height in inches for any block. Building a wall of standard concrete block instead? The concrete block calculator counts 8 × 8 × 16 inch blocks, mortar and grout.

Block faceFace area (sq ft)Blocks per sq ftBlocks per row, 10 ftRows for 3 ft, no cap
Allan Block AB Classic, 18 × 8 in116.675
12 × 4 in0.333109
16 × 6 in0.671.57.56
16 × 8 in0.891.137.55

Counts are before extra. The materials for a block wall, with the figures Allan Block publishes for its walls:

MaterialWhere it goesAllan Block figure
Wall blocksRows from the trench to the topAB Classic: 18 in long, 8 in high, 12 in deep, 75 lb
Cap blocksOne row on topAB Capstone: 18 in long, 4 in high, 12 in deep, 55 lb
Base gravel (wall rock)Compacted in the trench under the first rowTrench 24 in wide; at least 6 in of rock
Drainage stone (wall rock)Behind the wall and in the block cores12 in behind the block, in lifts of 8 in or less
Drain pipeBehind the bottom rowGravity walls over 4 ft, vented every 50 ft

Block sizes vary by maker and by plant, so check the spec sheet for the block you buy. Gravel weight also varies; ask your supplier for the tons per yard of their stone.

Common questions

How many retaining wall blocks do I need for a 20 ft wall?

With 18 inch long blocks, each row takes 13.33 blocks. A wall that stands 3 ft above the ground with one buried row and a 4 inch cap needs 5 rows of 8 inch blocks: 66.7 blocks, or 70 with 5% extra, plus 14 caps.

How do you calculate how many blocks for a retaining wall?

Divide the wall length in inches by the block face length for blocks per row, then multiply by the number of rows, buried rows included. A 10 ft wall of 12 × 4 inch blocks takes 10 per row. Built 2 ft tall with no cap, it has 6 rows above ground plus 1 buried row, so 7 × 10 = 70 blocks before extra.

How much gravel do I need for a retaining wall base?

Multiply length × trench width × base depth, in feet, and divide by 27. A 20 ft wall on a 24 inch wide trench with 6 inches of gravel takes 20 cubic feet, or 0.74 cubic yards, about 1 ton of crushed stone at 1.35 tons per yard.

How much drainage gravel goes behind a retaining wall?

Allan Block fills 12 inches behind the block with wall rock. For a 20 ft wall with 40 inches of block, that is 20 × 1 × 3.33 = 66.7 cubic feet, or 2.47 cubic yards before extra, about 3.3 tons at 1.35 tons per yard.

How many cap blocks do I need?

Divide the wall length in inches by the cap length. A 20 ft wall with 18 inch caps takes 13.33 caps, so 14. A 50 ft wall takes 33.3, so 34 before extra, or 35 with 5% extra.

How many blocks are on a pallet of retaining wall block?

It depends on the block, so check the pallet tag. Divide your block count by the pieces per pallet and round up. If a pallet holds 40 blocks, 70 blocks is 1.75 pallets, so 2 pallets, or 1 pallet plus 30 loose blocks if your store sells singles.

Sources

  • Allan Block: AB Collection. AB Classic 8 in high, 18 in long, 12 in deep, 75 lb, about 1 sq ft; AB Capstone 4 in high, 18 in long, 12 in deep, 55 lb; common residential walls up to 6 ft when designed properly. Last checked 15 November 2026
  • Allan Block: Basic Installation. Base trench 24 in wide; at least 6 in of wall rock in the trench; wall rock in the cores and 12 in behind the block; lifts of 8 in or less; drain pipe for gravity walls over 4 ft, vented every 50 ft. Last checked 15 November 2026
  • Allan Block: Proper Embedment Guidelines. Minimum 6 in of buried block on flat grade; add 1 in for each foot of wall height over 6 ft; embed at least one full course below planned future excavation. Last checked 15 November 2026
  • Unilock: Wall Construction 101. Trench holds at least one complete row below grade; walls over 4 ft need geogrid; walls over 2 ft are generally structural. Last checked 15 November 2026
  • VERSA-LOK: FAQ. Walls 3 to 4 ft tall without engineering or soil reinforcement in most situations. Last checked 15 November 2026
  • Vertigraph gravel and aggregate calculator. Loose estimating density for crushed stone of about 1.35 tons per cubic yard, used as the editable default (same as the gravel calculator)

See the methodology page for how YardageHQ builds and checks its calculators.