Free material calculators for home projects. No sign-up.Prices last checked 2026-10-31

Retaining Wall Block Calculator: Blocks, Caps, Gravel and Drainage

Enter your wall’s length and height to count blocks and caps and get the trench size, base gravel, drainage stone and drain pipe. Burial depth, trench size and drainage follow Allan Block’s installation instructions; any block works if you enter its size.

6 sources citedSources last checked 2026-10-30How we calculate thisChange log

Your numbersResults update as you type
Wall
ft

ft

Adds the drain pipe even on a short wall.

Block

%

Allan Block recommends ordering 5% extra block for problems during construction. Steps and stairs need more.

Courses of block
3
Height above ground
2 ft 1 3/4 in
Buried block
2 5/16 in
Trench depth
6 5/16 in
Trench width
18 in
Wall face
47 sq ft
Retaining wall diagramCross-section of a retaining wall: 3 courses of block and a cap, 2 ft 1 3/4 in above grade with 2 5/16 in buried, on 4 in of compacted gravel in a 18 in wide trench, with drainage stone behind.2 ft 1 3/4 in above ground2 5/16 in buried4 in base18 in trench3 courses of 8 in block + cap12 in of drainage stone behindFront gradeRetained soil
  • Caution: A wall holding up a slope, driveway, parking area, pool or building (a “surcharge”) isn’t exempt from a permit at any height (R105.2). Have one like that designed by an engineer. 2024 IRC
  • Passes: At 2 ft 8 in from the bottom of the base to the top, this wall is under the 4 ft permit threshold (R105.2), as long as nothing heavy sits above it. 2024 IRC
  • Note: Call 811 a few business days before you dig. It’s free, and they mark buried utility lines. Common Ground Alliance

Shopping list

Shopping list
ItemBuy
Allan Block AB Classic (8 x 18 x 12 in)3 courses × 14 per course. Includes 5% waste.45 blocks
Allan Block AB Capstone (4 x 18 x 12 in)Glue caps down with the adhesive your block maker recommends.15 caps
Base gravel (compactable), bulkTrench 18 in wide, 4 in of compacted base.0.4 cu yd
Instead of bulk: paver base, 0.5 cu ft bagsHandy for short walls or without a truck; compare with the bulk cost plus delivery.21 bags
Drainage stone (wall rock), bulk12 in behind the block, full height. Hollow cores take extra; ask your dealer.1.6 cu yd

Cost estimate

Prices from Home Depot South Loop (#1950), Chicago, IL, checked 2026-10-31. Bulk gravel and sand from The Mulch Center, Deerfield, IL, checked 2026-10-31; delivery is extra. Pick your state to use a store in your region. Your store’s prices will differ, so type them into the price boxes; they’re saved in this browser only. Items marked PLACEHOLDER weren’t found at that store or yard: their price is the middle of the other regions’ prices, or a rough example when no store we checked sells them.

Cost estimate
ItemPriced qtyUnit priceCost
Allan Block AB Classic (8 x 18 x 12 in) PLACEHOLDERAllan Block isn't sold at the regional Home Depot stores we checked (2026-10-31); ask an Allan Block dealer. Rough example price.45 blocks$6.50per block$292.50
Allan Block AB Capstone (4 x 18 x 12 in) PLACEHOLDERAllan Block caps aren't sold at the regional Home Depot stores we checked (2026-10-31); ask an Allan Block dealer. Rough example price.15 caps$5.00per cap$75.00
Base gravel (compactable), bulkprice source, checked 2026-10-31. The Mulch Center, Deerfield, IL: Grade 8 Limestone (3/4 in and smaller, with fines) at $45.00 per ton, which works out to $67.50 per cu yd. The yard lists a ton as about 2/3 cu yd. Material only; delivery is extra.0.4 cu yd$67.50per cu yd$27.00
Instead of bulk: paver base, 0.5 cu ft bags PLACEHOLDERAlternative, not in the total. Not found at Home Depot South Loop (#1950), Chicago, IL, so this is the middle price of the 6 other regional stores that list it, checked 2026-10-31.21 bags$6.47per bag$135.87
Drainage stone (wall rock), bulk PLACEHOLDERNot listed at The Mulch Center, Deerfield, IL, so this is the middle price of the 2 landscape yards in other regions that list it, checked 2026-10-31. Material only; delivery is extra.1.6 cu yd$74.50per cu yd$119.20
Estimated total USES PLACEHOLDER PRICES$513.70

How we calculate this

buried block = 1 in per foot of total wall height courses = ⌈(height above ground × 12/11 − cap height) ÷ block height⌉ blocks = courses × ⌈length ÷ block length⌉ × (1 + waste) caps = ⌈length ÷ cap length⌉ × (1 + waste) trench = 24 in wide, 6 in base + buried block (under 4 ft: 18 in wide, 4 in base) base gravel = length × trench width × base depth drainage stone = length × 12 in × block height

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:

  1. 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.
  2. Blocks: 240 in ÷ 18 in = 14 per course × 3 = 42, plus 5% = 45 blocks and 15 caps.
  3. Trench: under 4 ft, so 18 in wide with a 4 in base: 0.4 cu yd of base gravel.
  4. 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.

Numbers this calculator uses and where each comes from
NumberValueSource
Base trench width24 inAllan Blockchecked 2026-10-30
Compacted base depth6 inAllan Blockchecked 2026-10-30
Smaller trench allowed for walls under48 inAllan Blockchecked 2026-10-30
Base trench width, walls under 4 ft18 inAllan Blockchecked 2026-10-30
Base depth, walls under 4 ft4 inAllan Blockchecked 2026-10-30
Buried block per foot of wall height1 inAllan Blockchecked 2026-10-30
Wall rock behind the block12 inAllan Blockchecked 2026-10-30
Drain pipe required for gravity walls taller thanAlso required on sites with poor drainage.48 inAllan Blockchecked 2026-10-30
Drain pipe vented to daylight every50 ftAllan 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 in2024 IRCchecked 2026-10-30
Cubic feet in a cubic yard27Unit definition
Perforated drain pipe per rollADS 4 in perforated pipe is sold in 100 ft rolls (also 50 ft).100 ftLowe'schecked 2026-10-30
Bagged paver base volume0.5 cu ftThe 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 Classic8 in high × 18 in long × 12 in deepAllan Blockchecked 2026-10-30
Other blockStarting value for the “other” size fields; you enter your own.6 in high × 16 in long × 10 in deepExample input
Allan Block AB Capstone4 in high × 18 in long × 12 in deepAllan Blockchecked 2026-10-30
Other capStarting value for the “other” size fields; you enter your own.3 in high × 16 in long × 12 in deepExample input

Sources

Sources and the date each was last checked
SourceWhat we use from itLast checked
Allan Block: Basic retaining wall installationAllan Block · manufacturer guideBase 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 specAB 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 guideOrder 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 listing4 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 codePermit 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 serviceContact 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

Summary card for the retaining wall example: diagram and key quantities.

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.

Save to Pinterest