{
  "schemaVersion": 1,
  "slug": "helium-balloons-calculator",
  "category": "party",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "b8b38f4f2d3fe4c9312570ddf3f7525d0e2f037e5c9ed4e16f779501ce46a8aa",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/helium-balloons-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_total = 0.5×(d/11)³×n",
    "vars": [
      [
        "n",
        "Number of balloons"
      ],
      [
        "d",
        "Balloon diameter, in"
      ],
      [
        "V_total",
        "Total helium, ft³"
      ],
      [
        "T_tank",
        "Tank capacity, ft³"
      ]
    ],
    "note": "Approximate round-latex net lift per balloon: 9 in 7 g, 11 in 10 g, 12 in 12 g, 16 in 34 g. Helium volume is estimated from a 0.5 ft³ 11-in baseline and scales with diameter³. Actual supplier/style values vary."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const helium = 0.5*Math.pow(balloonSize/11, 3); const total = helium*balloons; const liftPer = balloonSize >= 16 ? 34 : balloonSize >= 12 ? 12 : balloonSize >= 11 ? 10 : 7; return { heliumPerBalloon: helium, heliumNeeded: total, tanksNeeded: tankSize > 0 ? Math.ceil(total/tankSize) : 0, liftOz: balloons*liftPer/28.3495, liftLb: balloons*liftPer/453.592, liftGrams: liftPer };",
    "inputs": [
      {
        "name": "balloons",
        "type": "number",
        "default": 24,
        "min": 1,
        "max": 10000,
        "step": 1
      },
      {
        "name": "balloonSize",
        "type": "select",
        "default": 11,
        "options": [
          {
            "value": 9
          },
          {
            "value": 11
          },
          {
            "value": 12
          },
          {
            "value": 16
          }
        ]
      },
      {
        "name": "tankSize",
        "type": "select",
        "default": 14.9,
        "options": [
          {
            "value": 8.9
          },
          {
            "value": 14.9
          },
          {
            "value": 55
          }
        ]
      }
    ],
    "outputs": [
      {
        "name": "tanksNeeded",
        "precision": 0,
        "unit": ""
      },
      {
        "name": "heliumPerBalloon",
        "precision": 3,
        "unit": "cu ft"
      },
      {
        "name": "heliumNeeded",
        "precision": 2,
        "unit": "cu ft"
      },
      {
        "name": "liftOz",
        "precision": 1,
        "unit": "oz"
      },
      {
        "name": "liftLb",
        "precision": 2,
        "unit": "lb"
      },
      {
        "name": "liftGrams",
        "precision": 1,
        "unit": "g"
      }
    ],
    "interpret": null
  }
}
