Construction calculators

Retaining Wall Calculator

Updated Nov 12, 2026 By Infinity Calculator Formulas Sources
Rate
Unit System:

ft
in
ft
in
60.00 sq ft

in
in

Include cap/coping row?


in



Retaining Wall Material Estimate

Material estimator only. This tool counts blocks, caps, pins, and backfill for segmental retaining-wall projects. It does not perform structural-stability analysis (overturning, sliding, bearing capacity, or active earth pressure). For walls over 4 ft (1.2 m) tall, walls supporting structures or slopes, or walls in areas with poor soil, consult a licensed engineer.
Total Blocks Needed
160
Courses (Rows)
9
Cap Blocks Needed
20
Connection Pins
280
Backfill Gravel (yd³)
2.22
Wall Face Area
60.00 sq ft
Blocks per Row
20
Total Estimated Cost
$668.00
Cost Breakdown
Item Qty Unit Price Subtotal
Total Estimated Cost $668.00
Cost Distribution
Material Summary
Material Quantity Details

Introduction

A retaining wall holds back soil and keeps land in place. Building a wall for a garden, a hillside, or a property edge, you need to know the right amount of materials before you start. Our Retaining Wall Calculator helps you figure out how many blocks, stones, or concrete units you need for your project. Just enter the wall's height, length, and the size of your chosen material, and the calculator returns the totals you need. This saves you time, cuts down on waste, and helps you avoid buying too much or too little material. Getting your material estimates right from the start keeps your project on budget and on track.

How to Use Our Retaining Wall Calculator

Enter the details of your retaining wall below. This calculator will tell you how many wall blocks, cap blocks and connection pins you need, and how much backfill gravel to order for behind the wall.

Wall Length: Type in the total length of the retaining wall you plan to build. Measure from one end to the other in feet or meters.

Wall Height: Enter how tall you want your retaining wall to be. Measure from the top of the gravel base, where the first course sits, to the top of the wall, including any cap row. Include the part of the wall that sits below the ground. That buried part should be at least 6 inches deep.1

Block Length: Enter the length of one single block. You can find this size on the product label or measure the block yourself.

Block Height: Enter the height of one single block. This helps the calculator figure out how many rows of blocks you will need.

Backfill Depth: Enter how far behind the wall you want to fill with gravel or drainage stone. Good backfill keeps water from building up and pushing against your wall.

Pins per Block: Enter how many connection pins each block takes, from the block maker's guide. The calculator puts pins in every course above the bottom one and none in the glued cap row. Enter 0 for blocks that lock with built-in lips or keys.

Retaining Wall Calculator – Estimate Materials and Costs

A retaining wall is a structure built to hold back soil on a slope or hillside. It keeps the earth in place and prevents it from sliding or eroding. Retaining walls are common in yards, driveways, gardens, and anywhere the ground changes height. They can be short decorative borders or tall walls that hold back thousands of pounds of soil.

Materials Used in a Retaining Wall

Many retaining walls, from home landscape walls to highway walls, are built using interlocking concrete blocks, sometimes called segmental retaining wall (SRW) units.3 These blocks stack on top of each other in rows called courses. Each course is one horizontal layer of blocks running the full length of the wall. The blocks come in different sizes, but common dimensions include 12 inches long by 4 inches high and 18 inches long by 6 inches high.

Here are the key materials you need for a typical block retaining wall:

  • Wall blocks – The main building units that make up the body of the wall. The number you need depends on the wall's length, height, and the size of each block.
  • Cap blocks (coping) – A finishing row placed on top of the wall. Cap blocks give the wall a clean look and help keep water from seeping into the joints below. They are usually glued in place with construction adhesive. The adhesive should meet the block maker's requirements.4
  • Connection pins – Small pins of non-degrading plastic or galvanized steel that fit between courses to lock the blocks together.4 On most pinned blocks, the pins also set the slight setback (lean) into the hillside, and that setback adds strength.3 Blocks that lock with built-in lips or keys need no pins.3
  • Backfill gravel – Crushed stone placed behind the wall to allow water to drain away, which our Gravel Calculator can estimate in more detail. Without proper drainage, water pressure (called hydrostatic pressure) builds up behind the wall and can cause it to lean, crack, or fail.

How Block Quantities Are Calculated

To find the number of blocks, you divide the total wall length by the length of one block to get the blocks per row. Then you divide the wall height by the height of one block to get the number of courses. Multiply blocks per row by the number of courses, and you have the total block count. If you include a cap row, the top course uses cap blocks instead of standard blocks.

Why Backfill Gravel Matters

Whenever possible, water should be directed away from the wall, because the gravel and drain pipe behind it are meant to handle only incidental water.1 A zone of free-draining gravel at least 12 inches deep behind the blocks lets incidental water flow down and away instead of pushing against the wall.1 The volume of gravel is found by multiplying the wall length, wall height, and the depth of the gravel zone. A perforated or slotted drain pipe in the gravel zone collects that water.4 The pipe should be at least 3 inches in diameter and drain through weep holes no more than 50 feet apart or straight to a drainage system, at a height and size the wall designer sets for the site.1

Helpful Tips for Planning

  • Always order 5 to 10 percent extra blocks to account for cuts, breakage, and waste.
  • CMHA recommends an engineered design by a registered professional for walls taller than 4 feet.1 Many areas also require a permit, so check your local building codes before starting.
  • A compacted gravel base (leveling pad) at least 6 inches thick should be placed under the first course of blocks.3 This base is separate from the backfill gravel behind the wall.
  • Use landscape fabric between the gravel and the surrounding soil to stop dirt from clogging the drainage zone over time. In some cases, a geotextile filter fabric is placed between the gravel and the soil behind it to keep the gravel from clogging.3
  • Some projects involve pouring a concrete footing beneath the wall, and our Concrete Calculator can help you determine how much concrete you need.

Formulas used

Wall Face Area
A = \frac{L_{\text{in}} \times H_{\text{in}}}{144}
Blocks per Row
B_{\text{row}} = \lceil \frac{L_{\text{wall}}}{L_{\text{block}}} \rceil
Number of Courses
C = \lceil \frac{H_{\text{wall}}}{H_{\text{block}}} \rceil
Total Wall Blocks
B_{\text{total}} = B_{\text{row}} \times (C - C_{\text{cap}})
Connection Pins
P = \max(0,\ C - C_{\text{cap}} - 1) \times B_{\text{row}} \times n_{\text{pin}}
Backfill Gravel Volume
V_{\text{yd}^3} = \frac{L_{\text{in}} \times H_{\text{in}} \times D_{\text{in}}}{46656}
Total Estimated Cost
\text{Cost} = B_{\text{total}} \times p_b + B_{\text{cap}} \times p_c + V \times p_g + P \times p_p

Frequently asked questions

How many retaining wall blocks do I need per square foot?

It depends on the block size. For a standard 12×4 inch block, you need about 3 blocks per square foot of wall face. For a larger 18×6 inch block, you need about 1.3 blocks per square foot. The calculator figures this out for you based on the block size you pick.

What is a cap row and do I really need one?

A cap row is the top finishing course on your retaining wall. It gives the wall a clean, finished look and helps stop water from getting into the joints below. A wall can also finish with its top course of regular blocks instead. Cap blocks are usually glued down with construction adhesive for a secure hold. The adhesive should meet the block maker's requirements.4

What are connection pins and how many do I need?

Connection pins are small pins of non-degrading plastic or galvanized steel that fit between rows of blocks on pinned wall systems.4 They lock the blocks together, and on most pinned systems they set the slight backward lean into the hillside that adds strength.3 How many you need depends on the block system. VERSA-LOK Standard units, for example, take two pins per unit, set through each course into the course below.5 Blocks that lock with built-in lips or keys need no pins.3

How deep should the backfill gravel be behind my retaining wall?

CMHA calls for at least 12 inches of free-draining gravel behind the wall.1 This gives water enough room to drain down and away from the blocks. For taller walls or areas with heavy rainfall, you may want to increase this depth. Drainage needs depend on the groundwater at the site, so a wall designer may call for more.1 The calculator uses 12 inches as the default.

What block size should I choose for my retaining wall?

For short walls under 2 feet, small 8×4 inch blocks work well. For walls between 2 and 4 feet, standard 12×4 or 12×6 inch blocks are popular. For taller walls, larger 16×6 or 18×6 inch blocks provide more weight and stability per course. For walls built without soil reinforcement, a block that is wider from front to back or heavier gives more stability.1 CMHA recommends an engineered design by a registered professional for walls taller than 4 feet.1

How do I measure my wall length if it curves?

For a curved wall, use a flexible tape measure or a string to follow the curve from one end to the other. Measure along the face of where the wall will sit. Enter that total length into the calculator.

Do I need a permit to build a retaining wall?

The International Residential Code does not require a permit for retaining walls that are not over 4 feet tall, measured from the bottom of the footing to the top of the wall, unless the wall supports a surcharge.2 Local rules can be stricter, so check with your local building department before you start. CMHA recommends an engineered design for any wall taller than 4 feet.1

What type of gravel should I use for backfill?

Use clean, crushed stone, typically 3/4 inch in size. A clean granular fill that meets the gradation in the wall's specification also works.4 Crushed stone has angular edges that lock together and let water pass through easily. The gravel fill should be a free-draining aggregate, which drains incidental water and also helps with compaction behind the blocks.1


Sources

  1. Segmental Retaining Wall Design (SRW-TEC-004). Concrete Masonry & Hardscapes Association. Drainage; Wall Batter; Unit Size and Shear Capacity. Accessed September 26, 2026.
  2. 2024 International Residential Code (IRC), Chapter 1: Scope and Administration. International Code Council. 2024;R105.2 Work exempt from permit, Building item 3. Accessed October 7, 2026.
  3. Guide to Segmental Retaining Walls (SRW-TEC-005). Concrete Masonry & Hardscapes Association. System Advantages; Wall Types, Conventional; System Components. Accessed November 12, 2026.
  4. Segmental Retaining Wall Sample Specifications (SRW-GSP-001). Concrete Masonry & Hardscapes Association. 2025;2.01 Concrete Segmental Retaining Wall Units; 2.03 Drainage Pipe; 2.04 Gravel Fill; 3.08 Cap Block Placement; Part 4 Measurement. Accessed November 12, 2026.
  5. Standard - Additional Courses. VERSA-TECH Academy. VERSA-LOK. Setting the Pins. Accessed November 12, 2026.