Retaining Wall Calculator
A retaining wall calculator turns wall length, height and block size into rows, blocks, cap blocks and gravel. A 30 foot wall standing 3 feet above grade needs 132 blocks of 8 by 18 inches, with one buried course and 10 percent waste. Walls that retain more than 48 inches of unbalanced fill need engineered design under IRC R404.4.
This tool is part of our project calculators. Use it to price and order materials. It does not replace a stamped design.
- Updated October 2026
- Sources Cited
- No Login Required
- Free to Use
Your materials
Blocks to order
132
6 rows (5 exposed + 1 buried) x 20 per row = 120, plus 10% waste
- Cap blocks
- 30
- Face area
- 100 sq ft
- Built exposed height
- 40 in
- Base gravel
- 1.11 cu yd
- Drainage gravel
- 4.44 cu yd
- Setback at top
- 3 in
- Batter angle
- 5.36 deg
Gravel volumes are loose cubic yards. Ask your supplier about compaction.
Rows and blocks
Rounds up each row and adds your waste percentage.
Base and drainage
6 inch base and 12 inch drainage gravel in cubic yards.
Engineer flag
Warns when the wall passes the IRC R404.4 triggers.
Estimates are for material planning. Check block size, setback and base depth against your block maker's manual. Walls over the code triggers need a licensed engineer.
How to calculate retaining wall blocks
Divide the wall height by the block height and round up to get exposed rows. Add the buried courses. Divide the wall length by the block length and round up to get blocks per row. Multiply rows by blocks per row, then add waste and round up.
- Measure the wall length and the height above grade in feet.
- Read the block height and face length from the block label.
- Add buried courses from the block maker's spec.
- Add waste. The default is 10 percent. Raise it for curves and many cuts.
- Divide the wall length by the cap length for the cap count.
Face area is wall length times built height. Blocks equal rows times blocks per row. Gravel volumes use length times width times depth, divided by 27 for cubic yards.
If you only have a face area, check it with our square footage calculator. The block count still needs the wall length and block size.
Worked example: a 30 foot wall, 3 feet high
A 30 foot wall that stands 3 feet above grade is 36 inches tall. With 8 inch blocks that is 4.5 rows, which rounds up to 5. One buried course makes 6 rows. Each row holds 20 blocks of 18 inches. That is 120 blocks, or 132 with 10 percent waste. Caps at 12 inches take 30.
| Wall | Rows | Per row | Blocks to order | Caps | Base, cu yd | Drainage, cu yd |
|---|---|---|---|---|---|---|
| 20 ft long, 2 ft high | 4 | 14 | 62 | 20 | 0.74 | 1.98 |
| 30 ft long, 3 ft high | 6 | 20 | 132 | 30 | 1.11 | 4.44 |
| 30 ft long, 4 ft high | 7 | 20 | 154 | 30 | 1.11 | 5.19 |
| 50 ft long, 4 ft high | 7 | 34 | 262 | 50 | 1.85 | 8.64 |
The 8 by 18 inch block and 12 inch cap are example sizes. Real blocks vary by maker. The 30 foot, 4 foot wall is right at the 48 inch trigger, so check the engineering notice in the calculator.
Setback per course and batter angle
Setback per course is how far each row steps back from the row below. The wall leans into the soil. The batter angle equals the arctangent of the setback divided by the block height. A 0.75 inch setback on an 8 inch block gives 5.36 degrees.
| Setback per course | Setback at top | Batter angle |
|---|---|---|
| 0 in | 0 in | 0 deg |
| 0.5 in | 2 in | 3.58 deg |
| 0.75 in | 3 in | 5.36 deg |
| 1 in | 4 in | 7.13 deg |
Setback at the top counts the steps between the 5 exposed rows, so it equals the setback times 4. Your block maker states the setback for each block. Do not guess it.
Base gravel and drainage gravel
Plan a 6 inch compacted base under the wall and 12 inches of drainage gravel behind its full height. For the 30 foot, 3 foot example, the base takes 1.11 cubic yards and the drainage zone takes 4.44 cubic yards, in loose volume.
Allan Block asks for the foundation to be compacted to at least 95 percent of Standard Proctor before the base goes in. Drainage gravel moves water away from the soil side of the wall.
Geogrid and when you need an engineer
IRC R404.4 calls for engineered design when a wall is not supported at the top and retains more than 48 inches of unbalanced fill. It also applies to a wall over 24 inches that resists lateral loads beyond soil. The design must check overturning, sliding and bearing with a safety factor of 1.5.
Geogrid is a reinforcing sheet laid between courses and buried in the backfill. Block makers publish tables that show when a wall needs it and how long each layer must be. Allan Block says to check its gravity wall table and then its geogrid charts. This calculator does not set the spacing. Enter the layers and the length from your design and it returns the square feet.
Retaining wall or garden wall
A retaining wall holds soil back. It needs a base, drainage, setback and sometimes geogrid. A garden or interior block wall holds nothing back and is usually mortared. For that job, use the block wall tab in the brick calculator.
If your wall holds soil and uses concrete blocks, stay on this page, even when the blocks look like the ones in a garden wall.
Concrete, rebar, gravel and fill for the same wall
Most block walls need more than blocks. Order the gravel with the gravel calculator, and the backfill with the fill dirt calculator. A poured concrete wall or footing needs the concrete calculator and the rebar calculator.
Add the gravel, backfill and concrete volumes in cubic yards, then order from your supplier in one delivery.
What this calculator does not cover
This page counts materials. It does not design the wall, size the geogrid or check slope stability. It shows no prices, because this run had no sourced unit costs. It does not plan curved walls, tiered walls, timber or stone walls, or poured concrete walls.
Inputs are in feet and inches. Metric input is not built yet.
Methodology and sources
Published October 2026. Last updated October 2026. Next review October 2027.

Reviews: volume calculators · 38 calculators reviewed
Alex Rivera is a Licensed Professional Engineer (PE) with 18 years of structural and civil engineering experience. He holds PE licenses in California (#C-89412) and Texas (#P.E.-98765). He previously served as Engineer of Record on 250+ residential foundation designs at Thornton Tomasetti. At CalcSummit, he writes and personally reviews every structural, concrete, rebar, deck, and framing calculator against current IRC and ACI 318 standards.
Full profile →