{
  "schemaVersion": 1,
  "slug": "deep-fryer-oil-calculator",
  "category": "cooking",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "4460ebbe2cdc974f6f23257464b07cfdbb875d412757a4a458ebd4ca5d2e7763",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/deep-fryer-oil-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": "O = W L d × 16.387 ÷ 1000; C_u = O p ÷ n",
    "vars": [
      [
        "W",
        "Fryer width (in)"
      ],
      [
        "L",
        "Fryer length (in)"
      ],
      [
        "d",
        "Oil depth (in)"
      ],
      [
        "O",
        "Oil volume (L)"
      ],
      [
        "p",
        "Price per litre"
      ],
      [
        "n",
        "Reuses (count)"
      ],
      [
        "C_u",
        "Cost per use"
      ]
    ],
    "note": "n is a user-selected or food-type planning count for costing only, not a safe-reuse recommendation. The tool does not assess oil condition, displacement or safe fill level."
  },
  "externalEvidence": {
    "reviewedAt": "2026-10-12",
    "sources": [
      {
        "name": "USDA FSIS — deep-fat frying and food safety",
        "url": "https://www.fsis.usda.gov/food-safety/safe-food-handling-and-preparation/food-safety-basics/deep-fat-frying"
      }
    ],
    "basis": "Volume is the rectangular footprint multiplied by oil depth, converted from cubic inches to litres. Cost per use divides fill cost by an assumed number of uses, either your override or a food-type preset. These presets are bookkeeping assumptions, not validated safe reuse counts. Food displacement, fill marks and oil condition are not modeled; use the appliance instructions and food-safety guidance.",
    "limitations": "Food displacement, fill marks and oil condition are not modeled; use the appliance instructions and food-safety guidance.",
    "implementationHash": "4460ebbe2cdc974f6f23257464b07cfdbb875d412757a4a458ebd4ca5d2e7763",
    "domain": "cooking"
  },
  "contract": {
    "compute": "const vals=[fryerWidth,fryerLength,oilDepth,oilPricePerLitre,reuseOverride,sessionsPerMonth];if(vals.some(v=>!Number.isFinite(v))||fryerWidth<=0||fryerLength<=0||oilDepth<=0||oilPricePerLitre<0||reuseOverride<0||reuseOverride>50||sessionsPerMonth<1||sessionsPerMonth>100)return {oilLitres:null,oilCost:null,reuses:null,costPerUse:null,monthlyCost:null,__error:'inputError'};const litres=fryerWidth*fryerLength*oilDepth*16.387/1000;const auto={chips:8,battered:4,chicken:5,fish:3,pastry:6}[foodType]||6;const reuses=reuseOverride>0?reuseOverride:auto;const perUse=litres*oilPricePerLitre/reuses;return {oilLitres:litres,oilCost:litres*oilPricePerLitre,reuses,costPerUse:perUse,monthlyCost:perUse*sessionsPerMonth};",
    "inputs": [
      {
        "name": "fryerWidth",
        "type": "number",
        "default": 10,
        "min": 2,
        "max": 36,
        "step": 0.5,
        "slider": true
      },
      {
        "name": "fryerLength",
        "type": "number",
        "default": 12,
        "min": 2,
        "max": 36,
        "step": 0.5,
        "slider": true
      },
      {
        "name": "oilDepth",
        "type": "number",
        "default": 3,
        "min": 1,
        "max": 12,
        "step": 0.5,
        "slider": true
      },
      {
        "name": "foodType",
        "type": "select",
        "default": "chips",
        "options": [
          {
            "value": "chips"
          },
          {
            "value": "battered"
          },
          {
            "value": "chicken"
          },
          {
            "value": "fish"
          },
          {
            "value": "pastry"
          }
        ]
      },
      {
        "name": "oilPricePerLitre",
        "type": "number",
        "default": 3,
        "min": 0,
        "max": 100,
        "step": 0.01
      },
      {
        "name": "reuseOverride",
        "type": "number",
        "default": 0,
        "min": 0,
        "max": 50,
        "step": 1,
        "slider": true
      },
      {
        "name": "sessionsPerMonth",
        "type": "number",
        "default": 4,
        "min": 1,
        "max": 100,
        "step": 1,
        "slider": true
      }
    ],
    "outputs": [
      {
        "name": "oilLitres",
        "precision": 2,
        "unit": "l"
      },
      {
        "name": "oilCost",
        "precision": 2,
        "unit": "$"
      },
      {
        "name": "reuses",
        "precision": 0,
        "unit": ""
      },
      {
        "name": "costPerUse",
        "precision": 3,
        "unit": "$"
      },
      {
        "name": "monthlyCost",
        "precision": 2,
        "unit": "$"
      }
    ],
    "interpret": null
  }
}
