Retaining Wall Calculator

Enter your wall length and how much of it you want showing to get blocks, courses, caps, base gravel, and the drainage stone that goes behind it.

Updated October 3, 2026 · Estimates for planning, not a quote

Over 4 feet, this is an engineered wall

Wall height is measured from the bottom of the base course, not from the ground you can see, so a wall with 3 feet 6 inches showing and a course buried below grade is already at the line. Most jurisdictions require a permit and a stamped engineered design once a wall passes 4 feet, and some set the limit lower. Check with your local building department before you order block.

A wall of any height that holds back a slope, a driveway, a patio, a pool, or anything built above it is carrying a surcharge load, and that needs engineering no matter how short the wall is. This calculator counts materials. It does not check whether the wall will stand up.

Your wall
Base and drainage

How to estimate a block retaining wall

Three numbers do most of the work: how long the wall is, how many courses it takes to reach the height you want showing, and how much gravel goes under and behind it.

Blocks and courses

Blocks per course is the wall length in inches divided by the block length, rounded up. Courses is the exposed height in inches divided by the block height, also rounded up. That second rounding is doing real work: the leftover fraction of a course is the part you bury below grade. If the height happens to divide evenly and nothing is left over to bury, the calculator adds one more course so the base still ends up underground.

A 20 foot wall with 3 feet showing, built from standard 12 by 8 inch block, comes to 20 blocks per course and 5 courses, so 100 blocks. Four courses show and the fifth is buried 4 inches into the trench. Add a cap course and that is another 20 caps on top.

Base and backfill gravel

The base is a leveled trench of compacted crushed stone, usually 6 inches deep and roughly twice the block depth wide. Its volume is length times trench width times base depth, converted to cubic yards, then to tons the same way the gravel calculator does it.

Backfill is the column of clean crushed stone behind the block. It runs the full height of the wall, buried course included, and 12 inches deep is the usual minimum. Water pressure is what pushes a retaining wall over, so this stone and the perforated pipe at the bottom of it are doing structural work, not drainage housekeeping.

What this does not do

No geogrid, no setback or batter allowance, no soil bearing check, and no drain pipe or filter fabric quantities. Those come from the block manufacturer's install guide and, above 4 feet or under any surcharge, from an engineer.

Block counts are one half of the picture and prices are the other. Our retaining wall cost guide prices block, timber, stone, and poured concrete per face square foot, and works through an itemised DIY build of this exact wall.

Method and sources

Where these figures come from: The 2021 International Residential Code, Section R105.2. Its Building list, item 3, exempts from permit "retaining walls that are not over 4 feet (1219 mm) in height measured from the bottom of the footing to the top of the wall, unless supporting a surcharge". That is the 4 foot line on this page, and the surcharge clause is why a wall holding a slope needs engineering at any height.

The code measures from the bottom of the footing. A segmental block wall has no footing in the poured sense, so the equivalent plane is the bottom of the buried base course, which is what this page measures from and why it counts that course. Your jurisdiction adopts an edition and may amend it, and a permit is not the same thing as a design: block manufacturers set their own limits on unreinforced height. Blocks per course is the wall length divided by the block length, and courses come from the exposed height rounded up, with the remainder buried below grade. Base and backfill volumes use the crushed stone density from the gravel calculator.

QuantiYard writes its own formulas and states them in plain language on every page. How these numbers are made covers where the constants come from, how waste factors are chosen, what these calculators deliberately do not do, and how to report an error.

Reference chart. Retaining wall blocks by size, standard 12 x 8 in block, exposed height. Columns: Wall length, 2 ft high, 3 ft high, 4 ft high. 10 ft, 40, 50, 70; 20 ft, 80, 100, 140; 30 ft, 120, 150, 210; 40 ft, 160, 200, 280; 50 ft, 200, 250, 350.

Save the retaining wall block chart

Block counts for five wall lengths at three heights, in standard 12 by 8 inch block, with the buried base course already counted. Save it before you price a pallet.

Save to Pinterest

Opens Pinterest with the chart and link ready to go.

Retaining wall calculator FAQ

How tall can a retaining wall be before it needs an engineer?

Most jurisdictions draw the line at 4 feet, measured from the bottom of the buried base course to the top of the wall, and require a permit plus a stamped engineered design above it. Some set the limit lower. A wall of any height that holds back a slope, a driveway, a pool, or a structure carries a surcharge load and needs an engineer regardless.

How deep should the base course of a retaining wall be buried?

A common rule is to bury the first course by about one tenth of the total wall height, with a minimum of one full block or 6 inches, whichever is more. The buried course sits on compacted gravel in a leveled trench, and getting that trench level matters more than anything else you do, because every course above it repeats the error.

How much gravel goes behind a retaining wall?

Manufacturers typically call for at least 12 inches of clean crushed stone behind the block, running the full height of the wall, with a perforated drain pipe at the bottom. Water pressure behind a wall is what pushes it over, so the drainage stone is structural, not optional.

How many cap blocks do I need?

One cap for every block in a course. Divide the wall length in inches by the block length and round up, which is the same count as one course of wall block. A 20 foot wall of 12 inch long block takes 20 caps. Caps sit on top of the last course rather than replacing it, so they are added to the block count, not taken out of it. If your cap units are a different length from the wall block, divide by the cap length instead.

Embed this calculator

Drop this into any page. It loads the live calculator with the site chrome stripped out, and the attribution link below it is part of the snippet.

<iframe src="https://quantiyard.com/retaining-wall-calculator?embed=1" width="100%" height="820" loading="lazy"
        title="Retaining Wall Calculator" style="border:1px solid #E4E0D6;border-radius:10px"></iframe>
<p><a href="https://quantiyard.com/retaining-wall-calculator">Retaining Wall Calculator</a> by <a href="https://quantiyard.com/">QuantiYard</a></p>
Cite this page

Built from this page's own title, URL and last-updated date, so a citation cannot drift from what it cites.

APA
MLA
HTML