{
  "schemaVersion": 1,
  "slug": "cake-pan-converter",
  "category": "cooking",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "9d0a1f2763f9eb1a6b9b7681c395058c3037b3229dab85d4452047c788ba815b",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/cake-pan-converter.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": "f = V₂ ÷ V₁;  V₂ = (1 − s)·π(d ÷ 2)²·h + s·d²·h,  s ∈ {0,1}",
    "vars": [
      [
        "f",
        "Recipe scale factor"
      ],
      [
        "V₁",
        "Original pan volume"
      ],
      [
        "V₂",
        "New pan volume"
      ],
      [
        "d",
        "Diameter (round) or side (square)"
      ],
      [
        "h",
        "Pan depth"
      ],
      [
        "s",
        "Pan shape: 0 round, 1 square"
      ]
    ],
    "note": "Multiply ingredient quantities by f; assumes equal relative fill depth (volumes in in³)."
  },
  "externalEvidence": {
    "reviewedAt": "2026-10-12",
    "sources": [
      {
        "name": "King Arthur Baking — Recipe and pan-size conversions",
        "url": "https://www.kingarthurbaking.com/blog/2019/04/23/the-essential-alternative-baking-pan-sizes"
      }
    ],
    "referenceRole": "context",
    "implementationHash": "9d0a1f2763f9eb1a6b9b7681c395058c3037b3229dab85d4452047c788ba815b",
    "basis": "f = V₂ ÷ V₁;  V₂ = (1 − s)·π(d ÷ 2)²·h + s·d²·h,  s ∈ {0,1}",
    "limitations": "The references provide context and limitations. They do not validate this page’s illustrative multipliers, lookup values or predictions."
  },
  "contract": {
    "compute": "const vol = (w,d)=> (shape === 'round' ? Math.PI*Math.pow(w/2,2)*d : w*w*d); const v1 = vol(originalDiameter, originalDepth), v2 = vol(newDiameter, newDepth); const f = v1>0 ? v2/v1 : 1; return { scaleFactor: f, originalVolume: v1, newVolume: v2, newBatchPercent: f*100 };",
    "inputs": [
      {
        "name": "shape",
        "type": "select",
        "default": "round",
        "options": [
          {
            "value": "round"
          },
          {
            "value": "square"
          }
        ]
      },
      {
        "name": "originalDiameter",
        "type": "number",
        "default": 8,
        "min": 1,
        "max": 30,
        "step": 0.5,
        "slider": true
      },
      {
        "name": "originalDepth",
        "type": "number",
        "default": 2,
        "min": 0.5,
        "max": 6,
        "step": 0.5,
        "slider": true
      },
      {
        "name": "newDiameter",
        "type": "number",
        "default": 9,
        "min": 1,
        "max": 30,
        "step": 0.5,
        "slider": true
      },
      {
        "name": "newDepth",
        "type": "number",
        "default": 2,
        "min": 0.5,
        "max": 6,
        "step": 0.5,
        "slider": true
      }
    ],
    "outputs": [
      {
        "name": "scaleFactor",
        "precision": 3,
        "unit": "x"
      },
      {
        "name": "originalVolume",
        "precision": 1,
        "unit": "in³"
      },
      {
        "name": "newVolume",
        "precision": 1,
        "unit": "in³"
      },
      {
        "name": "newBatchPercent",
        "precision": 1,
        "unit": "%"
      }
    ],
    "interpret": null
  }
}
