Calculator

Retaining Wall Calculator Blocks, Caps & Gravel

Enter your wall length and height and pick a block size to get the number of blocks and courses, plus cap blocks, gravel base, and drainage backfill.

A 20-ft-long, 3-ft-high retaining wall built with standard 12 × 4-inch garden-wall blocks needs 180 blocks and 20 cap blocks, plus about 0.74 cubic yards of compacted gravel for the base pad and 2.22 cubic yards of drainage gravel behind the wall. Change the length, height, and block size below and the calculator figures every material at once.

Your project

ft
ft
in
Result
Enter your measurements above and click Calculate.

This site earns commissions from qualifying purchases through Amazon Associates and other retail partners (including The Home Depot, via Skimlinks).

How to measure for your retaining wall project

  1. Measure the wall footprint. Measure the total length of the wall face in feet, then measure (or plan) the exposed height from finished grade to the top of the last full course. Do not include the buried starter course in the height — it sits below grade and is covered by the base gravel.
  2. Pick a block size. Choose the block face size that matches the product you plan to buy. The 12 × 4-inch option is the common small garden-wall block; the 16 × 8-inch option suits larger structural walls. The block size drives both how many units you need and how many courses stack to your target height.
  3. Read the results and add waste. You get total blocks, courses, cap blocks (one per linear foot of wall), base gravel for the 2-ft-wide leveling pad, and drainage gravel for the 12-inch zone behind the wall. Add 5–10% to the block count for end cuts, damaged units, and the buried starter course.

How the retaining wall calculator works

blocks = ceil(length×12 ÷ block_width) × ceil(height×12 ÷ block_height)

The block count is simply courses × blocks-per-course. Courses = wall height (in inches) ÷ block height, rounded up; blocks per course = wall length (in inches) ÷ block width, rounded up. For a 20-ft × 3-ft wall in 12 × 4-in blocks: courses = (3 × 12) ÷ 4 = 9; blocks per course = (20 × 12) ÷ 12 = 20; total blocks = 9 × 20 = 180. Base gravel uses a 2-ft-wide leveling pad: (length × 2 ft × base depth in ft) ÷ 27 = (20 × 2 × 0.5) ÷ 27 ≈ 0.74 cubic yards at the default 6-inch depth. Drainage gravel fills a 12-inch zone behind the full wall face: (length × height × 1 ft) ÷ 27 = (20 × 3 × 1) ÷ 27 ≈ 2.22 cubic yards.

Which type are you estimating?

Standard concrete garden-wall block (small, no pins)

The flat, rectangular 12 × 4-inch block sold at big-box stores. No lips or pins — courses are simply stacked with a slight setback. Best for landscape borders, raised beds, and short decorative walls up to about 2 ft. Gravity and mass hold these in place.

Enter: Select "12 in × 4 in" block; keep height ≤ 2 ft for unpinned stacking

Segmental retaining wall (SRW) block — interlocking lip or pin system

The most common structural system: a block with a rear lip or pinned connection that locks each course to the one below and creates a built-in backward batter (lean into the slope). Suitable for walls up to 3–4 ft without geogrid; taller walls need geogrid reinforcement layers every 2–3 courses. Popular brands include Allan Block, Versa-Lok, and Anchor.

Enter: Select "16 in × 6 in" or "18 in × 6 in" block; add geogrid spec for walls over 4 ft

Natural stone (fieldstone or dry-stack)

Irregular stone requires no mortar but demands careful fitting. Estimate coverage at roughly 1 ton per 35–40 sq ft of wall face at 12-inch depth, but material thickness varies widely. The block calculator above will overcount — use it for a rough floor estimate and adjust for actual stone depth and void space.

Enter: Use the calculator for a rough course count; verify with your stone supplier

Timber (railroad tie or landscape timber) wall

Pressure-treated 6 × 6 or 8 × 8 timbers stacked horizontally. Each timber course is 5.5 or 7.5 inches tall; use the 16 × 6-in block option to approximate course count. Timbers are typically pinned with rebar or timber screws. Best for informal garden walls; wood decays over 15–25 years.

Enter: Select "16 in × 6 in" for approximate courses; verify timber length matches wall length

Wall height decisions — DIY vs. engineered

Walls up to 3–4 ft are typically DIY with a compacted gravel base and drainage pipe. Walls 4 ft and taller carry significantly more soil pressure and usually require an engineered design, geogrid reinforcement layers, and a building permit. Always check local codes before breaking ground.

Enter: Under 4 ft: use this calculator; over 4 ft: consult a structural engineer

Tips & ways to save

  • Bury the first course of blocks at least half a block height (2–4 inches) below finished grade — this "starter course" locks the base and hides the footing from view.
  • Pitch the leveling pad and each block course very slightly backward (about 1 inch per foot of wall height) — this "batter" lean keeps soil pressure from pushing the wall face outward.
  • Run a perforated drainpipe at the base of the drainage gravel zone, sloped to daylight at each end of the wall, to prevent hydrostatic pressure from building behind the wall and cracking blocks.
  • Backfill in 6-inch compacted lifts rather than all at once — uncompacted loose soil behind a new wall can generate enough pressure to push it over before the backfill settles.
  • Walls over 3–4 ft often need geogrid reinforcement — a mesh fabric that extends back into the hillside to anchor the wall — and most jurisdictions require a permit. Check with your local building department before starting.

Blocks by wall size (12 × 4 in garden-wall block)

Blocks by wall size (12 × 4 in garden-wall block)
Wall (length × height)CoursesBlocksCap blocks
10 × 2 ft66010
20 × 2 ft612020
20 × 3 ft918020
30 × 3 ft927030
40 × 4 ft1248040

For the common 12-in-wide × 4-in-high garden-wall block; larger blocks need fewer units (a 16×8-in block covers about 2.7× the face). Bury the bottom course below grade and add 5–10% for cuts. Walls over 3–4 ft usually need engineering and a permit.

Frequently asked questions

How many retaining wall blocks do I need?
Multiply blocks per course (wall length ÷ block width) by the number of courses (wall height ÷ block height). For example, a 20-ft-long, 3-ft-high wall in 12×4-inch blocks needs 20 per course × 9 courses = 180 blocks, plus 20 cap blocks.
How much gravel do I need behind a retaining wall?
Allow a 12-inch-deep drainage zone of free-draining gravel behind the wall. For a 20-ft × 3-ft wall that is about 2.2 cubic yards, plus roughly 0.7 cubic yard for a 6-inch leveling pad under the base course. The calculator above figures both.
How high can I build a retaining wall myself?
As a rule of thumb, walls up to about 3–4 feet can be DIY with a proper compacted base and drainage. Taller walls carry much more soil pressure and usually need an engineered design, geogrid reinforcement, and a permit — check local codes.
Do I need drainage behind a retaining wall?
Yes — drainage is critical. Without it, water builds up behind the wall (hydrostatic pressure) and can crack or topple even a well-built structure. Lay a 12-inch zone of free-draining gravel directly behind the wall and run a perforated drainpipe at the base, sloped to daylight at each end. For a 20-ft × 3-ft wall that drainage zone is about 2.22 cubic yards of gravel.
How deep should the gravel base be under a retaining wall?
A compacted gravel base 6 inches deep is standard for most residential walls under 4 ft. The base pad is typically 2 feet wide. For a 20-ft wall at the 6-inch default that works out to about 0.74 cubic yards of base gravel. Increase the depth to 8–12 inches in cold climates where frost heave is a concern.
What is the "batter" on a retaining wall and how much do I need?
Batter is the slight backward lean built into the wall so it leans into the hillside rather than straight up. Most interlocking SRW blocks produce a natural batter through their lip design — typically about 1 inch of setback per foot of wall height. This offsets soil pressure and improves long-term stability without any extra calculation.
Embed this calculator on your site — free

Run a website or blog? Drop this calculator on any page. Paste the code below where you want it to appear; it includes a small credit link back to BackyardCalc.

Reviewed by the BackyardCalc editorial team. Figures are computed from the formula above and checked against manufacturer yields.

Estimates are guidance only — material quantities vary by project conditions. Always confirm with a professional before purchasing.