A retaining wall calculator works out how many wall blocks and cap units you need, plus the base gravel to set them on, from the wall's length and height and your block size. It's built for stackable segmental blocks — the standard DIY retaining system.
Block walls are estimated by face area: the wall's length × height divided by one block's face. This also counts your courses and the cap row, and sizes the compacted gravel base the wall sits on.
Blocks = wall face area (length × height) ÷ block face area (length × height). Courses = height ÷ block height. Caps = length ÷ cap length. Base gravel = length × ~1.5 ft trench width × base depth, in cubic yards. Tall or load-bearing walls need engineered design, geogrid reinforcement and drainage.
A 20 ft long, 3 ft high wall in 12 × 6 in blocks needs about 120 blocks, 6 courses, 20 caps and ~0.6 yd³ of base gravel.