Independent guide. Not a contractor, and we don't sell leads.
How we make money

Retaining Wall Block Calculator: Blocks, Base Rock and Drain Pipe

Work out courses, blocks, trench size, base rock, wall rock and drain pipe for a segmental block retaining wall, using Allan Block's published install figures.

Key takeaways

  • Blocks = courses × blocks per course, where courses = wall height ÷ block height and blocks per course = wall length ÷ block face length, each rounded up.
  • Allan Block's base trench is 24 inches wide and 6 inches deep plus 1 inch for each foot of wall height.
  • Allan Block fills 12 inches behind the block with wall rock, and requires a drain pipe on gravity walls over 4 feet tall.

Enter your wall's length and height, your block's face length and height, and a waste allowance. The tool counts courses and blocks, and works out the trench, base rock, wall rock and drain pipe from Allan Block's installation figures. Measure the block's actual face, not the size in its name.

  • Blocks158 blocks5 courses of 30. Enter the total height including buried block to count it
  • Base gravel1.11 cubic yards6 in compacted, 24 in wide; ask your supplier how much extra to order
  • Wall rock behind the block3.33 cubic yards12 in deep behind the wall; block cores need more
  • Trench9 in deep1.67 cubic yards to dig
  • Drain pipe30 ftAlong the back of the base, vented to daylight

Nothing you enter leaves your browser. Follows Allan Block's basic installation steps for a gravity wall. Taller walls, slopes or loads above the wall need an engineer, and often a permit.

Show the math with your numbers
  1. Courses: 36 in ÷ 8, rounded up to 5
  2. Blocks: 5 × 30 per course × 1.05, rounded up to 158
  3. Trench: 30 × 2 ft × (6 + 3) in = 1.67 cu yd
  4. Base: 30 × 2 ft × 6 in = 1.11 cu yd, compacted
  5. Wall rock: 30 × 1 ft × 3 ft = 3.33 cu yd, plus block cores
What if: wall height
Wall heightBlocks
1 ft63 blocks
2 ft95 blocks
3 ft (yours)158 blocks
4 ft189 blocks

How the calculator works

  1. Courses = wall height ÷ block height, rounded up
  2. Blocks per course = wall length ÷ block face length, rounded up
  3. Blocks = courses × blocks per course × (1 + waste %), rounded up
  4. Trench = length × 2 ft wide × (6 in + 1 in per foot of wall height)
  5. Base rock = length × 2 ft wide × 6 in deep
  6. Wall rock = length × 1 ft behind the block × wall height
  7. Drain pipe = wall length

Each volume is worked out in cubic feet, then divided by 27 for cubic yards.

The trench, base and wall rock figures come from Allan Block's basic installation steps. They're one manufacturer's figures for its own blocks. If you're using another brand, its manual comes first.

What each layer does

  • The trench. Allan Block digs it 24 inches wide, the length of the wall. The depth is 6 inches plus 1 inch for each foot of wall height. The extra inch per foot is for the buried block that keys the wall into the ground.
  • The base. At least 6 inches of wall rock in the trench, raked smooth, then compacted with at least two passes of a plate compactor. The first course sits on it, level from end to end.
  • The wall rock. The block cores and 12 inches behind the block are filled with wall rock as each course goes up. This lets water drain down to the pipe instead of building up behind the wall.
  • The backfill. Behind the wall rock, use infill or approved on-site soil, compacted in lifts of no more than 8 inches.
  • The drain pipe. It goes at the lowest point toward the back of the trench and vents to daylight every 50 feet. Send that water somewhere it won't run back toward the house; the gutter calculator covers grading away from foundations. Allan Block requires one for any reinforced wall, gravity walls over 4 feet tall, and sites with poor drainage.

Allan Block's page also has a note for walls under 4 feet: a base trench 18 inches wide and 4 inches deep, plus the buried block. That doesn't sit easily with its 6-inch base minimum on the same page, so the tool uses the main figures. If your wall is under 4 feet, check the manual for your block.

Worked example

A wall 30 feet long and 3 feet high, using blocks with a 12-inch face and 8-inch height, and 5% waste:

  • Courses: 36 ÷ 8 = 4.5, so 5 courses
  • Blocks per course: 360 ÷ 12 = 30
  • Blocks: 5 × 30 = 150, then 150 × 1.05 = 157.5, so 158 blocks
  • Trench: 6 + 3 = 9 inches deep. 30 × 2 × 0.75 = 45 cubic feet, ÷ 27 = 1.67 cubic yards to dig out
  • Base rock: 30 × 2 × 0.5 = 30 cubic feet, ÷ 27 = 1.11 cubic yards
  • Wall rock behind the block: 30 × 1 × 3 = 90 cubic feet, ÷ 27 = 3.33 cubic yards
  • Drain pipe: 30 feet, plus the run to daylight

The base and the wall behind the block take the same material here, so you'd order about 4.44 cubic yards of wall rock, plus enough to fill the block cores. Core volume depends on the block, so check its spec sheet. To turn cubic yards into bags or tons, use the gravel calculator.

The buried part. At 1 inch per foot, this wall has about 3 inches of block below grade. Counting it, the block height is 39 inches, and 39 ÷ 8 = 4.9 still comes to 5 courses. On a different wall it can add a course, so enter the total block height if you want it counted.

How the wall's size changes the order

For blocks with a 12-inch face and 8-inch height, at 5% waste:

Wall Courses Blocks Trench Base rock Wall rock behind
20 ft × 2 ft 3 63 0.99 cu yd 0.74 cu yd 1.48 cu yd
30 ft × 3 ft 5 158 1.67 cu yd 1.11 cu yd 3.33 cu yd
40 ft × 4 ft 6 252 2.47 cu yd 1.48 cu yd 5.93 cu yd

The 4-foot wall sits right at Allan Block's line: any taller, and a gravity wall requires a drain pipe.

Caps, corners and curves

The tool counts straight runs of standard block. Caps are counted by length: wall length ÷ cap length, rounded up. Corners, curves, steps in the base and stairs use special pieces or cuts, so ask the supplier to check your count against a sketch.

Permits and when to get a design

The 2021 International Residential Code, Section R105.2, exempts from a permit "retaining walls that are not over 4 feet (1219 mm) in height measured from the bottom of the footing to the top of the wall, unless supporting a surcharge" (as reproduced in Grant County, Washington's copy of the section). A surcharge is extra load above the wall, such as a driveway, a slope or a building. The height is measured from the bottom of the footing, so a wall with 3 feet showing can already be near the line. Your city or county can set its own rules, so ask your building department before you dig.

A wall that holds up a slope, a driveway, a building or a fence above it carries extra load. Taller walls and walls that need geogrid reinforcement are built to approved plans, as Allan Block's steps say. Get a design for those rather than relying on a block count.

Before you dig, contact 811 to have buried utility lines marked.

Common mistakes

  • Entering the block's name, not its size. Measure the face length and height of the block you're buying.
  • Forgetting the buried block. It's part of the trench depth, and it can add a course.
  • Mixing up the trench and the base. The trench is deeper than the 6-inch base because the first course sits partly below grade.
  • Skipping the drain pipe on wet ground. Allan Block requires one on sites with poor drainage, whatever the height.
  • Backfilling in thick layers. Allan Block's limit is 8 inches per lift, compacted.

Frequently asked questions

How many retaining wall blocks do I need?

Divide the wall's height by the block height and its length by the block's face length, round each up, multiply, then add waste. A 30 × 3 foot wall of 12 × 8 inch blocks takes 150, or 158 with 5% waste.

How much gravel goes behind a retaining wall?

Allan Block fills 12 inches behind the block with wall rock, for the full height. For a 30 × 3 foot wall, that's 90 cubic feet, about 3.33 cubic yards, plus the cores.

How deep should the trench be?

Allan Block's main figure is 6 inches plus 1 inch for each foot of wall height, so 9 inches for a 3-foot wall. Check your block maker's manual.

How thick should the base be?

At least 6 inches of compacted wall rock, according to Allan Block.

Does a short retaining wall need a drain pipe?

Allan Block requires one for gravity walls over 4 feet, reinforced walls and sites with poor drainage. On a short wall, it depends on your site.

Do I need a permit for a retaining wall?

It depends on the height, what's above the wall and your local rules. Ask your building department before you start.

Sources

We use primary sources where we can: building codes, federal rules and manufacturer documents. Read our editorial standards.