Retaining Wall Calculator
Blocks per course = wall length ÷ block face length; courses = wall height ÷ block face height, both rounded up. Add a buried course below grade, multiply, and order 5–10% extra. A 30 ft long, 3 ft high wall built with 18 × 8 in blocks needs 20 blocks per course × 6 courses (5 exposed + 1 buried) = 120 blocks, or 126 with 5% extra, plus 21 caps, about 1.9 tons of base gravel and 6.5 tons of drainage stone. Enter your wall below to get blocks, caps, gravel, drain pipe and cost.
Key takeaways
- Blocks = (wall length ÷ face length, rounded up) × (courses above grade + buried courses), plus 5–10% extra.
- Blocks per square foot of face = 144 ÷ (face length × face height in inches): 3 for 12 × 4 in, 1.5 for 16 × 6 in, 1 for 18 × 8 in.
- Bury the first course: Allan Block’s guidance is about 1 in per 8 in of wall height, at least 6 in.
- Base: a trench typically about 24 in wide with 6 in of compacted gravel (Allan Block, Versa-Lok).
- Drainage: free-draining stone about 12 in deep behind the block, with a perforated pipe at the bottom vented to daylight.
- Walls retaining more than 48 in of soil must be designed under the IRC (R404.4); many towns want a permit and an engineer at about 4 ft, or lower with a slope or load above.
How the retaining wall calculator works
Blocks per course = wall length in inches ÷ block face length, rounded up. Courses = exposed height in inches ÷ block face height, rounded up, plus buried courses. Blocks = blocks per course × courses × (1 + extra %). The calculator then works out the rest of the order from the same wall length:
- Buried courses: buried depth = the larger of 6 in or wall height ÷ 8, then divided by the block height and rounded up. With 8 in blocks that is one course for any wall up to 4 ft; with 4 in blocks it is two courses.
- Caps = wall length in inches ÷ cap length, rounded up, plus the extra %.
- Base gravel (cu ft) = wall length × trench width × base depth (both in feet) × (1 + compaction %). Cubic yards = cu ft ÷ 27; tons = cubic yards × stone weight.
- Drainage stone (cu ft) = wall length × drainage zone depth × the full height of block, buried courses included, plus the extra %.
- Drain pipe = wall length, shown in 10 ft pieces. Add whatever runs from the ends of the wall to an outlet.
The stone weight defaults to 1.4 tons per cubic yard. That is an assumption: it is the figure our crushed stone calculator uses for clean #57 stone (Select Sand & Gravel), which is a common drainage aggregate. Dense-graded base with fines, such as #411 or crusher run, is closer to 1.5 tons per cubic yard as delivered, so type 1.5 if your supplier sells the base that way, or the exact figure from the scale ticket.
The 20% base compaction allowance comes from the same source as our paver base calculator: Bovees says crushed stone compacts to about 80% of its loose volume and adds 20–25%. Clean drainage stone is placed and lightly compacted, so it gets only the extra % for spills and uneven trenches.
How to measure a retaining wall
- Length: measure along the face of the wall, at the front of the blocks. On a curve, run a tape or garden hose along the planned face line and measure that. For an L-shaped wall, add the two legs; corner units are usually sold separately, so subtract them from the straight-block count if your system has them.
- Height: measure from the finished grade in front of the wall to the top of the last course, not counting the cap. If the ground slopes along the wall, split the wall into sections and run the calculator for each, because the base steps up the slope in block-height increments (Allan Block shows this in its “stepping up the base” guide).
- Block face: use the face length and face height from the product sheet, not the depth from front to back. Retaining wall blocks are often listed by their nominal size; for counting, the face dimensions are what matter.
- Caps: check the cap length. Some systems use caps that match the block face length, others use longer or tapered caps; the calculator lets you type your own.
If the height does not divide evenly into courses, the calculator rounds up. A 36 in wall with 8 in blocks is 4.5 courses, so you either build 5 courses (40 in exposed) or bury half a course more. Building the extra course is usually the easier choice; you can then raise the soil in front a little or lower the finished grade behind.
Blocks per square foot by block size
If you already know the square footage of the wall face (length × exposed height), divide it by the face area of one block. The table below covers the sizes most often sold for segmental retaining walls. These are typical face sizes; actual units are often a fraction of an inch smaller, so use your product’s sheet for a final count.
| Typical face size | Face area | Blocks per sq ft | Blocks per 10 ft course | Courses per ft of height |
|---|---|---|---|---|
| 12 × 4 in (small garden-wall block) | 48 sq in | 3.0 | 10 | 3 |
| 12 × 6 in | 72 sq in | 2.0 | 10 | 2 |
| 16 × 6 in (for example, Versa-Lok Standard) | 96 sq in | 1.5 | 8 | 2 |
| 18 × 6 in | 108 sq in | 1.33 | 7 (6.7) | 2 |
| 16 × 8 in | 128 sq in | 1.13 | 8 (7.5) | 1.5 |
| 18 × 8 in (full-size, for example, Allan Block’s standard units) | 144 sq in | 1.0 | 7 (6.7) | 1.5 |
Derived: blocks per sq ft = 144 ÷ face area. Versa-Lok lists its Standard unit at 6 in high and 16 in wide; Allan Block’s full-size units have a face of about 18 × 8 in, close to 1 sq ft. Square footage counts only the exposed face, so add the buried course and the extra % on top.
Block size changes more than the count. Small 4 in blocks are light enough to carry by hand but take three times as many units per square foot, and they are usually marketed for low garden walls. Full-size units are heavy, but they are the blocks manufacturers publish gravity-wall and geogrid height charts for.
Base and drainage requirements
A segmental retaining wall is a gravity structure: the weight of the blocks and the stone behind them holds the soil back. That only works if the wall sits on a firm, level base and water cannot build up behind it. The manufacturer guides we checked agree on the basic layers, shown in the diagram above:
- Base trench: Allan Block’s basic installation calls for a trench about 24 in wide with 6 in of compacted base material, deep enough to also hold the buried block. Versa-Lok’s base installation bulletin uses a 6 in compacted leveling pad that extends past the front and back of the unit. Belgard’s and Basalite’s quick install sheets show the same idea. The calculator defaults to 24 in × 6 in; type the numbers from your block’s guide if they differ.
- Buried course: the first course sits below the finished grade. Allan Block’s embedment article works out to about 1 in of buried block for every 8 in of wall height, with at least 6 in buried, and more when the ground in front slopes away or the wall sits by water.
- Drainage aggregate: clean, free-draining stone fills the block cores and a zone typically about 12 in deep behind the wall, from the base to near the top (Allan Block, Versa-Lok). Many installers finish the top few inches with soil so plants can grow; the calculator counts stone to the full block height, which rounds your order up slightly.
- Drain pipe: a perforated pipe at the bottom of the drainage zone carries water to daylight at the ends of the wall or to an outlet. Allan Block and Unilock show the pipe on taller walls and on any site with poor-draining soil; the calculator includes it by default so you can decide.
- Filter fabric: where the retained soil is fine or clayey, a geotextile between the soil and the drainage stone keeps fines from clogging the stone. It does not change the stone volume.
Our gravel calculator handles odd-shaped areas if you also need gravel for a path or patio at the foot of the wall, and the topsoil calculator covers the soil you place behind and on top of the wall for planting.
When you need geogrid or an engineer
Every block system has a height limit for a gravity wall, meaning a wall with no reinforcement in the soil behind it. Above that height, layers of geogrid are laid between courses and extend back into compacted soil, turning the soil into part of the wall. Manufacturers publish charts for this, and the limit drops when there is a slope above the wall, a driveway or patio near the top, a building, or weak soil. Allan Block, Versa-Lok and Unilock all point owners to their design charts or an engineer for those cases.
Building codes add a second limit. The International Residential Code, section R404.4, says that retaining walls not laterally supported at the top and retaining more than 48 in of unbalanced fill must be designed for stability against overturning, sliding, excessive foundation pressure and water uplift. Many local jurisdictions turn that into a permit rule, often at about 4 ft measured from the bottom of the footing or from the lowest grade, and lower when a slope or structure loads the wall. Los Angeles County’s residential code manual on R404.4 and Grand Prairie, Texas’s residential retaining wall permit page are two examples; the details differ by city, so check with your building department before you dig.
Rule of thumb for this calculator: it counts materials for any height, but it does not design the wall. If your wall is near 4 ft, holds back a slope, a driveway or a building, or sits on clay or wet ground, get the manufacturer’s design chart or an engineer’s drawing first, and add geogrid from that design to your order.
Worked example: 30 ft × 3 ft retaining wall
- Blocks per course: 30 ft = 360 in; 360 ÷ 18 = 20 blocks.
- Exposed courses: 36 in ÷ 8 = 4.5, rounded up to 5 (40 in of exposed block).
- Buried courses: the larger of 6 in or 36 ÷ 8 = 4.5 in is 6 in; 6 ÷ 8 = 0.75, rounded up to 1 course.
- Blocks: 20 × 6 courses = 120; with 5% extra, 126 blocks.
- Caps: 360 ÷ 18 = 20; with 5% extra, 21 caps.
- Base gravel: 30 × 2 ft × 0.5 ft = 30 cu ft; × 1.20 compaction = 36 cu ft = 1.33 yd³, about 1.87 tons at 1.4 t/yd³.
- Drainage stone: 6 courses × 8 in = 48 in = 4 ft of block; 30 × 1 ft × 4 ft = 120 cu ft; × 1.05 = 126 cu ft = 4.67 yd³, about 6.5 tons.
- Drain pipe: 30 ft, or three 10 ft pieces, plus any run to an outlet.
The stone for this one wall is about 8.4 tons, a little more than the 6–8 ton payload of a typical single-axle dump truck, so plan on a tandem or two loads: see how many yards fit in a dump truck before you book delivery. If you are building a patio at the top or bottom of the wall, run the paver calculator and the paver base calculator for that area too; the same delivery can often bring both.
Common mistakes
- Forgetting the buried course. Counting only the visible courses leaves you a full course short, which on a 30 ft wall of full-size block is 20 blocks.
- Counting by depth instead of face. A block listed as 18 × 12 × 8 in has an 18 × 8 in face; the 12 in is the depth into the hill.
- Skipping the drainage stone. Backfilling with the dug-out soil holds water against the wall, which is the pressure the stone zone and pipe are there to relieve.
- Setting the first course on soil. The base gravel must be compacted and level; the guides start every wall there because errors in the first course show up in every course above.
- Ordering stone without a compaction allowance. Compacted base takes more loose stone than its finished volume; the calculator adds 20% by default.
- Ignoring the height limits. A wall that rounds up from 3.5 ft to 4 ft of block, or that holds back a slope, may cross your local permit line. Check before you order.
Need to bring in soil to level the area behind or in front of the wall? The fill dirt calculator estimates cubic yards, tons and truckloads with a compaction allowance.
Wet ground beyond the wall? The French drain calculator sizes a separate yard drain.
Measuring a wall with several runs? Add them in the linear feet calculator first.
Frequently asked questions
How many retaining wall blocks do I need?
Divide the wall length in inches by the face length of one block to get blocks per course, and divide the wall height in inches by the block face height to get courses, rounding both up. Add any buried course below grade, multiply blocks per course by courses, and add 5 to 10 percent for cuts and breakage.
How many blocks do I need for a 30 ft long, 3 ft high retaining wall?
With full-size blocks that have an 18 by 8 inch face, one course is 360 / 18 = 20 blocks. A 36 inch wall needs 36 / 8 = 4.5, rounded up to 5 exposed courses, plus 1 buried course, so 6 courses and 120 blocks, or 126 with 5 percent extra. You also need about 21 caps if the caps are 18 inches long.
How much of a retaining wall should be buried?
Segmental wall makers bury at least part of the first course. Allan Block's embedment guidance is about 1 inch of buried block for every 8 inches of wall height, with a 6 inch minimum, and more where the ground in front slopes down. Check the install guide for the block you buy.
How much gravel do I need for a retaining wall base?
A typical base trench for full-size block is about 24 inches wide with 6 inches of compacted gravel (Allan Block, Versa-Lok). That is 10 cubic feet for every 10 feet of wall, or about 12 cubic feet (0.44 cubic yards, roughly 0.6 tons at 1.4 tons per cubic yard) after a 20 percent compaction allowance.
Do I need drainage stone and a pipe behind a retaining wall?
Segmental wall install guides from Allan Block, Versa-Lok, Belgard and Unilock all place free-draining aggregate directly behind the blocks, typically a zone about 12 inches deep, with a perforated drain pipe at the bottom that is vented to daylight. The stone keeps water pressure from building up behind the wall.
How tall can a retaining wall be without an engineer?
The International Residential Code (section R404.4) requires walls that are not supported at the top and retain more than 48 inches of unbalanced fill to be designed for stability, and many cities require a permit and an engineer's design above about 4 feet or when there is a slope, driveway or building above the wall. Local rules vary, so check with your building department before you build.
How many retaining wall blocks are in a square foot?
Divide 144 by the face area of one block in square inches. A 12 by 4 inch face is 3 blocks per square foot, a 16 by 6 inch face is 1.5, and an 18 by 8 inch face is 1 block per square foot. Square footage only counts the face; add the buried course and waste separately.
How many cap blocks do I need?
Caps = wall length in inches divided by the cap length, rounded up, plus about 5 percent. A 30 foot wall with 18 inch caps needs 20 caps, or 21 with extra. Curved walls and corners use more cuts, so add closer to 10 percent there.
Sources
- Allan Block, "How to Install a Retaining Wall" (basic installation)
- Allan Block, "Proper Embedment Guidelines for Retaining Wall Construction"
- Allan Block, "Building a Retaining Wall on a Slope" (stepping up the base)
- Versa-Lok, Standard Design & Installation Guidelines (PDF)
- Versa-Lok, Technical Bulletin 5: Base Installation (PDF)
- Versa-Lok, Standard unit product page
- Unilock, "Retaining Wall Construction 101"
- Belgard, SRW Quick Reference Install Guide (2023, PDF)
- Basalite, Typical Retaining Wall Installation Instructions (PDF)
- Los Angeles County Public Works, Residential Code Manual R404.4: Design of Retaining Walls (PDF)
- City of Grand Prairie, Texas, Residential Retaining Wall Permit
- Bovees, "Crushed Stone Base and Subbase Specs for Driveways"
- Select Sand & Gravel, "How Much Does a Yard of Crushed Stone Weigh?"