{
  "schemaVersion": 1,
  "slug": "running-calories-calculator",
  "category": "health",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "aea3e4ca35574ab61a556c46bcd8dce6d3b4b3e719606d80d7676b000ce7da52",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/running-calories-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": "v = 60D ÷ m; MET = clamp(0.95v + 0.5, 6, 20); K = MET × 3.5 × w × m ÷ 200",
    "vars": [
      [
        "D",
        "Distance (km)"
      ],
      [
        "m",
        "Duration (minutes)"
      ],
      [
        "v",
        "Speed (km/h)"
      ],
      [
        "w",
        "Body weight (kg)"
      ],
      [
        "K",
        "Calories (kcal)"
      ]
    ],
    "note": "Distance is entered in kilometres. Speed = distance ÷ hours; estimated MET = clamp(0.95×speed + 0.5, 6, 20); kcal = MET×3.5×weight(kg)÷200×minutes; kcal/km = kcal÷distance. This simplified estimate does not model individual running economy or terrain."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const speed = minutes>0 ? distance/(minutes/60) : 0; const met = Math.min(Math.max(0.95*speed + 0.5, 6), 20); const cal = met*3.5*weight/200*minutes; return { calories: cal, met, speedKmh: speed, caloriesPerKm: distance>0 ? cal/distance : 0 };",
    "inputs": [
      {
        "name": "weight",
        "type": "number",
        "default": 70,
        "min": 20,
        "max": 400,
        "step": 0.5,
        "slider": true
      },
      {
        "name": "distance",
        "type": "number",
        "default": 5,
        "min": 0.1,
        "max": 500,
        "step": 0.1,
        "slider": true
      },
      {
        "name": "minutes",
        "type": "number",
        "default": 30,
        "min": 1,
        "max": 2000,
        "step": 1,
        "slider": true
      }
    ],
    "outputs": [
      {
        "name": "calories",
        "precision": 0,
        "unit": "kcal"
      },
      {
        "name": "met",
        "precision": 1,
        "unit": ""
      },
      {
        "name": "speedKmh",
        "precision": 2,
        "unit": "km/h"
      },
      {
        "name": "caloriesPerKm",
        "precision": 0,
        "unit": "kcal/km"
      }
    ],
    "interpret": null
  }
}
