Retaining wall calculator
Enter the wall length and the height you want showing above the ground, pick a block, and this calculator gives the blocks to buy including the course you bury, the cap units for the top and the crushed rock for the base and drainage zone. A 20 ft wall standing 24 in tall in Allan Block's AB Classic takes 56 blocks, 14 caps and about 2.16 cu yd of rock. Above 48 in (1,219 mm) of retained soil, or less with a slope or driveway above, the wall needs an engineer.
Retaining wall calculator
v1 · US and metricEnter the wall length and the height you will see above the ground, and pick a block. The result gives blocks including the buried course, caps, and the gravel for the base and drainage zone.
Result
Enter your measurements and press Calculate.
Formula and assumptions
Buried depth (in) = 1 in per ft of exposed height; courses = (exposed + buried) ÷ block height, rounded up; metric:Buried depth = 25 mm per 300 mm of exposed height; courses = (exposed + buried) ÷ block height, rounded upBlocks = courses × (wall length ÷ block length, rounded up); caps = wall length ÷ 18 in, rounded up; metric:Blocks = courses × (wall length ÷ block length, rounded up); caps = wall length ÷ 460 mm, rounded upBase rock = length × trench width × 6 in; drainage rock = length × 12 in × total wall height; metric:Base rock = length × trench width × 150 mm; drainage rock = length × 300 mm × total wall height- Block sizes and weights are from Allan Block's AB Collection specifications (Allan Block Corporation). Other brands differ, so check your block's face size.
- Allan Block: trench depth is 6 in (150 mm) plus 1 in (25 mm) of buried block per foot of wall height. Allan Block: dig the base trench 24 in (600 mm) wide; for walls under 4 ft, 18 in (460 mm) wide.
- Place at least 6 in (150 mm) of compacted wall rock in the base trench. Fill block cores and 12 in (300 mm) behind the blocks with wall rock, course by course. Rock inside the block cores is not included, because Allan Block does not publish a per-block figure.
- Rock weight uses Vulcan's estimator puts clean coarse limestone aggregate at 96 lb/ft3 (1,538 kg/m3), about 1.30 short tons per cubic yard.
- IRC-based R404.4: walls not braced at the top that retain over 48 in (1219 mm) of unbalanced fill, or over 24 in (610 mm) tall with added loads, must be engineered (safety factor 1.5). Local rules vary, and many places also need a permit; check with your building department.
- Allan Block requires a drain pipe for any reinforced wall, gravity walls over 4 ft (1.2 m) tall, or poorly drained sites, vented every 50 ft (15 m).
- This calculator estimates materials. It does not check that a wall is stable or meets code.
How many blocks for a retaining wall 20 ft long and 2 ft high?
A 20 ft wall with 24 in showing above the ground needs 56 AB Classic blocks: four courses of 14, one of them partly buried. It also needs 14 cap units for the top and 2.16 cu yd (58.33 cu ft) of wall rock, about 2.8 tons, for the base trench and the drainage zone behind the blocks. Those are the figures the calculator shows when it loads in US units. The blocks and caps together weigh just under 5,000 lb, so plan the delivery and the barrow route before the pallet arrives.
The height to enter is the exposed height: from the finished ground in front of the wall to the top of the last block, not counting the cap. The calculator adds the buried depth itself. Measure the length along the face of the wall. For a curved wall, run a tape or string along the front edge of the planned curve rather than measuring the straight line between the ends.
The block choice matters more than people expect. Of the three Allan Block units in the list, the two smaller ones have half the face area of AB Classic, one by being shorter in length and the other by being lower, so the same wall needs twice as many of them. Each of the smaller ones weighs less than half as much, which can make the job easier by hand.
How does the calculator count blocks, caps and rock?
It works out how many courses fill the exposed plus buried height, multiplies by the blocks in each course, and adds rock for a base and a drainage zone that follow Allan Block's installation details.
- Buried depth: Allan Block buries 1 in (25 mm) of block for every foot (300 mm) of wall height.
- Courses: (exposed height + buried depth) ÷ block height, rounded up.
- Blocks per course: wall length ÷ block face length, rounded up.
- Blocks: courses × blocks per course, then any extra you add.
- Caps: wall length ÷ cap length, rounded up. An AB Capstone is 18 in (460 mm) long, 12 in (300 mm) deep and 4 in (100 mm) high.
- Base rock: wall length × trench width × base depth. Allan Block: dig the base trench 24 in (600 mm) wide; for walls under 4 ft, 18 in (460 mm) wide.
- Drainage rock: wall length × the drainage zone depth behind the blocks × total wall height including the buried part.
- Rock weight: volume × the density of clean coarse crushed limestone.
Worked example: a 30 ft wall 48 in high
Buried depth: 48 in is 4 ft, so 4 in. Total height: 52 in. Courses: 52 ÷ 8 = 6.5, rounded up to 7. Blocks per course: 360 in ÷ 18 = 20. Blocks: 140. Caps: 20. At exactly 4 ft the wall no longer counts as under 4 ft, so the trench is the full 24 in (600 mm) wide. Base rock: 360 × 24 × 6 = 51,840 cu in. Drainage rock: 360 × 12 × 52 = 224,640 cu in. Together that is 160 cu ft, or 5.93 cu yd, which at 96 lb/ft3 weighs 7.68 tons.
This wall sits exactly at the IRC-based limit for retained soil, so the calculator shows no engineer warning. One more inch and it would.
Worked example: metric wall in AB Jumbo Junior
A 6 m wall with 600 mm exposed gives 50 mm buried and four courses. Each course takes 27 blocks. An AB Jumbo Junior block is 9 in (230 mm) long. The result is 108 blocks, 14 caps and 1.61 m³ of rock, about 2.47 tonnes.
| Wall | Block | Blocks | Caps | Wall rock | Warnings |
|---|---|---|---|---|---|
| 20 ft × 24 in exposed | AB Classic | 56 (4 courses) | 14 | 2.16 cu yd, 2.8 tons | None |
| 30 ft × 48 in exposed | AB Classic | 140 (7 courses) | 20 | 5.93 cu yd, 7.68 tons | None; at the IRC-based limit |
| 10 ft × 60 in exposed | AB Classic | 63 | 7 | 2.38 cu yd, 3.08 tons | Engineer; drain pipe |
| 10 ft × 30 in, driveway above | AB Classic | 35 | 7 | 1.28 cu yd, 1.66 tons | Engineer, because of the surcharge |
| 6 m × 600 mm exposed | AB Jumbo Junior | 108 | 14 | 1.61 m³, 2.47 tonnes | None |
| 10 ft × 12 in exposed | AB Lite Stone | 28 | 7 | 0.68 cu yd, 0.88 tons | None |
| Block | Height (in) | Depth (in) | Length (in) | Weight (lb) | Setback (°) | Face per unit (sq ft) | Units per sq ft | Units per m² |
|---|---|---|---|---|---|---|---|---|
| AB Classic | 8 | 12 | 18 | 75 | 6 | 1 | 1 | 11 |
| AB Stones | 8 | 12 | 18 | 75 | 12 | 1 | 1 | 11 |
| AB Rocks | 8 | 12 | 18 | 75 | 6 | 1 | 1 | 11 |
| AB Jumbo Junior | 8 | 9.5 | 9 | 35 | 6 | 0.5 | 2 | 22 |
| AB Lite Stone | 4 | 12 | 18 | 35 | 6 | 0.5 | 2 | 22 |
How much gravel goes under and behind a retaining wall?
Allan Block calls for a compacted rock base under the first course and a band of rock behind the blocks for the full height. Place at least 6 in (150 mm) of compacted wall rock in the base trench. Fill block cores and 12 in (300 mm) behind the blocks with wall rock, course by course. Allan Block: trench depth is 6 in (150 mm) plus 1 in (25 mm) of buried block per foot of wall height.
The rock behind the wall usually outweighs the rock underneath. In the 20 ft default wall, the drainage zone is about three quarters of the total. That surprises people who expect a dry-stacked wall to sit on a bit of sand with soil shovelled back behind it. Allan Block's details do not allow that: the drainage zone lets water out so it cannot build pressure behind the blocks, and the soil behind it goes back in thin, compacted layers. Backfill behind the wall rock in lifts of no more than 8 in (200 mm), compacting each with a plate compactor.
The calculator does not include rock inside the block cores, because Allan Block does not publish a per-block volume for core fill. Allow a little more rock than the result for that, especially with AB Classic, and buy the rock as a single delivery so the grade is the same throughout.
Rock weight uses one density for every job. Vulcan's estimator puts clean coarse limestone aggregate at 96 lb/ft3 (1,538 kg/m3), about 1.30 short tons per cubic yard. Other stone types are heavier or lighter, so give your supplier the volume and let them convert. Prices have climbed: the US Geological Survey's Mineral Commodity Summaries 2026 estimate the average unit value of US crushed stone at 18.5 USD per metric ton in 2025, well up on 2021. That is a national producer value, not a delivered yard price. The gravel in cubic yards or tonnes calculator converts the volume for other stone types, and the path and driveway gravel guide covers grades and compaction.
How much extra block should I order?
The default extra is 0%. We found no figure from Allan Block or any other manufacturer for a breakage or waste allowance on segmental retaining wall blocks, so the calculator does not invent one. Its count already rounds every course up to a whole block, and rounds the number of courses up too, so a straight wall comes out at or slightly above what it needs.
Add some extra for walls with corners, curves, steps in the base or steps in the top, where blocks are cut or split. Corners and curves are where most cutting happens; a straight wall between two stopped ends needs little or none. The waste allowance explainer lists the figures that manufacturers and trade bodies do publish for other materials.
When does a retaining wall need an engineer?
Under the IRC-based rule, a wall that is not braced at the top needs an engineered design once it retains more than 48 in (1,219 mm) of soil, or more than 24 in (610 mm) with a slope, driveway or building above it. The wording we checked is the 2025 California Residential Code, section R404.4, which follows the International Residential Code text. IRC-based R404.4: walls not braced at the top that retain over 48 in (1219 mm) of unbalanced fill, or over 24 in (610 mm) tall with added loads, must be engineered (safety factor 1.5).
The calculator measures retained soil by the exposed height you enter. If that is over the first limit, it adds an engineer note. If you answer Yes to something above or behind the wall and the height is over the second limit, it adds the same note. Either way it still gives quantities, as a starting point for the engineer's design, which may change the block, add geogrid reinforcement or widen the base.
Drainage has its own threshold. Allan Block requires a drain pipe for any reinforced wall, gravity walls over 4 ft (1.2 m) tall, or poorly drained sites, vented every 50 ft (15 m). The calculator adds a drain pipe note for walls over that height. It does not count pipe; order perforated pipe for the full length of the wall plus the run to an outlet.
Local rules differ from the model code, and permit rules vary from place to place. Ask your building department before you dig.
What changes for metric and UK walls?
In metric mode the length is in metres and the height in millimetres, and the results come out in cubic metres and tonnes. The block dimensions are Allan Block's own metric sizes, and the buried depth becomes 25 mm per 300 mm of wall height. The engineer thresholds are converted from the US code values rather than taken from any UK or EU rule.
We found no UK manufacturer data for segmental retaining wall blocks, and no UK guidance stating the height at which a garden retaining wall needs an engineer, so the calculator does not offer UK products or UK limits. If you build in the UK or Europe with a different block, check its face size against the options here, and ask a structural engineer or building control about any wall that holds back significant ground. Great Britain's block market is dominated by building blocks rather than landscape units: Great Britain concrete block deliveries were 54.2 million square meters in 2025 (dense 18.4, lightweight 13.8, aerated 22.1), down from 73.4 million in 2021, per DBT Table 11c.
When is the result wrong or doesn't apply?
The calculator handles a straight or gently curved gravity wall of one Allan Block unit on level ground. These cases fall outside it:
- Other brands. Pavestone, Versa-Lok and others use different face sizes, setbacks and caps. Their counts differ, so check the face size before relying on the result.
- Stepped bases. On sloping ground the base steps up in block-height increments. Split the wall into sections at each step and run each one.
- Tight curves and corners. These need cut blocks or corner units that a straight-run count does not show. Add extra.
- Terraced walls. Two walls one above the other are outside this calculator's checks. The upper wall sits above the lower one like any other load, so ask an engineer how the pair must be designed.
- Reinforced walls. Geogrid, a wider base and different backfill change both the rock and the excavation. We did not find Allan Block's reinforcement chart, so geogrid is not counted.
- Mortared block walls. A poured footing with mortared block is a different structure. The concrete block calculator counts that kind of wall.
Which calculator do I need next?
A retaining wall often makes room for a terrace or path. The paving calculator counts pavers or slabs for the level area it creates. For more crushed stone than the wall needs, such as a path base along its foot, use the gravel calculator above. All the garden and yard tools are collected under yard and garden material tools.
Retaining wall calculator questions
How much of the first course goes below ground?
Allan Block buries 1 in (25 mm) of block for every foot (300 mm) of wall height. A 24 in wall therefore has 2 in buried, and a 48 in wall 4 in. The calculator adds this to the height you enter before counting courses.
How much does an AB Classic block weigh?
An AB Classic block weighs about 75 lb (34 kg). An AB Jumbo Junior block weighs about 35 lb (16 kg). An AB Capstone weighs about 55 lb (25 kg). The calculator adds up blocks and caps so you can check a trailer or delivery limit.
Does a short garden wall need a drain pipe?
Allan Block requires a drain pipe for any reinforced wall, gravity walls over 4 ft (1.2 m) tall, or poorly drained sites, vented every 50 ft (15 m). A short gravity wall on well-drained ground does not, but it still needs the rock drainage zone behind the blocks.
Does the rock figure include the block cores?
No. Allan Block fills the cores with wall rock but does not publish a volume per block, so the calculator leaves it out. Order a little more rock than the result.
Can I use this for blocks from another brand?
Only as a rough guide. The counts use Allan Block's face sizes and its base and drainage details. If your block has a different face height or length, the number of courses and blocks per course will change.
Put this retaining wall calculator on your site
Sources (22)
- Allan Block Corporation
- AB Collection - block specifications (commercial installation manual), checked
- Basic Installation - residential retaining walls, checked
- American Wood Council
- DCA 6 - Prescriptive Residential Wood Deck Construction Guide (2015 IRC version, (c)2018, incl. Commentary), checked
- Barrette Outdoor Living
- Wood Fence Installation Instructions (BOM-WOODFENCE), hosted by The Home Depot, checked
- CDC / NIOSH
- Revised NIOSH Lifting Equation, checked
- California Building Standards Commission (via GoCodeBook)
- 2025 California Residential Code R404.4 Retaining walls (IRC-based text), checked
- Canadian Centre for Occupational Health and Safety (CCOHS)
- NIOSH Lifting Equation - Assessing Relevant Handling Factors, checked
- Department for Business and Trade (DBT), UK (data from ONS, DBT and Mineral Products Association)
- Monthly Bulletin of Building Materials and Components, September 2026 (Bulletin 617), data tables, checked
- Grange Fencing
- Grange Fencing Brochure 2021, checked
- Jacksons Fencing
- Featherboard Panel - Flat Top specification sheet (2019), checked
- How to Dig Post Holes: Expert Tips, checked
- National Institute of Standards and Technology
- Handbook 44 (2026), Appendix C: General Tables of Units of Measurement, checked
- Special Publication 811 (2008), Guide for the Use of the International System of Units (SI), Appendix B.8, checked
- Occupational Safety and Health Administration (OSHA), Federal Register (GovInfo)
- Occupational Exposure to Respirable Crystalline Silica; Final Rule, 81 FR 16286 (March 25, 2016), checked
- Office of the Federal Register / OSHA (eCFR)
- 29 CFR 1926.1153 Respirable crystalline silica (construction), including Table 1, checked
- QUIKRETE Companies
- Setting Posts (QUIKRETE at-home project instructions), checked
- Sakrete (Oldcastle APG)
- Pro Tips: How To Set Posts & Poles, checked
- The Home Depot (manufacturer not named on document)
- Wood Fence Kits Installation Instructions, checked
- U.S. Geological Survey (USGS), National Minerals Information Center
- Mineral Commodity Summaries 2026: Stone (Crushed), checked
- U.S. OSHA (eCFR)
- 29 CFR 1926.1153 Respirable crystalline silica, Table 1, checked
- UK Parliament (legislation.gov.uk)
- Weights and Measures Act 1985, Schedule 1, checked
- Vulcan Materials Company
- Construction Aggregates Calculator (density estimator by geology and product type), checked
Every number on this page is taken from these documents. How we choose and check sources.