{
  "id": "soil",
  "version": "96e1c48ef4f7",
  "status": "published",
  "name": "Soil Calculator",
  "question": "How much soil do I need?",
  "summary": "Computes the volume of soil or topsoil to fill rectangular or round garden beds to a depth, with an extra share for settling, in cubic yards, cubic feet, cubic metres and litres, and the number of bags.",
  "category": "construction",
  "subcategory": "garden",
  "url": "https://www.acalculator.org/construction/soil-calculator",
  "markdown": "https://www.acalculator.org/construction/soil-calculator.md",
  "kind": "function",
  "method": "Volume = length × width × depth (or π × diameter² ÷ 4 × depth) × beds × (1 + extra ÷ 100); bags = volume ÷ bag size, rounded up.",
  "assumptions": [
    "The bed is filled level to the depth you type, with straight sides.",
    "Extra for settling is 10% by default: loose soil settles after watering, and some is spilled. Set it to 0 for the bed volume alone.",
    "Bags are counted by the volume printed on the bag; soil is not compressed or loosened further."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "shape": {
        "title": "Bed shape",
        "description": "Whether the bed is a rectangle or a circle.",
        "type": "string",
        "enum": [
          "rect",
          "circle"
        ]
      },
      "l": {
        "title": "Length",
        "description": "The length of the bed.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "exclusiveMinimum": 0,
        "maximum": 1000
      },
      "w": {
        "title": "Width",
        "description": "The width of the bed.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "exclusiveMinimum": 0,
        "maximum": 1000
      },
      "d": {
        "title": "Diameter",
        "description": "The diameter of a round bed.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "exclusiveMinimum": 0,
        "maximum": 1000
      },
      "depth": {
        "title": "Depth",
        "description": "How deep to fill the bed with soil.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "exclusiveMinimum": 0,
        "maximum": 100
      },
      "n": {
        "title": "Number of beds",
        "description": "How many beds of this size to fill.",
        "type": "integer",
        "minimum": 1,
        "maximum": 1000
      },
      "extra": {
        "title": "Extra for settling",
        "description": "Soil to add on top of the bed volume, in percent, because loose soil settles and some is spilled.",
        "type": "number",
        "x-unit": "percent",
        "minimum": 0,
        "maximum": 100
      },
      "bag": {
        "title": "Bag size",
        "description": "The volume of soil in one bag, as printed on the bag.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "volume",
        "minimum": 0.000001,
        "maximum": 100
      }
    }
  },
  "outputs": {
    "cubicYards": {
      "label": "Cubic yards",
      "description": "The soil to buy, in cubic yards (27 cubic feet each).",
      "format": "number"
    },
    "cubicFeet": {
      "label": "Cubic feet",
      "description": "The soil to buy, in cubic feet.",
      "format": "number"
    },
    "cubicMeters": {
      "label": "Cubic metres",
      "description": "The soil to buy, in cubic metres.",
      "format": "number"
    },
    "liters": {
      "label": "Litres",
      "description": "The soil to buy, in litres.",
      "format": "number"
    },
    "bags": {
      "label": "Bags",
      "description": "How many bags of the given size hold that much soil: the volume ÷ the bag size, rounded up.",
      "format": "integer"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "shape": "rect",
      "l": 3.048,
      "w": 1.2192,
      "d": 1.8288000000000002,
      "depth": 0.15239999999999998,
      "n": 1,
      "extra": 10,
      "bag": 0.042475269888
    },
    "outputs": {
      "cubicYards": 0.8148148148148148,
      "cubicFeet": 22,
      "cubicMeters": 0.622970625024,
      "liters": 622.970625024,
      "bags": 15
    },
    "text": "Soil needed: 0.81 yd³ (22 ft³); bags to buy: 15."
  },
  "examples": [
    {
      "given": {
        "shape": "rect",
        "l": 3.048,
        "w": 1.2192,
        "depth": 0.15239999999999998,
        "n": 1,
        "extra": 10,
        "bag": 0.042475269888
      },
      "expect": {
        "cubicFeet": 22,
        "cubicYards": 0.8148148148148148,
        "cubicMeters": 0.622970625024,
        "bags": 15
      },
      "source": "NIST Handbook 44, Appendix C (1 yd³ = 27 ft³, 1 ft = 0.3048 m); hand calculation in content.mdx: 10 × 4 × 0.5 = 20 ft³ × 1.1 = 22 ft³; 22 ÷ 1.5 = 14.67, so 15 bags"
    },
    {
      "given": {
        "shape": "rect",
        "l": 3.048,
        "w": 0.9144000000000001,
        "depth": 0.15239999999999998,
        "n": 1,
        "extra": 0,
        "bag": 0.042475269888
      },
      "expect": {
        "cubicFeet": 15,
        "bags": 10
      },
      "source": "NIST Handbook 44, Appendix C; hand calculation in content.mdx: 10 × 3 × 0.5 = 15 ft³ ÷ 1.5 = 10 bags"
    },
    {
      "given": {
        "shape": "rect",
        "l": 3,
        "w": 1,
        "depth": 0.3,
        "n": 2,
        "extra": 0,
        "bag": 0.04
      },
      "expect": {
        "cubicMeters": 1.8,
        "liters": 1800,
        "cubicYards": 2.354311114765906,
        "bags": 45
      },
      "source": "NIST Handbook 44, Appendix C (1 L = 0.001 m³, 1 yd = 0.9144 m); hand calculation in content.mdx: 3 × 1 × 0.3 × 2 = 1.8 m³ = 1,800 L ÷ 40 = 45 bags"
    },
    {
      "given": {
        "shape": "circle",
        "d": 1.8288000000000002,
        "depth": 0.30479999999999996,
        "n": 1,
        "extra": 0,
        "bag": 0.056633693184
      },
      "expect": {
        "cubicFeet": 28.274333882308138,
        "bags": 15
      },
      "source": "Cylinder volume π × d² ÷ 4 × depth (OpenStax, Prealgebra 2e, §9.6); hand calculation in content.mdx: π × 9 × 1 = 28.27 ft³ ÷ 2 = 14.14, so 15 bags"
    }
  ],
  "sources": [
    "NIST Handbook 44 (2024), Appendix C, General Tables of Units of Measurement: 1 yd³ = 27 ft³; 1 ft³ = 1,728 in³; 1 US gallon = 231 in³; 1 L = 0.001 m³; 1 ft = 0.3048 m. https://www.nist.gov/pml/owm/nist-handbook-44-current-edition",
    "OpenStax, Prealgebra 2e, §9.6 Solve Geometry Applications: Volume and Surface Area (volume of a rectangular solid and of a cylinder). https://openstax.org/books/prealgebra-2e/pages/9-6-solve-geometry-applications-volume-and-surface-area"
  ],
  "related": [
    "mulch",
    "gravel",
    "cubic-yards"
  ],
  "changelog": [
    {
      "date": "2026-09-30",
      "note": "Metric heads the result with the soil in m³; the answer names m³ and litres."
    }
  ]
}
