How to use this calculator
- 1Measure the length of the wall and the height you want above the ground in front of it.
- 2Choose your block, or type its face length, height and depth from the product sheet.
- 3Leave the buried courses on automatic (the first row or two go below ground) and choose a straight or curved wall.
- 4Leave “Add cap blocks” ticked if you will finish the top with caps, and check the cap length.
- 5Read off the blocks, caps, trench size and the gravel to order for the base and the drainage zone.
The formula
- 01Courses above ground = height ÷ block height, rounded up
- 02Buried courses (automatic) = max(6 in, height above ground ÷ 11) ÷ block height, rounded up — Allan Block's 1 in per ft of total wall height
- 03Blocks = (courses above ground + buried courses) × wall length ÷ block length × (1 + spare %), rounded up
- 04Caps = wall length ÷ cap length × (1 + spare %), rounded up
- 05Trench = 2 × block depth wide; base depth + buried courses deep
- 06Base gravel = length × (trench width × base depth + ½ × block depth × buried height) × (1 + compaction %)
- 07Drainage gravel = length × drainage width × built height × (1 + compaction %)
Segmental retaining wall blocks are stacked dry, so there are no mortar joints: each course is simply the wall length divided by the block length. The first course is buried so the bottom of the wall cannot slide out, which is why it is counted on top of the courses you see. A part course is rounded up, and the results show how high the finished wall will really be.
The gravel follows the method in a home-improvement retailer's DIY retaining wall guide: a trench twice as wide as the block depth, a compacted gravel base (at least 6 in / 150 mm in the Allan Block and Versa-Lok guides), gravel behind the buried course, and 12 in (300 mm) of drainage gravel behind the wall. Gravel shrinks when it is tamped, so 25 % is added, and the weight uses a loose density of about 1.6 t/m³ (1.35 US tons per cubic yard).
In the US, the International Residential Code (R404.4) says walls that hold back more than 48 in (1.2 m) of soil, or more than 24 in (0.6 m) with an extra load such as a driveway or a slope above, must be designed to accepted engineering practice. Many councils also need a permit at around this height, often measured from the bottom of the footing. The calculator warns you above 1.2 m (4 ft) and stops at 3 m (10 ft).
Worked example
A 20 ft wall standing 2 ft above the ground, built with 16 in × 6 in blocks, has 5 courses including the buried one. Buy 79 blocks and 21 caps.
Dig a trench 24 in wide and 12 in deep, and order about 1.56 tons of base gravel and 2.5 tons of drainage gravel.
Tips before you buy
- Start at the lowest point of the wall. On a slope, step the base up by whole block heights so that every base block is below ground.
- Take your time levelling the first course, front to back and side to side. Every course above it follows it.
- Stagger the vertical joints like brickwork, and pull each block forward against the lip of the course below so the wall leans back into the slope.
- Glue the caps (or the top course if you have no caps) with exterior-grade concrete adhesive.
- Plant or turf the ground above and in front of the wall to cut down erosion.
Frequently asked questions
How many retaining wall blocks do I need?
Work out the number of rows: the height divided by the block height, rounded up, plus the buried row or rows. Multiply by the blocks in each row (wall length ÷ block length) and add 5 % for cuts and breakage, or 15 % for a curved wall. The calculator does this for you.
How deep should the first course be buried?
Allan Block asks for at least 6 in (150 mm) of buried block, or 1 in (25 mm) for every foot (300 mm) of wall height if that is more. The calculator rounds that up to whole courses: one 6 in or 8 in block for most garden walls, two courses of 4 in blocks.
How much gravel do I need behind a retaining wall?
Guides ask for a strip of free-draining crushed stone at least 12 in (300 mm) wide behind the blocks, for the full height of the wall. For a 20 ft wall 2 ft high that is 40 ft³ before the extra for tamping.
How tall can I build a retaining wall without an engineer?
In the US the IRC requires an engineered design for walls holding back more than 4 ft (1.2 m) of soil, or more than 2 ft (0.6 m) when there is an extra load such as a driveway or a slope. Local rules can be stricter and many need a permit, so ask your building department or council before you start.
What do retaining wall blocks sit on?
A trench with at least 6 in (150 mm) of compacted crushed stone, levelled carefully. Never set the first course straight on soil: it will settle unevenly and the wall will lean or crack.
Do I need caps on a retaining wall?
Caps are optional, but they finish the wall, shed rain and hold the top course together. They are usually glued on with exterior concrete adhesive.
Also searched as: retaining wall block calculatorhow many retaining wall blocks do I needgarden wall block calculatorlandscape wall calculatorretaining wall gravel calculator
Sources
- Home Depot – DIY retaining wall installation and materials calculators (PDF)
- Allan Block – Basic residential installation (6 in base, 12 in wall rock, burial)
- Allan Block – Commercial installation manual: buried block at least 6 in (150 mm) or 1 in (25 mm) per 1 ft (300 mm) of wall height
- Versa-Lok – Standard unit (6 × 16 × 12 in, 4 ft unreinforced maximum)
- International Residential Code R404.4 – Retaining walls
Formulas last reviewed: September 30, 2026 ·How we check our formulas