{
  "schemaVersion": 1,
  "slug": "break-even-calculator",
  "category": "finance",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "4cf1e7e266e6f1752a7ffc15a978d21df0258f3507a9f78b350d10227d4cecdb",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/break-even-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": "Q = ceil(F/(P − V)); R = Q·P",
    "vars": [
      [
        "F",
        "Fixed costs"
      ],
      [
        "P",
        "Unit selling price"
      ],
      [
        "V",
        "Variable cost per unit"
      ],
      [
        "Q",
        "Break-even units"
      ],
      [
        "R",
        "Revenue at break-even"
      ]
    ],
    "note": "Break-even requires P − V > 0. Whole units are rounded up so revenue covers fixed costs; when contribution is zero or negative, no finite break-even quantity exists."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const cm = price - variableCost; if (cm <= 0) return { units: null, revenue: null, margin: cm }; const units = Math.ceil(fixedCosts/cm); return { units, revenue: units*price, margin: cm };",
    "inputs": [
      {
        "name": "fixedCosts",
        "type": "number",
        "default": 10000,
        "min": 0,
        "max": 100000000,
        "step": 500
      },
      {
        "name": "price",
        "type": "number",
        "default": 25,
        "min": 0,
        "max": 100000,
        "step": 0.5
      },
      {
        "name": "variableCost",
        "type": "number",
        "default": 10,
        "min": 0,
        "max": 100000,
        "step": 0.5
      }
    ],
    "outputs": [
      {
        "name": "units",
        "precision": 0,
        "unit": "",
        "optional": true
      },
      {
        "name": "revenue",
        "precision": 2,
        "unit": "$",
        "optional": true
      },
      {
        "name": "margin",
        "precision": 2,
        "unit": "$"
      }
    ],
    "interpret": null
  }
}
