{
  "schemaVersion": 1,
  "slug": "calorie-calculator",
  "category": "health",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "66a8225f09c6d321c5f9e1b490c3d491d52a34b545c718a44e77bf134d517bf7",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/calorie-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": "RMR = 10w + 6.25h − 5a + s;  TDEE = RMR × k",
    "vars": [
      [
        "w",
        "Weight, kg"
      ],
      [
        "h",
        "Height, cm"
      ],
      [
        "a",
        "Age, years"
      ],
      [
        "s",
        "Sex constant: +5 male, −161 female"
      ],
      [
        "k",
        "Activity factor 1.2–1.9"
      ],
      [
        "RMR",
        "Estimated resting metabolic rate"
      ],
      [
        "TDEE",
        "Total daily energy expenditure"
      ]
    ],
    "note": "Mifflin–St Jeor estimates resting metabolic rate for adults in the study population aged 19–78 in the original study; activity multipliers and ±550 kcal/day are rough scenarios, not individualized advice."
  },
  "externalEvidence": {
    "reviewedAt": "2026-10-04",
    "sources": [
      {
        "name": "Mifflin et al. (1990) — Resting energy expenditure",
        "url": "https://pubmed.ncbi.nlm.nih.gov/2305711/"
      }
    ],
    "basis": "The resting-energy component uses the rounded Mifflin–St Jeor equation; the activity option multiplies that estimate.",
    "limitations": "The cited study supports resting energy, not the activity multipliers or the fixed ±550 kcal scenarios. Those are planning assumptions, not prescribed weight-change targets.",
    "implementationHash": "66a8225f09c6d321c5f9e1b490c3d491d52a34b545c718a44e77bf134d517bf7",
    "domain": "health"
  },
  "contract": {
    "compute": "const bmr = 10*weight + 6.25*height - 5*age + (sex === 'female' ? -161 : 5); const cal = bmr*activity; return { bmr, calories: cal, loseWeight: cal-550, gainWeight: cal+550 };",
    "inputs": [
      {
        "name": "sex",
        "type": "select",
        "default": "male",
        "options": [
          {
            "value": "male"
          },
          {
            "value": "female"
          }
        ]
      },
      {
        "name": "age",
        "type": "number",
        "default": 30,
        "min": 19,
        "max": 100,
        "step": 1,
        "slider": true
      },
      {
        "name": "height",
        "type": "number",
        "default": 178,
        "min": 100,
        "max": 250,
        "step": 0.5,
        "slider": true
      },
      {
        "name": "weight",
        "type": "number",
        "default": 80,
        "min": 20,
        "max": 400,
        "step": 0.5,
        "slider": true
      },
      {
        "name": "activity",
        "type": "select",
        "default": 1.55,
        "options": [
          {
            "value": 1.2
          },
          {
            "value": 1.375
          },
          {
            "value": 1.55
          },
          {
            "value": 1.725
          },
          {
            "value": 1.9
          }
        ]
      }
    ],
    "outputs": [
      {
        "name": "calories",
        "precision": 0,
        "unit": "kcal/day"
      },
      {
        "name": "bmr",
        "precision": 0,
        "unit": "kcal/day"
      },
      {
        "name": "loseWeight",
        "precision": 0,
        "unit": "kcal/day"
      },
      {
        "name": "gainWeight",
        "precision": 0,
        "unit": "kcal/day"
      }
    ],
    "interpret": null
  }
}
