{
  "schemaVersion": 1,
  "slug": "storage-unit-size-calculator",
  "category": "moving",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "7d43ac69d4c11703517992d5605cf650da8a15f5af267ab8848d5a11f5cc7380",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/storage-unit-size-calculator.json",
    "src/engine.js"
  ],
  "runtimeSource": "/sources/engine.txt",
  "runtimeHash": "5c888d8898afbdee36267bb9977829e1e2ac568f6677c8ee87469c139864645c",
  "scope": "The compute function records implemented equations, constants, lookup tables and custom rules. Inputs record defaults and allowed values; outputs record precision and units. Defaults are examples, not recommendations. General background references are not evidence for this specific algorithm.",
  "publishedFormula": {
    "formula": "V = 250b + 180l + 2.5x + 45g; C = s × 8 × k; u = max(1, ⌈V ÷ C⌉)",
    "vars": [
      [
        "V",
        "Estimated goods volume (cu ft)"
      ],
      [
        "b",
        "Bedrooms"
      ],
      [
        "l",
        "Living rooms"
      ],
      [
        "x",
        "Boxes"
      ],
      [
        "g",
        "Large items"
      ],
      [
        "C",
        "Estimated usable capacity (cu ft)"
      ],
      [
        "s",
        "Unit floor area (sq ft)"
      ],
      [
        "k",
        "Packing factor"
      ],
      [
        "u",
        "Units needed"
      ]
    ],
    "note": "Estimated volume uses fixed item-volume assumptions. Capacity applies an 8-ft height and 50%, 60% or 70% packing allowance based on access frequency; price scales linearly from a 5×10 rate. These are planning assumptions."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const vol=bedrooms*250+livingRooms*180+boxes*2.5+largeItems*45; if(vol===0) return {volumeCuFt:0,recommendedSize:null,unitSqFt:null,capacityCuFt:null,unitsNeeded:0,monthlyCost:0,totalCost:0}; const sizes=[[25,'5 x 5','Closet or small bedroom'],[50,'5 x 10','One bedroom flat'],[75,'5 x 15','Two bedrooms'],[100,'10 x 10','Two to three bedrooms'],[150,'10 x 15','Three to four bedrooms'],[200,'10 x 20','Four to five bedrooms, or a garage'],[300,'10 x 30','Whole house plus garage']]; const packing=access==='yes'?0.5:access==='sometimes'?0.6:0.7; const height=8; const selected=sizes.find(s=>vol<=s[0]*height*packing)||sizes[sizes.length-1]; const capacity=selected[0]*height*packing; const units=Math.ceil(vol/capacity); const monthly=selected[0]/50*monthlyRate*units; return {volumeCuFt:vol,recommendedSize:selected[1]+' ft',unitSqFt:selected[0],capacityCuFt:capacity,unitsNeeded:units,monthlyCost:monthly,totalCost:monthly*months};",
    "inputs": [
      {
        "name": "bedrooms",
        "type": "number",
        "default": 2,
        "min": 0,
        "max": 10,
        "step": 1,
        "slider": true
      },
      {
        "name": "livingRooms",
        "type": "number",
        "default": 1,
        "min": 0,
        "max": 10,
        "step": 1,
        "slider": true
      },
      {
        "name": "boxes",
        "type": "number",
        "default": 60,
        "min": 0,
        "max": 5000,
        "step": 1,
        "slider": true
      },
      {
        "name": "largeItems",
        "type": "number",
        "default": 5,
        "min": 0,
        "max": 100,
        "step": 1,
        "slider": true
      },
      {
        "name": "access",
        "type": "select",
        "default": "no",
        "options": [
          {
            "value": "no"
          },
          {
            "value": "sometimes"
          },
          {
            "value": "yes"
          }
        ]
      },
      {
        "name": "monthlyRate",
        "type": "number",
        "default": 120,
        "min": 0,
        "max": 10000,
        "step": 1
      },
      {
        "name": "months",
        "type": "number",
        "default": 6,
        "min": 1,
        "max": 120,
        "step": 1,
        "slider": true
      }
    ],
    "outputs": [
      {
        "name": "volumeCuFt",
        "precision": 0,
        "unit": "cu ft"
      },
      {
        "name": "recommendedSize",
        "precision": 0,
        "unit": "",
        "type": "text",
        "optional": true
      },
      {
        "name": "unitSqFt",
        "precision": 0,
        "unit": "sq ft",
        "optional": true
      },
      {
        "name": "capacityCuFt",
        "precision": 0,
        "unit": "cu ft",
        "optional": true
      },
      {
        "name": "unitsNeeded",
        "precision": 0,
        "unit": ""
      },
      {
        "name": "monthlyCost",
        "precision": 2,
        "unit": "$"
      },
      {
        "name": "totalCost",
        "precision": 2,
        "unit": "$"
      }
    ],
    "interpret": null
  }
}
