By Mark Penix Updated August 2026

Retaining Wall Calculator

Enter wall length and height. We'll size the blocks plus the base gravel and drainage gravel that go behind it.

Advanced options
Buy 0 blocks
Wall area
0 sq ft
Block courses (rows)
0
Blocks per course
0
Cap blocks
0
Base gravel
0 cu yd
Drainage gravel
0 cu yd
Landscape fabric
0 sq ft

How the retaining wall calculator works

A 20-ft long, 3-ft tall retaining wall takes 189 standard 12″×4″ landscape blocks plus 20 cap blocks, 0.74 cubic yards of base gravel, and 2.22 cubic yards of drainage gravel. Three feet of height is 9 courses of 4-inch block, and 20 feet of length is 20 blocks per course — 180 blocks, or 189 with a 5% waste factor. Add 60 sq ft of landscape fabric and a run of 4-inch perforated drain pipe at the base.

The math: block count = courses (rows) × blocks per course. Courses = wall height ÷ block height. Per-course count = wall length ÷ block length. The first (buried) course is one full course, even though only the top of it is visible.

Base gravel sits in a 4–8" deep × 12–24" wide trench under the first course. It's compacted and screeded level. Without a proper base, walls fail within a few seasons.

Drainage gravel goes behind the wall, in the 6–18" of space between the wall and the soil it's holding back. Combined with weep holes or a French drain at the base, it prevents water buildup that would push the wall over.

Block types

Wall height limits without engineering

Most US municipalities allow DIY-built retaining walls up to 3–4 ft (1–1.2 m) without a permit or engineering. Anything taller usually requires a structural engineer's stamp + permit + inspections. Always check your local code before starting.

Read that carefully, because two details in it catch people out. First, the threshold is written into most local codes as an exposed height of 4 feet measured from the bottom of the footing — not from the ground surface in front of the wall — which is the language the IBC uses and which most residential jurisdictions mirror. Your buried course counts. Second, and more important: any surcharge removes the exemption entirely. A surcharge is any additional load bearing on the soil the wall retains — a driveway, a parking pad, a slope rising behind the wall, a pool, a building foundation, or a second wall above it. A 3-foot wall holding back a level lawn is a weekend project. A 3-foot wall holding back the edge of a driveway is an engineered structure in most jurisdictions, and it is the one that fails.

SituationTypical statusWhat you need
Under 3 ft, level ground behind, no surchargeUsually exemptGravity wall, proper base and drainage. Confirm locally.
3–4 ft, level ground behind, no surchargeExempt in many jurisdictionsGravity wall plus geogrid per the manufacturer's chart
Over 4 ft, any conditionsPermit + engineering almost everywhereStamped design, inspections, engineered reinforcement
Any height with a slope rising behind itTreat as engineeredStamped design; the slope adds load the charts do not cover
Any height with a driveway, parking, or structure aboveEngineered, no exceptionStamped design; surcharge loads are the leading cause of failure
Tiered wallsDepends on spacingIf the horizontal gap between tiers is less than twice the lower wall's height, the upper wall surcharges the lower one — engineer it as a single tall wall
Wall holding back or supporting a pool, septic field, or foundationEngineeredStamped design, always

The tiering rule is the one that surprises people most. Splitting a 6-foot grade change into two 3-foot walls does not turn one engineered wall into two DIY walls — unless the upper wall sits far enough back that its load falls behind the lower wall's influence zone, the two behave as a single tall structure. The commonly used spacing rule is that the setback between tiers should be at least twice the height of the lower wall; anything tighter and you are building a 6-foot wall in two pieces.

The base: 10% plus six inches

Retaining walls do not usually fail at the block. They fail at the bottom, because the base was thin, unlevel, or built on soil that moved. The base is the single highest-leverage part of the job and the part most likely to be rushed on a Saturday afternoon.

The working rule is bury the wall by about 10% of its total height — rounded up to a full course — and put 6 inches of compacted gravel underneath that. A 3-foot wall buries roughly 3.6 inches, which rounds up to one full 4-inch course, so the trench is 4 + 6 = 10 inches deep. Taller walls get more of both.

Wall heightBuried depth (10%, rounded to a course)Compacted gravel baseTotal trench depthTrench width
2 ft1 course (4")6"~10"24"
3 ft1 course (4")6"~10"24"
4 ft1 course (6" block) or 2 (4" block)6"–8"~12"–14"24"–30"
5 ft+ (engineered)Per design8"+ per designPer designPer design

Trench width should be roughly twice the depth of the block and never less than 24 inches, so the base extends behind the wall as well as under it. Use a well-graded angular crushed base — the kind with fines in it, sold as roadbase, ¾-minus, or crusher run — not clean drainage stone, because the base course needs to lock up and hold a level surface under compaction. Our gravel calculator covers the distinction and lets you price both materials.

Compact in 2–3 inch lifts with a plate compactor, and screed the top dead level. Time spent here is repaid many times: every course above inherits the level of the first, and a first course that is out by a quarter inch is out by an inch and a half nine courses later, with no way to correct it.

The drainage stack behind the wall

Water is what actually pushes retaining walls over. Saturated soil weighs far more than dry soil and exerts hydrostatic pressure directly against the back of the wall; in freezing climates it also expands. A gravity wall is designed to resist the load of drained soil, and if it never drains, the wall is holding a load it was never sized for. Build the drainage as a stack, back to front:

The calculator's drainage-gravel figure assumes you fill the full height of the wall to the width you specify. That is the correct assumption — a drainage layer that stops halfway up simply moves the saturation line to where it stops.

Geogrid: what triggers it

Geogrid is a polymer mesh laid horizontally between courses and extending back into the retained soil. It converts the wall from a lump of blocks resisting by weight alone into a reinforced soil mass — the grid ties the block face to a wedge of compacted fill behind it, and the whole assembly resists tipping together. This is what lets a block wall exceed the height its own mass could hold.

TriggerResponse
Wall over about 3 ft (check the block manufacturer's chart)Grid layers required; spacing per chart, typically every 2–3 courses
Slope rising behind the wallGrid required regardless of height; engineered design
Any surcharge — driveway, structure, parkingGrid plus engineering, always
Soft, clay-heavy, or poorly draining soilGrid earlier than the chart suggests, and a deeper base
Tiered walls closer than 2× the lower wall heightGrid the lower wall as if it were the full combined height
Wall curves tightly inward (concave)Grid layers overlap awkwardly; follow the manufacturer's detail for radii

Grid length is not arbitrary. Manufacturers typically specify a grid that extends back 60–80% of the wall height into compacted fill — a 4-foot wall wants roughly 3 feet of grid reaching behind it, in compacted soil, not the loose backfill you shovelled in. That excavation requirement is the reason geogrid walls are so much more work than they look: you are not building a wall, you are building a reinforced block of earth with a decorative face. If the space behind the wall is too tight to excavate that far back — against a property line, say — you cannot use geogrid there, and the design has to change.

Worked example: a 24 × 2.5-ft garden wall

Enter wall length 24 ft, wall height 2.5 ft, 12"×4" landscape block, all three checkboxes on, and leave the defaults for base depth 6", base width 2 ft, drainage width 1 ft, waste 5%.

Courses = 2.5 ft ÷ 0.333 ft per block = 7.5, rounded up to 8 courses. Blocks per course = 24 ÷ 1 = 24. Total = 8 × 24 = 192 blocks, and 5% waste rounds up to 202 blocks, plus 24 cap blocks. Base gravel = 24 × 2 × 0.5 ft = 24 cubic feet ÷ 27 = 0.89 cu yd. Drainage gravel = 24 × 1 × 2.5 = 60 cubic feet ÷ 27 = 2.22 cu yd. Fabric = 24 × (1 + 2) = 72 sq ft.

Notice the rounding on courses. Eight courses of 4-inch block is 32 inches of block for a 30-inch design height — and that is exactly right, because the bottom two inches of that eighth course disappear into the trench along with your buried course. If you want 2.5 feet of wall showing, enter the height as showing plus buried, not just what you want to see.

Worked example: a 30 × 4-ft wall — and why this one is different

Wall length 30 ft, height 4 ft, 16"×6" landscape block, base depth 8", base width 2.5 ft, drainage width 1.5 ft. Courses = 4 ÷ 0.5 = 8 courses. Blocks per course = 30 ÷ 1.333 = 22.5 → 23 per course, which tells you every course ends with a cut half-block; plan to rent a masonry saw and to alternate which end the cut lands on so the vertical joints stagger. Total = 184 blocks, plus 5% = 194 blocks and 23 caps.

Base gravel = 30 × 2.5 × 0.667 ft = 50 cubic feet ÷ 27 = 1.85 cu yd. Drainage gravel = 30 × 1.5 × 4 = 180 cubic feet ÷ 27 = 6.67 cu yd. Fabric = 30 × (1.5 + 2.5) = 120 sq ft. Note that the drainage gravel now outweighs the base by nearly four to one, and at roughly 1.4 tons per cubic yard that is about nine tons of stone to move by wheelbarrow.

More importantly, this wall is at the threshold. Four feet measured from the bottom of the footing is where the permit and engineering requirement bites in most jurisdictions, and this design needs geogrid regardless. Treat this example as a wall you price out and then take to your building department, not one you start on Saturday.

Failure modes — read this before you order

Retaining walls are the most consequential structure on this site. A failed wall is not a cosmetic problem: it releases the mass of soil behind it, usually all at once, usually in a storm, and often onto something. Walls fail in a small number of well-understood ways.

Warning signs on an existing wall — leaning, bulging in the middle, separated or stepped joints, blocks sliding forward at the top, soil or water seeping through the face, a crack running down through several courses — are all reasons to stop using the ground above the wall and get an engineer out. Retaining walls rarely fail gradually once they start moving.

When to call an engineer

Directly, and without hedging: hire a licensed structural or geotechnical engineer if the wall exceeds 4 feet from the bottom of the footing, if anything at all surcharges the soil behind it, if the ground rises behind the wall rather than sitting level, if the wall would support or undermine a driveway, foundation, pool, or septic system, if you are tiering walls up a slope, or if there is any existing sign of soil movement on the site. Also call one if the soil is clay-heavy and you do not know its bearing capacity, or if the excavation would go deep enough to need shoring — trench collapse kills people every year and it does not care that the trench was only chest-deep.

The engineering fee on a residential wall is typically a small fraction of the wall's material cost, and it is a vanishing fraction of the cost of rebuilding a failed wall plus whatever the failure took with it. If the answer is genuinely borderline, build the wall shorter and use two well-separated tiers with planting between them, or regrade the slope instead. Neither of those is a compromise you will regret.

Common questions

How thick does the base gravel need to be?

4 in / 10 cm minimum for a 2 ft wall, 6 in / 15 cm for a 3 ft wall, 8 in / 20 cm for a 4 ft wall. Compact in 2–3 inch lifts with a plate compactor. Clay soils need extra base; sandy soils can go thinner.

What's "geogrid" — do I need it?

Geogrid is a polymer mesh laid horizontally between block courses, extending back into the soil. Required by manufacturers for walls over ~3 ft to anchor the wall against tipping. Each course needs its own geogrid layer. If your wall is 4+ courses, plan for geogrid.

How does cost compare to other retaining options?

Landscape block walls: $25–$45/sq ft installed. Poured concrete: $30–$60/sq ft. Boulder walls: $20–$50/sq ft. Pressure-treated timber: $15–$30/sq ft (5–10 year life). Block is the most popular DIY option for the longevity-to-cost ratio.

How tall can I build a retaining wall without an engineer?

The usual line is 4 feet measured from the bottom of the footing, which is what the IBC uses and what most residential jurisdictions adopt — some tighten it to 3 feet. But height is only half the test: any surcharge behind the wall voids the exemption at any height. A driveway, a parking pad, a rising slope, a pool, or a building foundation above the wall all count. Check with your building department before you order material, not after.

Do I really need drainage gravel behind the wall?

Yes, and it is not optional in the way people treat it. Water in the retained soil is the leading cause of retaining-wall failure — saturated soil is far heavier than drained soil and pushes directly against the back of the wall. The standard detail is 12 inches of clean angular ¾" stone (no fines) for the full wall height, a perforated pipe at the base sloped to daylight, and filter fabric between the stone and the native soil. Skipping it does not save money; it defers the entire cost of the wall by a few seasons.

Why does the calculator include a buried first course?

Because the wall needs to be keyed into the ground to resist sliding at its toe, and because the buried course gives the courses above it a level, protected starting point. The rule is to bury about 10% of the total wall height, rounded up to a full course, with the compacted gravel base beneath that. Enter your total wall height — exposed plus buried — rather than only the part you want to see, or the calculator will under-order by a full course of block.

Should I use landscape block or CMU?

Landscape block for anything you are building yourself. It dry-stacks with a moulded locking lip, needs no mortar, no footing, and no rebar, and it tolerates the small settlement that a gravity wall inevitably sees. CMU is a structural product: it needs a poured concrete footing below frost depth, vertical rebar, grouted cores, and usually a permit and inspections. CMU is the right answer for tall engineered walls and for walls that also carry a structure — it is the wrong answer for a garden terrace.

Can I build a retaining wall on a property line?

Usually not the way you want to. A gravity wall needs excavation behind it for the base and drainage layer, and a geogrid wall needs 60–80% of its height in compacted soil behind the face — none of which you can do on a neighbour's land. Setback requirements also apply in most jurisdictions, and a wall that alters drainage onto adjoining property creates liability regardless of where it sits. This is a conversation to have with your building department and your neighbour before anything is ordered.

For the gravel that goes around the wall, see the gravel calculator — sand for joints, see sand.