{
  "id": "retaining-wall",
  "version": "e224b2da7c7e",
  "status": "published",
  "name": "Retaining Wall Calculator",
  "question": "How many retaining wall blocks?",
  "summary": "Retaining wall calculator: the blocks, courses and cap blocks for a segmental block retaining wall, and the gravel for its base and the drainage zone behind it, with cost.",
  "category": "construction",
  "subcategory": "garden",
  "url": "https://www.acalculator.org/construction/retaining-wall-calculator",
  "markdown": "https://www.acalculator.org/construction/retaining-wall-calculator.md",
  "kind": "function",
  "method": "Courses = height ÷ block height and blocks per course = length ÷ block length, each rounded up; blocks = courses × blocks per course; caps = length ÷ cap length, rounded up; gravel = length × (base width × base depth + drainage width × height).",
  "assumptions": [
    "A straight wall of one block thickness, laid in running courses; the wall height includes the buried first course.",
    "The defaults (16 × 6 in blocks, a 24 in wide, 6 in deep base, 12 in of drainage gravel) are starting points: use your block maker’s sizes and installation guide.",
    "A tall wall, or one holding back a slope, a drive or a building, may need an engineer’s design; check local rules."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "l": {
        "title": "Wall length",
        "description": "The length of the wall along its face.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "minimum": 0.001,
        "maximum": 1000
      },
      "h": {
        "title": "Wall height",
        "description": "The full height of the block courses, the buried course included, caps left out.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "minimum": 0.001,
        "maximum": 1000
      },
      "bl": {
        "title": "Block length",
        "description": "The face length of one block.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "minimum": 0.001,
        "maximum": 1000
      },
      "bh": {
        "title": "Block height",
        "description": "The height of one block.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "minimum": 0.001,
        "maximum": 1000
      },
      "cl": {
        "title": "Cap length",
        "description": "The face length of one cap block.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "minimum": 0.001,
        "maximum": 1000
      },
      "p": {
        "title": "Price per block",
        "description": "The price of one wall block. Leave empty to skip the cost.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 1000000
      },
      "tw": {
        "title": "Base trench width",
        "description": "The width of the gravel base under the wall.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "minimum": 0.001,
        "maximum": 1000
      },
      "td": {
        "title": "Base depth",
        "description": "The depth of compacted gravel under the first course.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "minimum": 0.001,
        "maximum": 1000
      },
      "dw": {
        "title": "Drainage zone",
        "description": "The width of drainage gravel behind the wall, for its full height.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "minimum": 0.001,
        "maximum": 1000
      }
    }
  },
  "outputs": {
    "blocks": {
      "label": "Wall blocks",
      "description": "Courses × blocks per course.",
      "format": "integer"
    },
    "courses": {
      "label": "Courses",
      "description": "Wall height ÷ block height, rounded up.",
      "format": "integer"
    },
    "perCourse": {
      "label": "Blocks per course",
      "description": "Wall length ÷ block length, rounded up.",
      "format": "integer"
    },
    "caps": {
      "label": "Cap blocks",
      "description": "Wall length ÷ cap length, rounded up.",
      "format": "integer"
    },
    "face": {
      "label": "Wall face",
      "description": "Wall length × wall height.",
      "format": "quantity",
      "unit": "ft2"
    },
    "base": {
      "label": "Base gravel",
      "description": "Length × base trench width × base depth.",
      "format": "number"
    },
    "drain": {
      "label": "Drainage gravel",
      "description": "Length × drainage zone × wall height.",
      "format": "number"
    },
    "gravel": {
      "label": "Gravel in all",
      "description": "Base gravel + drainage gravel.",
      "format": "number"
    },
    "gravelM3": {
      "label": "Gravel in all, cubic metres",
      "description": "The same in m³.",
      "format": "number"
    },
    "cost": {
      "label": "Block cost",
      "description": "Wall blocks × the price per block.",
      "format": "money"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "l": 6.096,
      "h": 0.9144000000000001,
      "bl": 0.4064,
      "bh": 0.15239999999999998,
      "cl": 0.4064,
      "tw": 0.6095999999999999,
      "td": 0.15239999999999998,
      "dw": 0.30479999999999996
    },
    "outputs": {
      "blocks": 90,
      "courses": 6,
      "perCourse": 15,
      "caps": 15,
      "face": 5.5741824,
      "base": 0.7407407407407407,
      "drain": 2.2222222222222223,
      "gravel": 2.962962962962963,
      "gravelM3": 2.26534772736
    },
    "text": "You need 90 wall blocks (6 courses of 15), 15 caps and 2.96 yd³ of gravel."
  },
  "examples": [
    {
      "given": {
        "l": 6.096,
        "h": 0.9144000000000001,
        "bl": 0.4064,
        "bh": 0.15239999999999998,
        "cl": 0.4064,
        "tw": 0.6095999999999999,
        "td": 0.15239999999999998,
        "dw": 0.30479999999999996,
        "p": 3.5
      },
      "expect": {
        "courses": 6,
        "perCourse": 15,
        "blocks": 90,
        "caps": 15,
        "base": 0.7407407407407407,
        "drain": 2.2222222222222223,
        "cost": 315
      },
      "source": "the stated formula, written out in content.mdx (courses = height ÷ block height and blocks per course = length ÷ block length, each rounded up; gravel = length × width × depth); NIST SP 811 (2008), Appendix B: 1 in = 0.0254 m, 1 yd³ = 27 ft³, https://www.nist.gov/pml/special-publication-811 (retrieved 2026-10-03): 36 ÷ 6 = 6 courses; 240 ÷ 16 = 15 blocks; 90 blocks × $3.50 = $315; base 20 × 2 × 0.5 = 20 ft³; drain 20 × 1 × 3 = 60 ft³",
      "tolerance": 1e-12
    },
    {
      "given": {
        "l": 3.048,
        "h": 0.762,
        "bl": 0.30479999999999996,
        "bh": 0.1016,
        "cl": 0.30479999999999996,
        "tw": 0.6095999999999999,
        "td": 0.15239999999999998,
        "dw": 0.30479999999999996
      },
      "expect": {
        "courses": 8,
        "perCourse": 10,
        "blocks": 80,
        "caps": 10,
        "gravel": 1.2962962962962963
      },
      "source": "the stated formula, written out in content.mdx (courses = height ÷ block height and blocks per course = length ÷ block length, each rounded up; gravel = length × width × depth); NIST SP 811 (2008), Appendix B: 1 in = 0.0254 m, 1 yd³ = 27 ft³, https://www.nist.gov/pml/special-publication-811 (retrieved 2026-10-03): 30 ÷ 4 = 7.5, so 8 courses; 120 ÷ 12 = 10; base 10 ft³ + drain 25 ft³ = 35 ft³",
      "tolerance": 1e-12
    },
    {
      "given": {
        "l": 6,
        "h": 1,
        "bl": 0.4,
        "bh": 0.2,
        "cl": 0.5,
        "tw": 0.6,
        "td": 0.15,
        "dw": 0.3
      },
      "expect": {
        "blocks": 75,
        "caps": 12,
        "gravelM3": 2.34
      },
      "source": "the stated formula, written out in content.mdx (courses = height ÷ block height and blocks per course = length ÷ block length, each rounded up; gravel = length × width × depth); NIST SP 811 (2008), Appendix B: 1 in = 0.0254 m, 1 yd³ = 27 ft³, https://www.nist.gov/pml/special-publication-811 (retrieved 2026-10-03): 1 ÷ 0.2 = 5 courses × 6 ÷ 0.4 = 15 = 75 blocks; 6 × 0.6 × 0.15 + 6 × 0.3 × 1 = 0.54 + 1.8 = 2.34 m³",
      "tolerance": 1e-12
    }
  ],
  "sources": [
    "NIST Special Publication 811 (2008), Appendix B: 1 in = 0.0254 m and 1 ft = 0.3048 m exactly, 1 yd³ = 27 ft³, retrieved 2026-10-03. https://www.nist.gov/pml/special-publication-811",
    "Wikipedia, Retaining wall: short landscaping walls are often made of segmental concrete units, and proper drainage behind the wall limits the pressure on it, retrieved 2026-10-03. https://en.wikipedia.org/wiki/Retaining_wall"
  ],
  "related": [
    "gravel",
    "concrete-block",
    "paver"
  ],
  "changelog": []
}
