200+ free tools. No sign-up. No hidden fees.Explore the toolkit ↗
Find a tool ↗

Home›Retaining Wall Calculator

Retaining Wall Calculator

Work out a retaining wall from its length and height: how many courses and blocks, how many caps, and how much base gravel and drainage stone. With a warning if the wall is tall enough to need an engineer.

Calculate your retaining wall

Units:

A retaining wall needs a gravel base (6 in deep, 20 in wide), drainage stone behind it (12 in wide, full height) and a perforated drain pipe at the base. Walls over 4 ft exposed usually need an engineer and a permit.

Your results

–
courses (incl. buried)
–
blocks to buy
–
cap blocks
–
base gravel (yd³)
–
drainage stone (yd³)
–
drain pipe (ft)

How the retaining wall formula works

A retaining wall is counted in courses (horizontal rows of blocks). The exposed height decides the courses, the length decides the blocks per course, and the base and drainage are sized from the wall dimensions.

Courses = ceil(exposed height ÷ block height) + buried courses — one buried course is standard (about 6 in of base)

Blocks per course = ceil(wall length ÷ block length)

Blocks = courses × blocks per course × (1 + waste %)

Cap blocks = ceil(wall length ÷ cap length) — one cap per block on the top course

Base gravel = length × 20 in wide × 6 in deep ÷ 27 (yd³)

Drainage stone = length × built height × 12 in wide ÷ 27 (yd³) — gravel weighs about 1.4 tons per yd³

Drain pipe = wall length (ft), one perforated pipe along the base

Always bury at least one course — the buried course and the 6 in gravel base are what stop the wall from sliding. The drainage stone and pipe behind the wall are not optional: water pressure is what pushes retaining walls over. Walls over 4 ft exposed usually need a permit and an engineer (a tiered wall of two shorter walls is often the easier option).

Worked example

A wall 20 ft long, 24 in exposed, 12×6 in blocks, 1 buried course, 5% waste:

Courses: ceil(24 ÷ 6) + 1 = 4 + 1 = 5 courses (30 in built height)

Blocks per course: ceil(20 × 12 ÷ 12) = 20 blocks

Blocks: 5 × 20 × 1.05 = 105 → 105 blocks

Caps: ceil(240 ÷ 12) = 20 caps

Base gravel: 20 × (20÷12) × (6÷12) ÷ 27 = 0.62 yd³ (0.86 tons)

Drainage stone: 20 × (30÷12) × (12÷12) ÷ 27 = 1.85 yd³ (2.59 tons)

Drain pipe: 20 ft · Filter fabric: 50 sq ft

Cost: 105 × $5 + 20 × $4 + 3.45 × $55 = $795

A 40 ft wall at the same height needs 210 blocks and 40 caps. A 36 in exposed wall (6 exposed courses + 1 buried = 7 courses) needs 147 blocks for a 20 ft run — and at 3 ft it is close to the 4 ft engineer threshold, so check your local rules before building.

How much does a retaining wall cost? (US, 2026)

Prices are 2026 US retail ranges. Prices vary by region; check local prices before ordering.

ItemTypical price
Segmental retaining block (12×6 in)$4–$8 each
Cap block$3–$6 each
Gravel (¾ in crushed stone)$40–$70 per yd³
Perforated drain pipe, 4 in$0.50–$1.00 per ft
Filter fabric$0.20–$0.40 per sq ft
Professionally installed$30–$60 per sq ft of face

Waste allowance

Add 5% for cuts and the odd broken block — the standard figure. Use 10% for curved walls, corners and steps, where every second block gets cut. Order caps separately: they are sold by the piece, and one cap covers one block length on the top course.

Frequently asked questions

How many retaining wall blocks do I need?

Courses × blocks per course, plus waste. A 20 ft wall, 24 in exposed, 12×6 in blocks with 1 buried course is 5 courses × 20 blocks = 100, or 105 with 5% waste.

How much gravel do I need for a retaining wall base?

A trench 20 in wide and 6 in deep: length in feet × 1.67 × 0.5 ÷ 27 cubic yards. A 20 ft wall needs about 0.62 yd³ (0.86 tons) for the base, plus drainage stone behind the wall.

How deep should a retaining wall base be?

6 inches of compacted gravel, plus one buried block course. The trench should be about 20 inches wide — wider than the block — so the base extends in front of and behind the wall.

Do I need drainage behind a retaining wall?

Yes — always. Drainage stone (12 in wide, full height) and a perforated pipe at the base stop water pressure from pushing the wall over. A wall without drainage is the most common cause of retaining wall failure.

How tall can a retaining wall be without an engineer?

Most jurisdictions allow up to 4 ft of exposed height (some 3 ft) as a DIY gravity wall. Above 4 ft you usually need a building permit and an engineer-designed wall. A tiered wall of two shorter walls is often the easier option.

Related calculators