Home › Home & Construction › Retaining Wall Calculator
Retaining Wall Calculator
Use this free retaining wall calculator to plan a block wall before you buy a single block. Enter the wall length and height, pick your block size, and it works out how many wall blocks and cap blocks you need, how much gravel goes under and behind the wall, and an estimated cost at prices you can change. It rounds up to whole courses, so the count matches how blocks are actually stacked.
Prices are estimates and vary by region and supplier — edit them to match your local quote. Add about 5% extra blocks for cuts and breakage.
| Wall blocks needed | 75 |
| Cap blocks needed | 15 |
| Base gravel | 0.25 yd³ |
| Backfill gravel | 2.22 yd³ |
| Total gravel | 2.47 yd³ |
| Estimated total cost | $486.11 |
How it works
A retaining wall is built in horizontal layers called courses. Each course is one block high, and the blocks in one course sit side by side along the length of the wall. The calculator finds the block count in two steps: first it divides the wall length by the block length to get the blocks per course, then it divides the wall height by the block height and rounds up to a whole number of courses. A wall that is 3 feet high using 8-inch blocks needs 4.5 courses in theory, but you cannot buy half a course — the wall is built 5 courses high, and the top course is partly buried or trimmed, so the calculator uses 5.
Cap blocks finish the top of the wall. They are wider, flatter blocks that sit across the top course, lock the wall together, and give it a clean, flat surface you can sit on or set things on. You need one cap block for each block in the top course, so a wall with 15 blocks per course needs 15 caps.
Gravel does two separate jobs, and the calculator measures both. The base is a layer of compacted gravel under the first course, usually 4 to 6 inches deep and about a foot wide, which keeps the wall level and stops frost from heaving it. The backfill is a band of clean gravel behind the wall, usually 12 inches deep from the base to the top, which lets water drain down to a perforated pipe instead of building up pressure behind the wall. Water pressure is what pushes most failed walls over, so the backfill matters more than the blocks themselves. The calculator assumes the base is 1 foot wide and the backfill is as deep as you enter, then converts both volumes from cubic feet to cubic yards by dividing by 27.
Three details make the difference between a wall that lasts and one that leans. First, bury the first course: about half of it should sit below grade in the gravel base, which is why the calculator rounds courses up rather than down. Second, step each course back slightly — most interlocking blocks are designed with a small setback, so the wall leans gently into the hill it holds back. Third, keep the wall under the height your local code allows without engineering, usually 3 to 4 feet, and never build a wall that holds back a driveway or a building without an engineered design, whatever its height.
Cost is the sum of three parts: wall blocks at your price per block, cap blocks at your price per cap, and all the gravel at your price per cubic yard. Prices are estimates, so edit them to match your local supplier, and add about 5 percent extra blocks for cuts and breakage.
Worked example
A homeowner is building a straight retaining wall 20 feet long and 3 feet high using standard 16 by 8 inch blocks, with cap blocks, a 4-inch gravel base, and 12 inches of gravel backfill. How many blocks and how much gravel does she need?
Step 1: Blocks per course — 20 feet is 240 inches, and 240 ÷ 16 = 15 blocks per course.
Step 2: Courses — 3 feet is 36 inches, and 36 ÷ 8 = 4.5, rounded up to 5 courses.
Step 3: Wall blocks — 15 × 5 = 75 blocks.
Step 4: Cap blocks — one per top-course block, so 15 caps.
Step 5: Base gravel — 20 ft × 1 ft × (4 ÷ 12) ft = 6.67 ft³, which is 0.25 yd³.
Step 6: Backfill gravel — 20 ft × 3 ft × 1 ft = 60 ft³, which is 2.22 yd³.
Enter 20 feet, 3 feet, and 16 by 8 inch blocks in the calculator and it gives exactly the same result: 75 wall blocks, 15 cap blocks, 0.25 cubic yards of base gravel, and 2.22 cubic yards of backfill gravel — 2.47 cubic yards in total. At $4 per block, $5 per cap, and $45 per cubic yard of gravel, the materials come to 75 × $4 + 15 × $5 + 2.47 × $45 = $300 + $75 + $111.11 = $486.11. Adding 5 percent spare blocks would mean buying 4 extra blocks, a small cost against the hassle of a second trip to the yard.
FAQ
How many blocks do I need for a retaining wall?
Divide the wall length by the block length to get blocks per course, then divide the wall height by the block height and round up to whole courses, and multiply the two. A 20 foot wall using 16 by 8 inch blocks needs 15 blocks per course and 5 courses, which is 75 blocks. Always buy about 5 percent extra for cuts and breakage.
Do I need cap blocks on a retaining wall?
Cap blocks are strongly recommended. They sit on the top course, lock the wall together, give it a finished flat surface, and shed water away from the face. You need one cap block for each wall block in the top course, so a wall with 15 blocks per course needs 15 cap blocks.
How much gravel do I need behind a retaining wall?
You need gravel in two places: a compacted base under the first course, usually 4 to 6 inches deep, and drainage backfill behind the wall, usually 12 inches deep. A 20 foot long, 3 foot high wall needs about 0.25 cubic yards of base gravel and about 2.22 cubic yards of backfill gravel. The backfill lets water drain away instead of building pressure behind the wall.
How high can I build a retaining wall without an engineer?
Most building codes allow a retaining wall up to 3 or 4 feet high without an engineered design or permit, but the exact limit varies by area, and walls holding back a driveway or a building need engineering at any height. Always check your local code before building, and never stack a wall higher than the block manufacturer allows.
Do retaining walls need drainage?
Yes, drainage is the most important part of a retaining wall. Water trapped behind a wall creates pressure that can push it over. Use clean gravel backfill, a perforated drain pipe at the base that exits at the ends or through the wall, and landscape fabric between the gravel and the soil so the gravel does not clog with dirt.