Skip to content
FreeConcreteCalculator
Concrete calculator
Concrete 24
Cost 21
Gravel & soil 25
Masonry 12
Conversions 6
All calculators
Block, rebar & mix

Retaining Wall Calculator

Divide the wall height by the block's face height to get courses, and the wall length by the block's face length to get blocks per course; multiply and add about 5% extra. A 20 ft × 3 ft wall of 12 × 6 in blocks is 6 × 20 = 120 blocks, or 126 with 5%, plus 21 caps.

By Izhar Ahmad DanishReviewed by M BilalUpdated

ft
ft
%
in
in
in
in
ft

Blocks = courses (height ÷ block height) × blocks per course (length ÷ block length), plus extra. Base 24 × 6 in and 12 in of drain rock follow the Allan Block residential guide; your block maker and wall design win. Rock tons use a typical 1.35 t/yd³ for clean crushed stone. Geogrid layers and length must come from the manufacturer chart or an engineer.

Key numbers

  • Formula: blocks = ⌈height ÷ block height⌉ × ⌈length ÷ block length⌉ × (1 + extra)
  • Allan Block residential guide: base trench 24 in wide, at least 6 in of compacted wall rock, 12 in of wall rock behind the block
  • Drain pipe (Allan Block): required for reinforced walls, gravity walls over 4 ft, or poorly drained sites
  • IRC R404.4: taller or surcharged retaining walls must be designed; the trigger height depends on the code edition your area adopted
On this page
  1. How to use the Retaining Wall Calculator
  2. How do you calculate how many retaining wall blocks you need?
  3. How many retaining wall blocks per square foot?
  4. How many blocks for common retaining wall sizes?
  5. How much base gravel goes under a retaining wall?
  6. How much drain rock goes behind a retaining wall?
  7. Does a retaining wall need geogrid?
  8. How tall can a retaining wall be without an engineer?
  9. Retaining wall calculations in metric
  10. Common retaining wall estimating mistakes
  11. Frequently asked questions
Estimates only. Sizes, thicknesses and reinforcement on this page are planning figures, not a structural design. Follow your local building code and have a licensed engineer design anything that carries load or retains soil.

How to use the Retaining Wall Calculator

  1. 1Enter your numbersFill in wall length (ft), wall height incl. buried course (ft), block face size (length × height), extra for cuts and breakage (%), cap length (0 = no caps) (in), base trench width (in), base rock depth (in), drain rock behind block (in), geogrid layers (from your wall design) or geogrid length into backfill (ft).
  2. 2Check the assumptionsBlocks = courses (height ÷ block height) × blocks per course (length ÷ block length), plus extra. Base 24 × 6 in and 12 in of drain rock follow the Allan Block residential guide; your block maker and wall design win. Rock tons use a typical 1.35 t/yd³ for clean crushed stone. Geogrid layers and length must come from the manufacturer chart or an engineer.
  3. 3Read the resultsThe calculator shows wall blocks to buy, courses × blocks per course, cap units, wall face, base rock or drain rock behind wall, updated as you type.
  4. 4Use the resultRound up to what your supplier sells, and keep a little extra for waste.

Results update as you type. Back to the calculator ↑

Illustration of a segmental block retaining wall with a gravel base, drain rock behind the blocks and caps on top

How do you calculate how many retaining wall blocks you need?

Count courses up the wall and blocks along each course, multiply, then add a small allowance. The calculator above does that and also sizes the caps, the gravel base under the first course and the drain rock behind the wall.

Courses = wall height (in) ÷ block face height (in), rounded up
Blocks per course = wall length (in) ÷ block face length (in), rounded up
Blocks to buy = courses × blocks per course × (1 + extra %), rounded up

  1. Measure the length along the face of the wall, in feet. Split a wall with a corner into two straight runs.
  2. Set the height from the bottom of the first course to the top of the last block, not counting caps. Include the buried course: if the finished wall shows 2 ft 6 in and you bury 6 in, enter 3 ft.
  3. Pick the face size. Use the face length and height on the block’s product sheet. The depth of the block (front to back) does not change the count.
  4. Add extra. About 5% covers cuts at the ends and a few broken units on a straight wall; use more for curves and corners. This is a rule of thumb, not a standard.

Worked example: 20 ft × 3 ft wall, 12 × 6 in blocks

  • Courses: 36 in ÷ 6 in = 6
  • Blocks per course: 240 in ÷ 12 in = 20
  • Blocks: 6 × 20 = 120, with 5% extra = 126 → 126 blocks
  • Caps, 12 in long: 240 ÷ 12 = 20, with 5% = 21 caps
  • Base rock, 24 in wide × 6 in deep: 20 × 2 × 0.5 = 20 ft³ = 0.74 yd³, about 1 ton
  • Drain rock, 12 in behind the block, full height: 20 × 3 × 1 = 60 ft³ = 2.22 yd³, about 3 tons

Tons use a typical 1.35 t/yd³ for clean crushed stone. Ask your supplier for their weight per yard.

Rounding each direction up matters. A 4.2 ft wall of 8 in high blocks is 50.4 ÷ 8 = 6.3 courses, which means 7 courses, not 6.3: you cannot buy part of a course, and the top course sets the finished height. If the extra height is a problem, bury a little more of the first course or step the base.

How many retaining wall blocks per square foot?

Blocks per square foot of wall face is 144 divided by the face length × face height in inches. Many wall blocks are sold by a nominal face size; when the product sheet gives units per square foot, use that.

Block face (in) Face area (in²) Blocks per ft² Blocks per m² 25 × 4 ft wall (100 ft²), no extra +5%
12 × 4 48 3 32.3 300 315
12 × 6 72 2 21.5 200 210
16 × 6 96 1.5 16.1 152 160
16 × 8 128 1.125 12.1 114 120
18 × 8 144 1 10.8 102 108

The 16 × 6 and 16 × 8 rows are not exactly 150 and 112.5 because the calculator rounds each course up to whole blocks: 300 in ÷ 16 in = 18.75, so each course takes 19 blocks. That is how a wall is actually built, with the last block of each course cut.

How many blocks for common retaining wall sizes?

These use 12 × 6 in face blocks, 12 in caps and 5% extra, with Allan Block’s 24 × 6 in base and 12 in of drain rock.

Wall (length × height) Courses × per course Blocks to buy Caps Base rock (yd³ / tons) Drain rock (yd³ / tons)
10 × 2 ft 4 × 10 42 11 0.37 / 0.5 0.74 / 1.0
20 × 2 ft 4 × 20 84 21 0.74 / 1.0 1.48 / 2.0
20 × 3 ft 6 × 20 126 21 0.74 / 1.0 2.22 / 3.0
30 × 3 ft 6 × 30 189 32 1.11 / 1.5 3.33 / 4.5
40 × 3 ft 6 × 40 252 42 1.48 / 2.0 4.44 / 6.0
50 × 4 ft 8 × 50 420 53 1.85 / 2.5 7.41 / 10.0
100 × 3 ft 6 × 100 630 105 3.70 / 5.0 11.11 / 15.0

Drain rock here is only the 12 in zone behind the blocks. Hollow-core blocks also take rock in their cores, which this table does not count; the block maker’s sheet usually lists the fill per unit or per square foot of face.

How much base gravel goes under a retaining wall?

Allan Block’s residential installation guide says to dig a base trench 24 in wide along the wall, place at least 6 in of wall rock, and compact it; sand is used only as a thin layer (up to ½ in of coarse sand) for minor leveling under the blocks. The trench depth is the 6 in of rock plus 1 in for each foot of wall height, to bury the first course; for walls under 4 ft the same guide allows a trench 18 in wide and 4 in deep plus the buried block.

Base rock (ft³) = length (ft) × trench width (ft) × rock depth (ft)
Base rock (yd³) = ft³ ÷ 27

At 24 × 6 in, that is exactly 1 ft³ of base per foot of wall, or 1 yd³ per 27 ft. At the smaller 18 × 4 in base it is 0.5 ft³ per foot. Allan Block’s commercial gravity-wall guide says “Per the approved plan, excavate base trench a minimum of 24 in (610 mm) wide and 12 in (300 mm) deep,” which shows how much the base depends on the wall and the site. Taller or loaded walls take the base on their approved plan, not these residential figures.

Base (width × depth) Source ft³ per ft of wall yd³ per 10 ft m³ per 10 m
18 × 4 in Allan Block residential, walls under 4 ft 0.5 0.19 0.46
24 × 6 in Allan Block residential 1.0 0.37 0.93

The base under the wall is not the same layer as the base under a patio: a wall concentrates its weight on a narrow strip, so follow the wall block maker’s base, not a paver guide.

How much drain rock goes behind a retaining wall?

Allan Block’s residential guide fills the hollow cores of the base course and 12 in behind the block with wall rock, to the height of the block, and keeps doing so as each course goes on. Soil or approved infill then goes behind the wall rock in lifts of no more than 8 in, compacted.

Drain rock (ft³) = length (ft) × height (ft) × zone width (ft)

With a 12 in zone, every square foot of wall face takes 1 ft³ of rock. A 20 × 3 ft wall has 60 ft² of face, so 60 ft³, or 2.22 yd³. The guide also says a drain pipe is required for any reinforced wall, for gravity walls over 4 ft tall, and on sites with poor drainage, placed at the lowest point toward the back of the trench and vented to daylight every 50 ft.

Order the drain pipe by the length of the wall plus the runs out to daylight. A 50 ft wall with a 10 ft outlet run needs about 60 ft of pipe.

Does a retaining wall need geogrid?

Geogrid is a plastic grid laid between courses and out into the compacted backfill to tie the soil and wall together. Whether a wall needs it, how many layers, and how far back they reach is a design decision. Allan Block’s installation guide points to the approved plans and the maker’s reinforcement chart when reinforcement is needed; it does not give one height for every block and soil.

The calculator therefore takes geogrid only as an input. Enter the number of layers and the length into the backfill from your chart or engineer, and it returns the area to order:

Geogrid (ft²) = layers × wall length (ft) × grid length (ft)

For example, 2 layers of 3 ft grid on a 50 ft wall is 2 × 50 × 3 = 300 ft² (27.9 m²). Geogrid rolls are sold by width and length, so convert that area to rolls with the roll size on the product sheet, and place and orient it as the manufacturer’s instructions and your wall design specify.

How tall can a retaining wall be without an engineer?

That is set by your local building code, not by the block. The International Residential Code covers it in Section R404.4, and the wording differs between editions:

  • Older IRC editions require retaining walls not laterally supported at the top that retain more than 24 in of unbalanced fill to be designed for stability against overturning, sliding, excessive foundation pressure and water uplift.
  • The 2024 IRC (as carried into the 2025 California Residential Code) reads: “Retaining walls that are not laterally supported at the top and that retain in excess of 48 inches (1219 mm) of unbalanced fill, or retaining walls exceeding 24 inches (610 mm) in height that resist lateral loads in addition to soil, shall be designed in accordance with accepted engineering practice to ensure stability against overturning, sliding, excessive foundation pressure and water uplift.” It adds: “Retaining walls shall be designed for a safety factor of 1.5 against lateral sliding and overturning.”

Unbalanced fill is the difference in soil height between the two sides of the wall, not the total block height. “Lateral loads in addition to soil” include things like a driveway, a slope or a building above the wall. States and cities amend the IRC, and some require a permit for any wall over a set height, so ask your building department which edition and amendments apply before you buy blocks.

Retaining wall calculations in metric

The method is the same in millimetres: courses = height ÷ face height, blocks per course = length ÷ face length, each rounded up.

Worked example: 6 m × 0.9 m wall, 300 × 150 mm blocks

  • Courses: 900 ÷ 150 = 6; blocks per course: 6,000 ÷ 300 = 20
  • Blocks: 120, with 5% extra = 126; caps 300 mm long: 20, with 5% = 21
  • Base rock, 600 × 150 mm: 6 × 0.6 × 0.15 = 0.54 m³, about 0.86 tonnes
  • Drain rock, 300 mm zone: 6 × 0.9 × 0.3 = 1.62 m³, about 2.59 tonnes

Tonnes use the site’s typical 1.35 t/yd³ for crushed stone converted to metric (about 1.60 t/m³). Use your supplier’s figure when they give one.

Common retaining wall estimating mistakes

  • Leaving out the buried course. The first course sits below grade, so a wall that shows 3 ft may need 3 ft 6 in of block.
  • Counting by block depth. Only the face length and height set the count. The depth affects the base width and how much rock fills the cores.
  • Forgetting the caps and cap adhesive. Caps run the full length of the wall; buy the adhesive the maker specifies.
  • Using sand as the base. Allan Block’s guide uses at least 6 in of compacted wall rock, with no more than ½ in of coarse sand for leveling.
  • Skipping drain rock and pipe. Water pressure behind a wall is a common cause of failure, which is why the guide calls for rock behind the block and a pipe on taller or wet sites.
  • Guessing geogrid. Layers and length come from the reinforcement chart or a design, never from a calculator default.

All quantities here are estimates for ordering. The block manufacturer’s installation guide and any engineered design take priority, and walls near a property line, a driveway, a slope or a building may need a permit and a design under your local code.

FAQ

Frequently asked questions

How many retaining wall blocks do I need?

Courses = wall height (in) ÷ block face height (in), rounded up. Blocks per course = wall length (in) ÷ block face length (in), rounded up. Multiply and add about 5% for cuts and breakage. A 20 ft long, 3 ft high wall of 12 × 6 in blocks needs 6 × 20 = 120 blocks, or 126 with 5%.

How many retaining wall blocks are in a square foot?

Divide 144 by the block's face length × height in inches. A 12 × 4 in face is 3 per ft², 12 × 6 in is 2, 16 × 6 in is 1.5, 16 × 8 in is 1.125 and 18 × 8 in is 1. Use the face size on the manufacturer's sheet, not the depth of the block.

How much gravel do I need behind a retaining wall?

Allan Block's residential guide fills the hollow cores and 12 in behind the block with wall rock, to the height of the block. That is length × height × 1 ft. A 20 × 3 ft wall needs 60 ft³, or 2.22 yd³, about 3 tons at a typical 1.35 t/yd³, plus the cores.

How much base gravel do I need for a retaining wall?

Allan Block's guide uses a trench 24 in wide with at least 6 in of compacted wall rock. That is length × 2 ft × 0.5 ft, or 1 ft³ per foot of wall. A 20 ft wall needs 20 ft³, or 0.74 yd³, about 1 ton. Walls under 4 ft may use an 18 × 4 in base in the same guide.

How many caps do I need for a retaining wall?

Divide the wall length in inches by the cap length and add a little extra for cuts. With 12 in caps, a 20 ft wall needs 240 ÷ 12 = 20 caps, or 21 with 5%. Curves and corners use more cut caps, so check the cap's length on the product sheet.

How tall can a retaining wall be without an engineer?

It depends on your local code. IRC R404.4 requires a designed wall above a set amount of unbalanced fill: older editions say 24 in, while the 2024 IRC says 48 in, or 24 in when the wall also carries other lateral loads such as a slope, driveway or building above. Ask your building department which applies.

How much of the first block do you bury?

Allan Block's residential guide adds 1 in of trench depth for each foot of wall height to bury the first course, on top of the 6 in of base rock. A 3 ft wall gets a trench about 9 in deep. Count the buried part in the wall height you enter.

Does a retaining wall need geogrid?

That is a design decision, not something to guess. Taller walls, walls on poor soil and walls with a slope, driveway or building above are the usual cases where it is needed. Whether a wall needs it, the number of geogrid layers and their length come from the manufacturer's reinforcement chart or an engineer, so enter them in the calculator only from that design.

5 Sources

  1. Allan Block: Basic Installation (residential retaining walls)
  2. Allan Block: Gravity Retaining Wall Construction (commercial)
  3. International Code Council: 2021 International Residential Code, Chapter 4 Foundations (Section R404.4 Retaining walls)
  4. 2025 California Residential Code (based on the 2024 IRC), Section R404.4 Retaining walls
  5. National Concrete Masonry Association (NCMA): segmental retaining wall design resources

Last reviewed October 10, 2026 by M Bilal. Found an error? Tell us.

Before you pour

Save this for pour day

One short email a month with seasonal pour tips, price-check advice and new calculators. Unsubscribe anytime.