{
  "schemaVersion": 1,
  "slug": "candle-making-calculator",
  "category": "diy-craft",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "9adcfd5b364bf8d755e3bfbf026e5b6a5ecb066a497ad4881515496ee2f3397b",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/candle-making-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": "Wax = N·w;  F = Wax·p ÷ 100;  Cost = (Wax ÷ 16)c_w + F·c_f + N(c_k + c_j)",
    "vars": [
      [
        "N",
        "Number of candles"
      ],
      [
        "w",
        "Wax per candle, oz"
      ],
      [
        "p",
        "Fragrance load, %"
      ],
      [
        "F",
        "Fragrance oil, oz"
      ],
      [
        "c_w",
        "Wax price per lb"
      ],
      [
        "c_f",
        "Fragrance price per oz"
      ],
      [
        "Wax",
        "Total wax, oz"
      ],
      [
        "Cost",
        "Total cost"
      ],
      [
        "c_k",
        "Wick cost per candle"
      ],
      [
        "c_j",
        "Jar cost per candle"
      ]
    ],
    "note": "Fragrance percentage is based on wax weight; check supplier limits for the exact products."
  },
  "externalEvidence": {
    "reviewedAt": "2026-10-12",
    "sources": [
      {
        "name": "CandleScience — Wax weight per container and batch quantity",
        "url": "https://support.candlescience.com/en_us/how-much-wax-will-i-need-to-make-my-candles-SyTnU9fAbx"
      }
    ],
    "referenceRole": "input",
    "implementationHash": "9adcfd5b364bf8d755e3bfbf026e5b6a5ecb066a497ad4881515496ee2f3397b",
    "basis": "Wax = N·w;  F = Wax·p ÷ 100;  Cost = (Wax ÷ 16)c_w + F·c_f + N(c_k + c_j)",
    "limitations": "Use the cited guidance and your own measurements, bills or product specifications to choose inputs. Sample defaults are not current local data."
  },
  "contract": {
    "compute": "const wax = candles*waxPerCandle; const frag = wax*fragrancePct/100; const waxCost = wax/16*waxPricePerLb; const fragCost = frag*fragrancePricePerOz; const wickTotal = candles*wickCost; const jarTotal = candles*jarCost; const grand = waxCost + fragCost + wickTotal + jarTotal; return { totalWaxOz: wax, totalWaxLb: wax/16, fragranceOz: frag, waxCost: waxCost, fragranceCost: fragCost, totalCost: grand, costPerCandle: candles > 0 ? grand/candles : 0 };",
    "inputs": [
      {
        "name": "candles",
        "type": "number",
        "default": 6,
        "min": 1,
        "max": 500,
        "step": 1,
        "slider": true
      },
      {
        "name": "waxPerCandle",
        "type": "number",
        "default": 8,
        "min": 1,
        "max": 200,
        "step": 0.5,
        "slider": true
      },
      {
        "name": "fragrancePct",
        "type": "number",
        "default": 6,
        "min": 0,
        "max": 25,
        "step": 0.5,
        "slider": true
      },
      {
        "name": "waxPricePerLb",
        "type": "number",
        "default": 4,
        "min": 0,
        "max": 100,
        "step": 0.01
      },
      {
        "name": "fragrancePricePerOz",
        "type": "number",
        "default": 2,
        "min": 0,
        "max": 100,
        "step": 0.01
      },
      {
        "name": "wickCost",
        "type": "number",
        "default": 0.35,
        "min": 0,
        "max": 50,
        "step": 0.01,
        "slider": true
      },
      {
        "name": "jarCost",
        "type": "number",
        "default": 1.5,
        "min": 0,
        "max": 100,
        "step": 0.01
      }
    ],
    "outputs": [
      {
        "name": "totalWaxOz",
        "precision": 1,
        "unit": "oz"
      },
      {
        "name": "totalWaxLb",
        "precision": 2,
        "unit": "lb"
      },
      {
        "name": "fragranceOz",
        "precision": 2,
        "unit": "oz"
      },
      {
        "name": "waxCost",
        "precision": 2,
        "unit": "$"
      },
      {
        "name": "fragranceCost",
        "precision": 2,
        "unit": "$"
      },
      {
        "name": "totalCost",
        "precision": 2,
        "unit": "$"
      },
      {
        "name": "costPerCandle",
        "precision": 2,
        "unit": "$"
      }
    ],
    "interpret": null
  }
}
