Landscape

Retaining Wall Calculator

A retaining wall is mostly drainage with a wall in front of it. This counts the blocks and caps from the wall face, then the base trench, the gravel column behind it and the pipe that has to carry the water away.

Quick answer

How many blocks and how much gravel for a 40 ft wall, 3 ft high?

About 221 six-by-sixteen blocks and 30 caps, plus 6.5 cubic yards of drainage gravel, 207 sq ft of filter fabric and 45 ft of perforated pipe. Material runs about $1,280; installed, the same wall is $3,440, or roughly $29 per square foot of wall face. The parts list below itemises every line.

Retaining wall block, gravel and cost calculator

Measure the exposed face, not the buried course

Walls over 4 ft usually need an engineered design

Drainage and unit prices

6 in compacted; 12 in where frost goes deep

Wall face
120 sq ft
40 ft long, 3 ft high
Blocks
221
7 courses, 5% breakage
Caps
30
16 in caps on 40 ft
Drainage gravel
6.5 cu yd
base trench plus 12 in column
Material cost
$1,279
$10.66 per sq ft of face
Installed cost
$3,439
$29 per sq ft, labor included

Parts list

Retaining wall parts list, with the quantity and price behind each line Source: NCMA SRW installation guidance · reviewed November 2026
ItemQuantityUnit priceCost

Cost by wall height, for this length

Blocks, gravel and cost by wall height, for the length entered Source: 2026 landscape supply pricing · reviewed November 2026
HeightWall faceBlocksGravelMaterialInstalled

Cost per square foot falls as the wall gets taller, because the base trench is spread over more face area. It never falls below the block price plus labor, which is why a tall wall is not cheaper per foot of length — only per square foot of face.

What actually holds a retaining wall up

A segmental block wall is a gravity structure. It holds back soil because it is heavy and because each course is set back slightly from the one below — usually 1 inch per course — so the mass leans into the hill. That batter is not decorative: it moves the centre of gravity back over the base, and a wall built plumb with no batter is a wall relying entirely on friction.

Above about 4 feet, gravity alone stops being enough and the wall needs geogrid: horizontal sheets of high-strength mesh laid between courses and extending back into the soil. The soil between the layers becomes part of the structure, which is why an engineered wall is cheaper than its block count suggests — the hill is doing the work. The grid length is designed from the soil, the surcharge and the slope above, and no calculator can substitute for that design. The grid option here counts material, not engineering.

Why the first course is buried

The bottom course goes below grade for three reasons: it stops the wall from being pushed out at the toe, it hides the uneven excavation, and it puts the first mortarless joint below the frost line in shallow applications. On a 3 foot wall the buried course is often a full block, so a wall that looks like six courses is really seven.

That is why the block count here is higher than face area divided by block size. A 40 foot wall, 3 feet high, is 120 square feet of face — 180 blocks at 0.67 square feet each — but with a buried course and 5 percent breakage the order is 221. Ordering 180 is the single most common way a weekend wall runs out of block at course six.

Drainage is the failure mode

Most failed retaining walls did not fall over. They bulged, leaned and cracked because water behind the wall could not get out. Saturated soil weighs roughly twice what drained soil does, and it pushes with hydrostatic pressure that no gravity wall is designed for. The fix is not a thicker wall; it is a path for the water.

  • Filter fabric lines the back of the drainage column so soil does not wash into the gravel and clog it. Fabric on the wrong side — wrapped around the gravel with soil on both faces — is worse than none, because it traps water.
  • Clean, angular gravel — not pea gravel, not sand — fills a 12 inch column behind the blocks and the base trench under them. Rounded stone moves under load and lets the wall settle.
  • Perforated pipe at the base of the column, holes down, draining to daylight or to a dry well. A pipe that ends in the soil is a pipe that does nothing.
  • Weep holes every 8 to 10 feet through the wall face, or in the first course of a segmental wall, as a visible tell that the column is draining.

The base is the wall

The trench is dug to undisturbed soil, not to fill, and it is wider than the block by about 6 inches each side. Six inches of compacted 3/4 inch crushed stone is the minimum; in frost country it is 12 inches, and the trench has to reach below the frost line or the whole wall lifts in the first hard winter. Compaction is done in 2 inch lifts with a plate compactor, not by driving over it once with a truck.

A common rule for base width is half the wall height plus the block depth, with a minimum of 12 inches. For a 3 foot wall that is about 18 to 24 inches. The calculator's default 12 inch base is deliberately the narrow end — widen it if the wall is over 4 feet, carries a driveway or sits on a slope.

When the job needs an engineer, not a calculator

Most jurisdictions treat a retaining wall under 4 feet as a landscape feature that needs no permit, and anything taller as a structure that needs a stamped design. The exceptions matter more than the rule: a wall supporting a driveway, a wall with a surcharge load above it, a wall at the top of a slope, tiered walls whose combined height exceeds the limit, and walls near a property line or a septic field. Any of those can require an engineer at 3 feet.

Ask the building department before digging. It is a phone call, and the alternative is a wall that has to be removed.

What this does not count

Excavation and haul-off, which on a 3 foot wall is often the largest single line and depends entirely on access — a wheelbarrow and a weekend, or a mini-excavator and a dumpster. Block adhesive, which is one tube per 25 square feet of face and is what keeps the caps from being lifted off by frost. Geogrid design, drainage to daylight, and the topsoil and seed to restore the slope above. And the wall you are replacing, if it has to come out first.

Frequently asked questions

How many blocks do I need for a 40 ft retaining wall?

About 221 six-by-sixteen blocks for a wall 3 feet high, including the buried base course and 5 percent breakage. Face area alone accounts for 180 of them; the other 41 are the course you cannot see and the ones that crack.

How much does a retaining wall cost per square foot?

About $29 per square foot of wall face for a block wall 3 feet high, of which roughly $10.70 is material and $18 is labor. Below 2 feet the per-foot cost rises because the same base trench is spread over less face; above 4 feet the block count and the geogrid both grow, so the total climbs while the cost per square foot stays roughly flat.

How deep should the base be?

Six inches of compacted crushed stone on undisturbed soil is the minimum, and 12 inches in frost country. The trench must reach below the frost line or the wall will lift in winter, and it should be 6 inches wider than the block on each side.

Do I really need gravel and a pipe behind the wall?

Yes. Saturated soil roughly doubles its weight and adds hydrostatic pressure the wall was never designed for. A 12 inch gravel column, filter fabric on the soil side and a perforated pipe draining to daylight are what turn a wall that lasts five years into one that lasts fifty.

Can I build a retaining wall on a slope?

Yes, but a wall at the toe of a slope carries more soil pressure than a wall on flat ground, and the steeper the slope above it, the more likely it needs an engineer. Terracing — two short walls instead of one tall one — is often the cheaper answer, and usually the better-looking one.

How tall can a retaining wall be without an engineer?

Four feet is the usual line, measured from the bottom of the footing to the top of the wall, and it varies by jurisdiction. A wall supporting a driveway, carrying a surcharge or sitting near a property line can need a stamped design at 3 feet.

Do caps matter, or are they cosmetic?

They keep water out of the top course, which is where freeze-thaw damage starts, and they are glued down so they stay put. On a wall with no cap, the top block absorbs water and spalls within a few winters.

Can I use CMU blocks instead of segmental block?

You can, but a CMU wall is a different structure: it needs a reinforced concrete footing, mortar or surface bonding, and vertical steel. Dry-stacked segmental block is designed to move slightly and drain; CMU is not, which is why CMU retaining walls crack when the base settles.

Disclaimer: This calculator estimates block, cap, gravel, fabric and pipe quantities from wall dimensions, and prices them from editable unit costs. It is not a structural design: walls over 4 feet, walls carrying a surcharge, and walls on slopes need an engineer's stamped design and a permit.

Citing this page? FigureMill, “Retaining Wall Calculator” (last reviewed October 31, 2026). Block, cap, drainage gravel, filter fabric and pipe quantities for a segmental retaining wall, with material and installed cost. https://figuremill.com/materials/retaining-wall-calculator

Last reviewed: October 31, 2026 · Sources: NCMA segmental retaining wall design guidance (TR-158, SRW installation), local building code retaining-wall thresholds, 2026 landscape supply pricing

Related: Gravel calculator · Concrete pad calculator · Footing calculator · All material calculators