Retaining Wall Block Calculator

Blocks needed90
Buy quantity (with 10% for cuts and breakage)99
Courses (rows)6
Blocks per course15
Cap blocks for the top course15
How this was calculated
  1. Height first: a 3 ft wall is 36 inches; with 6-inch blocks that is 6 courses (rows). Length: 240 inches ÷ 16 inches per block = 15 blocks per course.
  2. 6 courses × 15 blocks = 90 blocks; order 99 to cover cuts at the ends and the odd cracked unit. Cap blocks for the finished top are one per block of the top course — 15.
  3. Buried depth is not in this count: the first course of a retaining wall usually sits below grade on a compacted gravel footing, and walls over about 4 ft typically need engineering, drainage aggregate and possibly geogrid — check local rules before building higher.

A retaining wall block calculator tells you how many blocks you need for a straight wall. It works by dividing the wall height by the block height to get the number of courses, and dividing the wall length by the block length to get the blocks per course. Each result is rounded up, and the two are multiplied together for the total block count. For example, a 20 ft × 3 ft wall built with 16×6 in blocks needs 6 courses of 15 blocks, or 90 blocks total; with a 10% waste allowance you would buy 99 blocks, plus 15 cap blocks for the top. Other verified examples include a 12 ft × 2 ft wall in 12×4 in blocks needing 6 courses of 12 for 72 blocks, and a 30 ft × 4 ft wall in 18×6 in blocks needing 8 courses of 20 for 160 blocks.

This course-and-block method is the accepted standard because it mirrors how a wall is actually built: one course at a time, with each course running the full length. The calculation accounts for the above-grade portion of the wall, but the first course is usually buried below grade on a compacted gravel footing, which adds blocks and gravel beyond the count. Walls over about 4 ft typically need drainage aggregate, possibly geogrid reinforcement, and in many places an engineered design or permit. This page shows the formula, step-by-step workings, worked examples, and sources so you can verify every number and adjust for your own wall dimensions.

Worked examples

A 20 ft by 3 ft wall in 16×6 blocks

6 courses of 15 blocks = 90 blocks; buy 99 with waste, plus 15 cap blocks for the top course. (20 ft · 3 ft · 16 in · 6 in)

Blocks needed90
Buy quantity (with 10% for cuts and breakage)99
Courses (rows)6
Blocks per course15
Cap blocks for the top course15

A 12 ft by 2 ft garden wall in 12×4 blocks

6 courses of 12 = 72 blocks — small blocks mean more courses for the same height. (12 ft · 2 ft · 12 in · 4 in)

Blocks needed72
Buy quantity (with 10% for cuts and breakage)80
Courses (rows)6
Blocks per course12
Cap blocks for the top course12

A 30 ft by 4 ft wall in 18×6 blocks

8 courses of 20 = 160 blocks; at 4 ft the wall is at the height where drainage and local rules start to matter. (30 ft · 4 ft · 18 in · 6 in)

Blocks needed160
Buy quantity (with 10% for cuts and breakage)176
Courses (rows)8
Blocks per course20
Cap blocks for the top course20

Courses times blocks per course

A retaining wall block calculator works from two simple divisions. The first division finds the number of courses: wall height divided by block height. The second division finds the blocks per course: wall length divided by block length. Both results are rounded up, never down, because a wall cannot use a partial block to complete a row or a partial course to reach the required height. Rounding up ensures you have enough material to finish the job rather than falling short by a fraction.

To see how this works, walk through a verified example. A 20 ft by 3 ft wall built with 16 by 6 inch blocks needs 6 courses of 15 blocks per course, for a total of 90 blocks. The 3 ft height divided by the 6 inch block height gives 6 courses, and the 20 ft length divided by the 16 inch block length gives 15 blocks per course. Multiplying 6 by 15 produces the 90 block count. Add a 10 percent waste allowance and you should buy 99 blocks. You also need 15 cap blocks for the top, one per block in the final course.

The same logic applies to other wall sizes. A 12 ft by 2 ft wall built with 12 by 4 inch blocks needs 6 courses of 12 blocks per course, totaling 72 blocks. A 30 ft by 4 ft wall built with 18 by 6 inch blocks needs 8 courses of 20 blocks per course, totaling 160 blocks. In each case the height division sets the course count, the length division sets the per course count, and the product gives the total.

One important detail often missed is that the first course is usually buried below grade on a compacted gravel footing. This adds blocks and gravel beyond the above grade count, so your material list should account for that buried row in addition to the calculated total. Walls over about 4 ft typically need drainage aggregate, possibly geogrid reinforcement, and in many places an engineered design or permit. Check local requirements before ordering materials.

Worked examples

The retaining wall block calculator above gives you a quick total, but the numbers make more sense when you see how they come together. Each example below follows the same logic: courses come from wall height ÷ block height, and blocks per course come from wall length ÷ block length, with both values rounded up. The total block count is simply courses × blocks per course. Keep in mind that the first course is usually buried below grade on a compacted gravel footing, so you will need extra blocks and gravel beyond the above-grade count shown here.

Take a 20 ft × 3 ft wall built with 16×6 in blocks. The height of 3 ft equals 36 in, and 36 ÷ 6 gives 6 courses. The length of 20 ft equals 240 in, and 240 ÷ 16 gives 15 blocks per course. Multiply 6 × 15 and you get 90 blocks. Add 10% for cuts and breakage and you should buy 99 blocks. You will also need 15 cap blocks for the top, one per exposed block in the final course.

A shorter 12 ft × 2 ft wall using 12×4 in blocks works out to 6 courses of 12, or 72 blocks total. A taller 30 ft × 4 ft wall in 18×6 in blocks needs 8 courses of 20, which equals 160 blocks. The table below summarizes all three examples so you can compare them side by side.

Remember that walls over about 4 ft typically need drainage aggregate, possibly geogrid reinforcement, and in many places an engineered design or permit. The counts in the table are a starting point for planning, not a substitute for local code requirements or professional review.

  • First course usually buried below grade on a compacted gravel footing, adding blocks and gravel beyond the above-grade count
  • Walls over about 4 ft typically need drainage aggregate, possibly geogrid reinforcement, and in many places an engineered design or permit
Wall size (L×H)Block size (in)CoursesBlocks per courseTotal blocksCaps
20×3 ft16×66159015
12×2 ft12×461272—
30×4 ft18×6820160—
Always check local codes before building. Walls over about 4 ft often need an engineered design or permit, and the block counts here do not include the buried first course or extra gravel.

The buried course and the footing

A retaining wall block calculator gives you the above-grade block count, but it does not account for the first course that sits below grade. That buried course is standard practice, not an option. The bottom row is set into a compacted gravel footing so the wall starts level and locks in place against the soil behind it. Because that first row is hidden once the wall is finished, it is easy to leave it out of your material list. If you do, you will come up short by one full course of blocks and the gravel that goes under them.

The footing itself adds material beyond the blocks. You need a level pad of compacted gravel, usually several inches deep and wider than the blocks, running the full length of the wall. That base is what keeps the wall from settling unevenly over time. The block count for the buried course is the same as every other course: wall length divided by block length, rounded up. So if your wall is 30 ft long and uses 18-inch blocks, the buried course needs 20 blocks, the same as each above-grade course. Add those 20 blocks to the total your retaining wall block calculator produces for the visible portion of the wall.

To see how the buried course changes the total, look at the verified examples. A 20 ft x 3 ft wall built with 16 x 6 in blocks needs 6 courses of 15 blocks, or 90 blocks above grade, with 99 recommended after 10 percent waste and 15 cap blocks for the top. Bury the first course and you add another 15 blocks to the purchase. A 12 ft x 2 ft wall in 12 x 4 in blocks needs 6 courses of 12, or 72 blocks; the buried course adds 12 more. A 30 ft x 4 ft wall in 18 x 6 in blocks needs 8 courses of 20, or 160 blocks; the buried course adds 20 more. In each case the footing also calls for gravel along the full 20, 12, or 30 ft run.

Walls over about 4 ft add another layer of hidden material. They typically need drainage aggregate behind the wall, possibly geogrid reinforcement tying the wall back into the soil, and in many places an engineered design or permit before you build. None of that shows up in a basic block count, but it is part of the same below-grade work as the buried first course and the gravel pad.

Caps, corners and steps

A retaining wall block calculator gives you a solid starting count, but caps, corners, and stepped footings all add detail that changes what you actually buy. The basic math stays the same — courses times blocks per course, with each value rounded up — but the finishing pieces and site conditions are where most estimates go wrong. Plan these three elements before you finalize your order so you are not making extra trips to the supply yard.

Cap blocks sit along the top of the wall to lock everything in place and shed water. The simple rule is one cap block for every block in the top course. If your top course runs 15 blocks, you need 15 caps. Caps are usually a separate part number from the wall blocks, so do not assume your main block count includes them. Buy a few extra caps with the same 10% waste allowance you apply to the wall blocks themselves.

Corners require either purpose-made corner units or field-cut standard blocks. A corner block shows a finished face on two sides instead of one, which is why manufacturers sell matching corner pieces. If you cut standard blocks to wrap a corner, each cut consumes a full block and leaves a scrap piece — so corner counts climb quickly on walls with multiple turns. Count every outside and inside corner, note whether each needs a left or right orientation, and add those units to your order on top of the straight-wall count.

Stepped footings come into play when the wall runs along a slope. The footing steps up or down to follow the ground, which means each section of the wall may have a different number of courses. A wall that is 3 blocks tall at one end and 5 blocks tall at the other is not a single 3-course or 5-course wall — it is two sections with separate counts. Break the wall into segments by footing step, calculate courses and blocks per course for each segment, and add the segment totals together. The first course is usually buried below grade on a compacted gravel footing, which adds blocks and gravel beyond the above-grade count. Walls over about 4 ft typically need drainage aggregate, possibly geogrid reinforcement, and in many places an engineered design or permit — so factor those materials in as well.

  • Order one cap block for every block in the top course, plus the same 10% waste allowance.
  • Count each corner and specify left or right orientation; cut blocks consume a full unit per cut.
  • Divide sloped walls into stepped sections and calculate each segment separately before adding totals.
  • Include buried first-course blocks, gravel footing, drainage aggregate, and any geogrid in the final materials list.

Drainage: the part that keeps walls standing

A retaining wall block calculator gives you a solid block count, but blocks alone do not keep a wall standing. Water does the real damage. Most DIY wall failures are water failures, not block failures. Soil behind the wall holds moisture, and that moisture builds up pressure every time it rains. Without a way out, the pressure pushes against the back of the wall until something gives. The wall can lean, crack, or collapse outright. Good drainage is what prevents that outcome.

The standard approach starts with gravel backfill placed directly behind the wall. You fill the space behind the blocks with crushed stone, not soil, so water flows down through the gaps instead of pooling against the wall. At the base, you install a drain pipe, typically a perforated pipe laid along the bottom of the trench and angled so water moves away from the wall. The pipe gives collected water a clear path out, either to a daylight outlet or a connected drainage system. Without that pipe, water has nowhere to go even if the gravel is there.

Fabric goes between the gravel and the native soil behind the wall. Landscape fabric stops fine soil particles from washing into the gravel and clogging the drainage layer. When soil migrates into the gravel, the drainage space fills in and stops working. The fabric keeps the gravel clean and lets water pass through freely. You wrap the fabric around the back and bottom of the gravel zone so the separation holds over time. This step is easy to skip, but skipping it shortens the life of the wall.

  • Gravel backfill: crushed stone behind the wall lets water drain down instead of pressing against the blocks
  • Drain pipe: a perforated pipe at the base carries water away from the wall to a daylight outlet or drainage system
  • Landscape fabric: placed between gravel and native soil to stop fine particles from clogging the drainage layer
Most DIY retaining walls fail because of water, not because the blocks were wrong. A retaining wall block calculator tells you how many blocks to buy, but drainage is what keeps the wall standing.

When a wall stops being a DIY count

A retaining wall block calculator gives you a solid material estimate, but it cannot tell you whether a wall still qualifies as a simple DIY project. The line gets blurry at about 4 feet of height. Below that, a straightforward count of courses and blocks per course is usually all you need. Above it, the wall starts collecting requirements that put it outside the scope of a weekend build.

The 30 ft × 4 ft example sits right at that line. The math says 8 courses of 20 blocks, or 160 blocks, but height is what triggers the extra layers. Walls over about 4 ft typically need drainage aggregate behind the wall, possibly geogrid reinforcement tied back into the soil, and in many places an engineered design or a permit before construction can begin. A retaining wall block calculator will still tally the blocks, but it will not flag these added steps or their cost.

The buried first course adds another wrinkle. Because the first course is usually buried below grade on a compacted gravel footing, the actual block and gravel count runs higher than the above-grade math suggests. The calculator handles the wall face, not the footing or the backfill, so you are still estimating those separately even on a shorter wall.

  • Walls over about 4 ft: expect drainage aggregate, possible geogrid, and often a permit or engineered design
  • The 30×4 ft example needs 160 blocks by the count, but sits at the height where added requirements kick in
  • Buried first course and gravel footing add blocks and material beyond the calculator's above-grade total
A block count is not a build plan. Once a wall passes roughly 4 feet, the numbers are the easy part.

FAQs

How many blocks do I need for a 20 ft by 3 ft retaining wall?

Using 16×6 in blocks, you need 6 courses with 15 blocks per course, totaling 90 blocks. Add about 9 for waste, bringing the purchase total to roughly 99 blocks. You will also need 15 cap blocks to finish the top of the wall.

How do I calculate courses for a retaining wall?

Divide the wall height in inches by the block height, then round up. For example, a 36-inch wall using 6-inch blocks gives 36 ÷ 6 = 6 courses. Always round up to ensure the wall meets or exceeds your intended height.

Do I need cap blocks?

For a finished top, yes. You need one cap block per block in the top course. For the 20 ft example wall, that means 15 cap blocks. Cap blocks protect the wall from water and give it a clean, professional appearance.

How deep should the first course be buried?

Commonly the full first course sits below grade on a compacted gravel footing. Budget those buried blocks separately from your above-grade count so you do not run short on visible blocks when installation begins.

How tall can a block retaining wall be without engineering?

About 4 ft is the common DIY ceiling. Above that height, most jurisdictions and manufacturers call for engineered design, drainage and often geogrid. Always check local codes before building a taller wall.

Why add 10% more blocks?

The extra 10% covers end cuts, corner cuts and the occasional cracked unit. Dye and texture lots vary between batches, so running short mid-wall can result in visible color or texture differences that stand out.

Sources

Related calculators

Concrete Block Calculator
How many concrete blocks (CMU) a wall needs by block size — with a waste allowance and the 80 lb mortar bags to lay them, at standard mortar joints.
Brick Calculator
How many bricks a wall needs by brick size — modular, queen, king or Roman with ⅜-inch mortar joints — plus a waste allowance for cuts and breakage.
Soil Calculator
Soil for a raised bed or garden area in cubic yards and cubic feet, the bag count for 1, 1.5 or 2 cu ft bags, the load's weight, and the cost if you price the bags.