Retaining Wall Calculator

Enter the length and height of your wall and the size of the blocks. You get the number of blocks and caps, the gravel behind and under the wall, and the drain pipe.

Jump to your result ↓

Your project

%

Breakage and cuts at the ends. 5% is typical.

Results

Example job shown. Change the numbers to match yours.

Wall blocks
189 blocks
Includes your waste allowance
Courses (rows)
9 courses
Blocks per course
20 blocks
Cap blocksOne cap row on top
20 caps

Gravel and drainage

Drainage stone behind the wall (12 in)
2.2 yd³
Compacted base trench (6 in, 20% extra)
0.8 yd³
Total gravel
3.0 yd³
Total gravel, approximate weight
4.3 tons
Perforated drain pipe
20 linear ft
  • Most manufacturers say to bury the first course (or at least 6 in) and to set back each course slightly. Walls over 3 to 4 ft, walls holding up a driveway or building, and walls on slopes need engineering and often a permit. Use the manufacturer's guidance for your block.

Before you buy: round up to whole packs, check the size printed on the label, and add a little spare. Your supplier has the final say.

Blueprint

20 ft3 ft

189 blocks

How this calculator works

The number of blocks is courses (height ÷ block height) times blocks per course (length ÷ block length). The cap row is one more block per course length. Behind the wall goes a strip of clean drainage stone, here 12 inches wide for the full height, with perforated pipe at the base to carry the water away. Under the wall goes a compacted stone base trench.

blocks = ⌈height ÷ block height⌉ × ⌈length ÷ block length⌉ × (1 + waste %)

Worked example: a 20 ft long, 3 ft high wall of 12 × 4 in blocks has 9 courses of 20 blocks, so 180 blocks, or 189 with 5% waste, plus 20 cap blocks. It needs about 2.2 yd³ of drainage stone behind the wall and about 0.8 yd³ for the base, and 20 ft of drain pipe.

Assumptions and sources

The assumptions behind your numbers (waste, sizes, rates) are listed in the notes directly under your results, and they update when you change an input.

The formula and a worked example are shown above, so you can check any result by hand. Read how we calculate and check our numbers. Results are estimates for planning: supplier products vary, so check the size printed on the label.

Tips before you buy

  • Drainage is the most important part. Water pressure behind a wall is what makes it fail: use clean, angular stone backfill (not soil) and a drain pipe that runs out to daylight.
  • The base needs to be level and well compacted. Take your time on the first course, since every course above follows it.
  • Use geotextile fabric between the drainage stone and the soil to stop soil clogging the stone.
  • Check local rules. Many jurisdictions require a permit and an engineered design for walls over 3 to 4 feet.
  • Some blocks have a built-in setback (lip), and some are pinned. Follow the manufacturer's installation instructions.

Tools & materials for this project

Affiliate links As an Amazon Associate we earn from qualifying purchases. These links do not change what you pay.

Frequently asked questions

How many blocks do I need for a retaining wall?

Divide the wall height by the block height for the number of courses, divide the wall length by the block length for the blocks per course, and multiply. Add 5% for waste, plus one row of caps.

How much gravel goes behind a retaining wall?

A drainage zone about 12 inches wide for the whole height of the wall. For 20 ft long and 3 ft high, that is about 2.2 yd³ of clean crushed stone.

Do I need a permit to build a retaining wall?

Often, yes, for walls over about 3 to 4 feet, or walls that support a structure, driveway or slope. Check with your local building department.

Add this calculator to your website

Running a blog, a contractor site or a class page? You can put this calculator on it for free. Copy the code below, and please leave the link underneath the calculator in place. The small script just resizes the frame to fit the results; if your site strips scripts, the calculator still works inside a scrolling frame.

Get the embed code

Related calculators & guides

Estimates only. Results assume standard materials and simple shapes. Supplier products vary, and the final call on quantity, structure and safety is yours. Check your local code and your supplier's guidance before ordering.