{
  "schemaVersion": 1,
  "slug": "wheel-offset-calculator",
  "category": "automotive",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "7a63aa03ab2b1a0523c99e0a868e066af2f233f4d553296d5e03c5ad6144dfad",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/wheel-offset-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": "b = w ÷ 2 × 25.4 + o; Δin = b₂ − b; Δout = (w₂ − w) × 25.4 − Δin",
    "vars": [
      [
        "w",
        "Current rim width (in)"
      ],
      [
        "o",
        "Current offset (mm)"
      ],
      [
        "w₂",
        "New rim width (in)"
      ],
      [
        "b",
        "Backspacing (mm)"
      ],
      [
        "Δ_in",
        "Inner clearance change (mm)"
      ],
      [
        "Δ_out",
        "Outer poke change (mm)"
      ]
    ],
    "note": "Width is nominal rim width in inches; offset is in mm. Backspacing output is inches: width ÷ 2 + offset ÷ 25.4. Inner position change = new backspacing − current (mm); outer position change = width increase in mm − inner change. Theoretical geometry only; verify actual fitment."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const backspacing = width/2*25.4+offset; const newBackspacing = newWidth/2*25.4+newOffset; const innerChange = newBackspacing-backspacing; const outerChange = (newWidth-width)*25.4-innerChange; return { backspacing: backspacing/25.4, newBackspacing: newBackspacing/25.4, innerClearance: innerChange, outerPoke: outerChange };",
    "inputs": [
      {
        "name": "width",
        "type": "number",
        "default": 8,
        "min": 4,
        "max": 16,
        "step": 0.5,
        "slider": true
      },
      {
        "name": "offset",
        "type": "number",
        "default": 35,
        "min": -80,
        "max": 120,
        "step": 1,
        "slider": true
      },
      {
        "name": "newWidth",
        "type": "number",
        "default": 9,
        "min": 4,
        "max": 16,
        "step": 0.5,
        "slider": true
      },
      {
        "name": "newOffset",
        "type": "number",
        "default": 35,
        "min": -80,
        "max": 120,
        "step": 1,
        "slider": true
      }
    ],
    "outputs": [
      {
        "name": "backspacing",
        "precision": 2,
        "unit": "in"
      },
      {
        "name": "newBackspacing",
        "precision": 2,
        "unit": "in"
      },
      {
        "name": "innerClearance",
        "precision": 1,
        "unit": "mm"
      },
      {
        "name": "outerPoke",
        "precision": 1,
        "unit": "mm"
      }
    ],
    "interpret": null
  }
}
