Retaining Wall Block Calculator

Calculate retaining wall blocks, cap stones, compacted base gravel, clean backfill drainage rock, and material costs. Plan single straight walls or stepped slope sections with buried course depth and DIY safety guidance.

Reviewed and updated September 26, 2026

Use it when you want to know
  • Blocks, caps, and coursesFind exact block counts per course, buried base courses, and cap coping stones with cutting waste.
  • Base gravel and drainage backfillEstimate compacted road base trench gravel and clean 3/4-inch drainage rock in cubic yards and tons.
  • DIY safety threshold alertsKnow when a low landscape gravity wall is safe for DIY versus when building codes require engineered geogrid.
Calculator

How many retaining wall blocks and gravel do you need?

Enter your wall dimensions, choose your block size and cap preferences, then calculate exact blocks, courses, gravel leveling pad, and drainage backfill before ordering.

1. Wall layout & dimensions

Wall layout mode

2. Block & cap specifications

3. Base gravel & drainage backfill

4. Material pricing (optional)

Guide

How to calculate retaining wall blocks, gravel, and drainage

Building a retaining wall that stands for decades requires calculating five interconnected layers: the compacted gravel base pad, buried foundation courses, face blocks, drainage backfill, and coping caps.

The anatomy of a long-lasting retaining wall

A retaining wall is not just a stack of heavy concrete blocks. It is an engineered gravity retaining system designed to hold back thousands of pounds of moist earth. A successful wall relies on five structural zones:

First, a firm, non-yielding leveling pad made of 4 to 6 inches of compacted crushed stone with fines. Second, an embedded base course buried below grade so the wall toe cannot kick outward. Third, the stacked block courses interlocked with built-in lips or fiberglass pins. Fourth, a 12-inch vertical drainage chimney of clean crushed gravel wrapped in filter fabric with a perforated drain tile at the bottom. Fifth, glued coping cap stones that shed rain away from the interior cores.

Why retaining walls fail: the hydrostatic pressure trap

Over 90 percent of retaining wall collapses are caused by water, not the weight of the dirt. Soil absorbs enormous amounts of water during heavy rain. Saturated soil weighs up to 120 pounds per cubic foot and acts like a slow-moving hydraulic ram against the back of the wall.

If you backfill a retaining wall with native clay or topsoil, water becomes trapped behind the blocks. When winter arrives, that trapped moisture freezes, expands, and pushes the top courses forward. A 12-inch column of clean, angular 3/4-inch drainage stone (such as #57 crushed limestone or washed gravel) creates an open void network that drops water directly to the perforated drain pipe before hydraulic pressure can accumulate.

The 4-foot rule and building code requirements

The International Residential Code (IRC Section R404.4) sets strict engineering requirements for retaining walls. Any wall that retains more than 48 inches (4 feet) of unbalanced fill measured from the bottom of the buried footing to the top of the wall requires stamped engineering plans and municipal building permits.

Furthermore, if the ground behind the wall slopes upward (a sloped surcharge), or if a driveway, parking pad, patio, or pool sits within a distance equal to twice the wall height, the wall must be engineered even if it is only 2 or 3 feet tall. For high walls, geogrid reinforcement sheets must be buried into the backfill every two courses to anchor the wall face into the hillside. Consult the Allan Block engineering guides and the CMHA segmental retaining wall standards before attempting walls exceeding 3 to 4 feet.

Why the first course must be buried

Setting your first row of retaining wall blocks directly on top of the ground is the most common DIY mistake. Without embedment, the lateral thrust of the earth easily slides the bottom course forward, leading to total failure within one or two seasons.

Industry guidelines recommend burying a minimum of 1 full block course, or 1 inch of embedment for every 1 foot of wall height (whichever is greater). For a 3-foot exposed wall, burying 4 to 6 inches provides the passive resistance required to lock the base. In regions subject to deep frost lines, excavate deeper and increase the compacted gravel pad thickness to prevent frost heaving.

Retaining wall calculation formulasBlocks = Ceil(Length / Block Width) x Total Courses x (1 + Waste %)

Example: A 25 ft wall with 16" wide by 6" high blocks at 2.5 ft exposed height requires 5 exposed courses plus 1 buried course (6 courses total). Each course takes 19 blocks (25 ft x 12 in / 16 in = 18.75, rounded up). 19 blocks x 6 courses = 114 raw blocks. Adding 8% waste yields 124 blocks to order.

Base gravel versus drainage rock: what to buy

Never use the same gravel for the leveling pad and the drainage backfill. The leveling pad under the wall needs crushed stone with stone dust fines (such as road base, 3/4-inch minus, or crusher run) that compacts into a solid, cement-like platform. Check our Gravel Calculator to verify tonnages and density conversions for compacted road base.

Behind the wall, you must use clean, washed angular gravel with zero fines (such as 3/4-inch clear stone or #57 crushed rock). Fines or sand will wash down into the perforated drain pipe and clog it. Compare bulk quarry delivery versus store bags using our Bulk vs Bagged Cost Calculator before purchasing material.

Handling curves and stepped slopes

Segmental retaining wall blocks feature tapered sides that allow them to form sweeping convex and concave curves. When laying an outside (convex) curve, the radius shrinks with every upward course, requiring slight block adjustments. Plan on 8 to 12 percent waste on curved walls to accommodate split blocks and miter cuts.

When building along a sloping yard, step the base trench in full block-height increments (typically 6 inches). Always start excavation at the lowest point of the slope and work uphill so each section rests on a compacted, level gravel pad. You can plan adjacent hardscaping dimensions with our Paver Calculator and calculate concrete footings with our Concrete Slab Calculator.

Never skip the buried base course

The buried course anchors the toe of your retaining wall against lateral soil thrust. Setting blocks directly on top of flat ground causes the bottom course to slide forward and kick out over time.

Use angular rock, not rounded pea gravel

Angular crushed stone (#57 gravel) locks together while leaving open voids for water flow. Rounded pea gravel or river stones act like ball bearings and shift under earth pressure, destabilizing the wall.

Compact base gravel in thin lifts

Do not dump 6 inches of gravel into the trench and run a tamper over the top. Spread the gravel in 2-inch layers, moisten lightly, and compact each lift thoroughly with a heavy hand tamper or vibrating plate compactor.

Glue only caps and the top course

Secure cap stones and the uppermost course with heavy-duty exterior polyurethane masonry adhesive. Leave the lower courses dry-stacked so the wall retains flexibility and allows water to seep through joints.

FAQ

Frequently asked retaining wall questions

How many retaining wall blocks do I need for a 20-foot wall?

For a 20-foot long wall that is 2 feet tall using standard 16-inch by 6-inch blocks, you need 15 blocks per course. A 2-foot exposed height requires 4 courses, plus 1 buried base course for structural stability, totaling 5 courses (75 blocks). Adding an 8 to 10 percent cutting and waste allowance brings the purchase order to 83 blocks.

Why does the first course of a retaining wall need to be buried?

Burying the first course (embedment) locks the toe of the wall into the ground, preventing the entire structure from kicking out at the base under lateral soil pressure. As a standard rule of thumb, bury at least 1 full course or 1 inch for every 1 foot of wall height (minimum 4 to 6 inches below finished grade). In cold climates with deep frost heave, deeper excavation into a compacted gravel trench is required.

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

Retaining walls require a firm, non-yielding leveling pad consisting of 4 to 6 inches of compacted crushed gravel with fines (such as road base, 3/4-inch minus, or crusher run). The trench should be 6 to 8 inches wider than the block depth (at least 2 to 3 inches extending in front of the toe and behind the heel). Never set retaining wall blocks directly on bare dirt, topsoil, or bedding sand.

Why is clean drainage rock needed behind a retaining wall?

Water hydrostatic pressure is the primary cause of retaining wall failure, not soil weight alone. When soil gets saturated with rainwater, hydrostatic pressure pushes against the back of the blocks. A 12-inch vertical column of clean, free-draining angular stone (such as 3/4-inch washed gravel or #57 stone) allows water to drop quickly to a perforated drain pipe rather than building up pressure behind the wall.

When does a retaining wall require an engineer or a building permit?

Under the International Residential Code (IRC Section R404.4) and most municipal building codes, retaining walls exceeding 4 feet in total height (measured from the bottom of the footing to the top of the wall) require a building permit and stamped engineered drawings. Any wall supporting a sloped hillside (surcharge), a driveway, a patio, or a nearby building foundation also requires engineering, even if it is shorter than 4 feet.

What is geogrid and when is it required?

Geogrid is a high-tensile structural mesh laid between block courses and extending horizontally back into compacted backfill soil. It ties the face blocks to the soil mass behind them to resist overturning. Most segmental retaining wall manufacturers require geogrid reinforcement on walls taller than 3 to 4 feet, or on shorter walls holding tiered slopes or parking areas.

How do I calculate cap blocks for a curved retaining wall?

For straight walls, divide the total wall length by the length of one cap stone and add 5 to 8 percent waste. For curved walls, order 10 to 15 percent extra caps. Convex (outside) curves cause gaps between straight caps that require mitering or wedge cuts, while concave (inside) curves require trimming the rear ears of the caps so the front edges touch.

What kind of adhesive should I use for retaining wall cap stones?

Use heavy-duty exterior polyurethane or concrete masonry construction adhesive (such as Loctite PL 500 or Gorilla Heavy Duty Construction Adhesive). Apply two continuous 1/4-inch beads along the top surface of the highest block course before pressing each cap down firmly. Do not glue the bottom courses, as dry-stacked blocks must flex and drain through their joints.

How do I build a retaining wall on a sloped yard?

When building on a slope, step the base trench in full block-height increments (typically 6 or 8 inches per step). Always begin excavating and laying blocks at the lowest point of the slope. Work horizontally into the hill, creating level stepped trenches with compacted gravel pads so each block rests on a completely level surface.