How we calculate this
Burying 1 in per foot means only 11/12 of the wall shows, which is where the 12/11 comes from. The drain pipe is added automatically when the wall is over 4 ft tall or when you tick the poor-drainage box, following Allan Block. The permit check measures from the bottom of the base to the top of the cap, as the 2024 IRC does. Hollow block cores also take drainage stone; ask your dealer how much, as it depends on the block.
Worked example
A 20 ft wall, 2 ft above the ground, in AB Classic block with an AB Capstone cap:
- Courses: 24 in × 12/11 = 26.2 in, minus the 4 in cap, ÷ 8 in = 2.77, so 3 courses. The wall is 28 in in total with 2 5/16 in buried.
- Blocks: 240 in ÷ 18 in = 14 per course × 3 = 42, plus 5% = 45 blocks and 15 caps.
- Trench: under 4 ft, so 18 in wide with a 4 in base: 0.4 cu yd of base gravel.
- Drainage stone: 12 in behind 24 in of block = 1.6 cu yd.
When to call a pro
A retaining wall holds back heavy, often wet soil, and water building up behind it adds to the load. Get an engineer involved if the wall is over 4 ft from the bottom of the base to the top, if anything sits above it (a slope, a driveway, a pool, a building or a fence), if you’re stacking two walls close together, or if the soil is wet clay. Call 811 a few business days before you dig.
Numbers this calculator uses
Every value comes from the data files behind this page. Anything marked PLACEHOLDER hasn’t been checked against a source yet, and you can override it in the calculator where it matters.
| Number | Value | Source |
|---|---|---|
| Base trench width | 24 in | Allan Blockchecked 2026-10-30 |
| Compacted base depth | 6 in | Allan Blockchecked 2026-10-30 |
| Smaller trench allowed for walls under | 48 in | Allan Blockchecked 2026-10-30 |
| Base trench width, walls under 4 ft | 18 in | Allan Blockchecked 2026-10-30 |
| Base depth, walls under 4 ft | 4 in | Allan Blockchecked 2026-10-30 |
| Buried block per foot of wall height | 1 in | Allan Blockchecked 2026-10-30 |
| Wall rock behind the block | 12 in | Allan Blockchecked 2026-10-30 |
| Drain pipe required for gravity walls taller thanAlso required on sites with poor drainage. | 48 in | Allan Blockchecked 2026-10-30 |
| Drain pipe vented to daylight every | 50 ft | Allan Blockchecked 2026-10-30 |
| Tallest retaining wall exempt from a permit (bottom of footing to top)R105.2, and only if the wall supports no surcharge (a slope, driveway or building above it). | 48 in | 2024 IRCchecked 2026-10-30 |
| Cubic feet in a cubic yard | 27 | Unit definition |
| Perforated drain pipe per rollADS 4 in perforated pipe is sold in 100 ft rolls (also 50 ft). | 100 ft | Lowe'schecked 2026-10-30 |
| Bagged paver base volume | 0.5 cu ft | The Home Depotchecked 2026-10-31 |
| Waste factor for block and gravel (default; you can change it)Allan Block recommends ordering 5% extra block for problems during construction. Steps and stairs need more. | 5% | Allan Blockchecked 2026-10-30 |
| Allan Block AB Classic | 8 in high × 18 in long × 12 in deep | Allan Blockchecked 2026-10-30 |
| Other blockStarting value for the “other” size fields; you enter your own. | 6 in high × 16 in long × 10 in deep | Example input |
| Allan Block AB Capstone | 4 in high × 18 in long × 12 in deep | Allan Blockchecked 2026-10-30 |
| Other capStarting value for the “other” size fields; you enter your own. | 3 in high × 16 in long × 12 in deep | Example input |
Sources
| Source | What we use from it | Last checked |
|---|---|---|
| Allan Block: Basic retaining wall installationAllan Block · manufacturer guide | Base trench 24 in wide and 6 in deep plus 1 in per foot of wall height for buried block (18 in wide and 4 in deep for walls under 4 ft), 12 in of wall rock behind the block, drain pipe required for gravity walls over 4 ft or poor drainage, vented every 50 ft. | 2026-10-30 |
| Allan Block AB Collection: block and cap dimensionsAllan Block · manufacturer spec | AB Classic: 8 in high, 18 in long, 12 in deep, about 1 sq ft of wall face. AB Capstone: 4 in high, 18 in long, 12 in deep. | 2026-10-30 |
| Allan Block: Material estimation worksheetAllan Block · manufacturer guide | Order an extra 5% of block to cover problems during construction. | 2026-10-30 |
| ADS 4 in x 100 ft corrugated perforated pipe (04010100), Lowe's listingLowe's · store listing | 4 in perforated drain pipe sold in 100 ft rolls. | 2026-10-30 |
| 2024 International Residential Code, Section R105.2 (Work exempt from permit)International Code Council · building code | Permit exemptions: fences up to 7 ft, retaining walls up to 4 ft (bottom of footing to top of wall, no surcharge), detached accessory buildings up to 200 sq ft, small low unattached decks. | 2026-10-30 |
| 811: the free national call-before-you-dig serviceCommon Ground Alliance · safety service | Contact 811 a few business days before digging so buried utility lines are marked, free of charge. | 2026-10-30 |
Spotted a number that’s out of date? Tell us and we’ll recheck it and note the fix in the change log.
Frequently asked questions
How many retaining wall blocks do I need?
Divide the wall length by the block’s face length for blocks per course, then multiply by the number of courses, including the buried one. An Allan Block AB Classic is 18 in long and 8 in high, about 1 sq ft of wall face per block.
How deep do I bury the first course?
Allan Block’s instructions bury 1 in of block for every foot of wall height, on top of a compacted base: 6 in deep in a 24 in wide trench, or 4 in deep and 18 in wide for walls under 4 ft.
How tall can a retaining wall be without a permit?
The 2024 IRC exempts retaining walls up to 4 ft, measured from the bottom of the footing to the top of the wall, unless the wall supports a surcharge such as a slope, driveway or building above it (R105.2). Many towns are stricter. Taller walls may need an engineered design.
Does a retaining wall need a drain pipe?
Allan Block requires one for any reinforced wall, any gravity wall over 4 ft tall, and any site with poor drainage, placed low at the back of the base and vented to daylight every 50 ft. It’s cheap insurance on wet or clay soil even for a short wall.
What gravel goes behind a retaining wall?
Allan Block calls for 12 in of wall rock (clean drainage stone) behind the block and in the block cores, filled course by course to the height of the block. Compactable base gravel goes in the trench under the first course.
How wide should the trench be?
24 in wide for Allan Block walls in general, and 18 in for walls under 4 ft. Depth is the base plus the buried block; the calculator shows both.
Save this plan

This card shows the example on this page. Use Download summary image above to make one with your own numbers, or pin this one to come back to the calculator later.