{
  "version": "v1",
  "source": "https://craftquantities.com",
  "licence": "CC BY 4.0",
  "licenceUrl": "https://creativecommons.org/licenses/by/4.0/",
  "attribution": "Craft Quantities — craftquantities.com",
  "documentation": "https://craftquantities.com/api/",
  "versioning": "Fields are added, never removed or repurposed, within a version. A breaking change becomes /api/v2/ and v1 keeps being built.",
  "slug": "sandbag-calculator",
  "category": "materials-quantities",
  "title": "Sandbag Calculator",
  "description": "Estimate how many sandbags you need to build a flood or erosion control barrier.",
  "url": "https://craftquantities.com/calculators/materials-quantities/sandbag-calculator/",
  "json": "https://craftquantities.com/api/v1/calculators/sandbag-calculator.json",
  "inputCount": 2,
  "testCaseCount": 2,
  "sourceCount": 1,
  "lastVerified": "2026-09-02",
  "citation": {
    "author": "Craft Quantities",
    "title": "Sandbag Calculator",
    "version": "1.0.1",
    "sourcesChecked": "2026-09-02",
    "url": "https://craftquantities.com/calculators/materials-quantities/sandbag-calculator/",
    "accessDate": null,
    "accessDateNote": "Add the date you retrieved this. It is deliberately absent: a static file cannot know when you read it, and the build date would be wrong.",
    "permanentVersionedUrl": null,
    "permanentVersionedUrlNote": "Not offered. This site keeps no archive of previous builds, so any such URL would resolve to the current page or to nothing. The version and sourcesChecked fields identify the calculation instead.",
    "formats": {
      "plain": "Craft Quantities. Sandbag Calculator. Version 1.0.1. Sources checked 2026-09-02. https://craftquantities.com/calculators/materials-quantities/sandbag-calculator/",
      "apa": "Craft Quantities. (2026). Sandbag Calculator (Version 1.0.1) [Web calculator]. Retrieved from https://craftquantities.com/calculators/materials-quantities/sandbag-calculator/",
      "harvard": "Craft Quantities (2026) Sandbag Calculator (Version 1.0.1). Available at: https://craftquantities.com/calculators/materials-quantities/sandbag-calculator/",
      "bibtex": "@misc{craftquantities-calculators-materials-quantities-sandbag-calculator,\n  author       = {{Craft Quantities}},\n  title        = {Sandbag Calculator},\n  version      = {1.0.1},\n  year         = {2026},\n  howpublished = {\\url{https://craftquantities.com/calculators/materials-quantities/sandbag-calculator/}},\n}"
    }
  },
  "inputs": [
    {
      "id": "barrierLength",
      "label": "Barrier Length",
      "type": "number",
      "dimension": "length",
      "defaultValue": 15,
      "min": 0.01,
      "max": 500,
      "step": 0.5,
      "help": "The total length of the barrier you're building."
    },
    {
      "id": "courses",
      "label": "Number of Courses (Layers)",
      "type": "number",
      "defaultValue": 2,
      "min": 1,
      "max": 6,
      "step": 1,
      "help": "How many bags high the barrier will be stacked."
    }
  ],
  "sources": [
    {
      "label": "A standard filled sandbag covers approximately 1 linear ft of wall per stacked course; total bags = barrier length x number of courses"
    }
  ],
  "testCases": [
    {
      "name": "15m barrier, 2 courses",
      "inputs": {
        "barrierLength": 15,
        "courses": 2
      },
      "expected": 99,
      "toleranceDecimalPlaces": 0,
      "unit": "sandbags",
      "confidence": "medium",
      "steps": [
        {
          "label": "Barrier length",
          "value": 49.212598425196845,
          "unit": "linear ft"
        }
      ],
      "basis": "sole-source",
      "sourceIndex": 0
    },
    {
      "name": "30m barrier, 3 courses",
      "inputs": {
        "barrierLength": 30,
        "courses": 3
      },
      "expected": 296,
      "toleranceDecimalPlaces": 0,
      "unit": "sandbags",
      "confidence": "medium",
      "steps": [
        {
          "label": "Barrier length",
          "value": 98.42519685039369,
          "unit": "linear ft"
        }
      ],
      "basis": "sole-source",
      "sourceIndex": 0
    }
  ]
}
