Skip to content

Retaining Wall Calculator

Count the blocks for a segmental retaining wall from its length, height and block size, and total the block cost.

Maintained by the Calcenzo team. Last reviewed October 27, 2026. Methodology

Retaining Wall Calculator

Blocks = courses times blocks per course, both rounded up. This is a block count, not an engineering design. A tall wall may need a permit and a structural plan.

A retaining wall calculator counts how many blocks fit along one row of the wall and how many rows reach the height, then multiplies the two. Formula: Blocks per course = length × 12 ÷ block length, rounded up; courses = height × 12 ÷ block height, rounded up; blocks = per course × courses. A 30-foot wall, 3 feet high, built from 12 by 6 inch blocks needs 30 blocks per course and 6 courses, or 180 blocks. At $3.50 each, that is $630.

retaining wall calculator
Retaining wall calculator chart: blocks per course, courses, total blocks and cost for three walls.

How to use the retaining wall calculator

  1. Enter the wall length in feet along the face.
  2. Enter the height in feet, measured from the top of the buried base course to the top of the wall.
  3. Enter the block face length and height in inches, from the product label.
  4. Enter the price of one block.

The retaining wall calculator returns blocks per course, courses, total blocks and cost.

What formula does the retaining wall calculator use?

Each course is a row of blocks along the wall. Blocks per course is the length in inches divided by the block length, rounded up. Courses is the height in inches divided by the block height, rounded up. The total is the two numbers multiplied together.

Cap blocks, base gravel, drainage stone and pipe, and fabric are not included. Many block makers say the first course should be partly buried, so include that buried height in the wall height you enter.

Retaining wall calculator worked example

Results from the retaining wall calculator:

Wall Block Per course Courses Blocks Cost
30 ft × 3 ft 12 × 6 in at $3.50 30 6 180 $630.00
50 ft × 2 ft 16 × 8 in at $6.50 38 3 114 $741.00
20 ft × 4 ft 12 × 4 in at $2.75 20 12 240 $660.00

Rounding up both numbers builds in a small extra. In the 50-foot wall, 600 inches ÷ 16 = 37.5, so the last block in each course is cut and 38 are counted.

Height, permits and engineering

This is a block count, not a wall design. Taller walls hold back much more soil, and many local codes require a permit, and sometimes a design by an engineer, once a wall passes a set height or holds up a driveway, a slope or a building. The height limit differs from place to place, so ask your local building department before you start. Block makers also publish their own height limits for walls built without reinforcement.

Why drainage matters

Water trapped behind a wall adds pressure and is a common reason walls lean or fail. Most installation guides call for clean gravel behind the blocks and a perforated drain pipe at the base that lets water out. Price that stone with our gravel calculator. Call 811 before digging so buried lines can be marked.

A step-by-step example

Say you want a garden wall 24 feet long that stands 2 feet above the ground, using blocks 12 inches long and 6 inches tall, with half of the first course buried. Add the 3 buried inches to the 24 visible inches for 27 inches. That is 4.5 courses, so 5. Along the wall, 288 inches ÷ 12 = 24 blocks a course. The retaining wall calculator shows 120 blocks. Add caps, about 24 of them if they are also 12 inches long, and a few spare blocks for cuts.

Then price gravel for the base and drainage, and fabric if the guide calls for it.

Common mistakes to avoid

A common mistake is measuring only the visible height and forgetting the buried course. Another is leaving out caps, which run the length of the top course. A third is ignoring corners and curves, which need special or cut blocks. Run the retaining wall calculator for each straight section.

Prices change from store to store and week to week, so price the exact items you plan to buy on the same day, and keep the receipt for anything you might return.

Estimates for planning only. Prices, codes and site conditions vary; get a written quote and check local building rules before you buy materials.

Related calculators:

Questions about this calculator

How many retaining wall blocks do I need?

Multiply blocks per course by courses. A 30 by 3 foot wall with 12 by 6 inch blocks needs 180.

Do I include the buried course?

Yes. Add the buried height to the wall height you enter.

Does the retaining wall calculator include caps?

No. Count caps as the wall length divided by the cap length.

Do I need a permit for a retaining wall?

It depends on height and location. Ask your local building department.

How much does a retaining wall cost?

Blocks are only part of it. Add caps, gravel, drain pipe, fabric and labor.

Check the assumptions and units before relying on a result. Financial, tax and health estimates do not replace advice for your individual circumstances.

Report a calculation issue