{
  "schemaVersion": 1,
  "slug": "protein-intake-calculator",
  "category": "health",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "3d52eb9272b122d7ff369f2f27d94f11b589e8d3cca8231cb706098c8ed5a354",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/protein-intake-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": "P = w × r; Pm = P ÷ 3; E = 4P",
    "vars": [
      [
        "w",
        "Body weight"
      ],
      [
        "r",
        "Protein per kg for the goal"
      ],
      [
        "P",
        "Protein per day (g)"
      ],
      [
        "Pm",
        "Per meal (3 meals)"
      ],
      [
        "E",
        "Calories from protein (kcal)"
      ]
    ],
    "note": "Daily protein = body weight in kg × selected g/kg scenario. Per-meal amount divides by three; calories use 4 kcal per gram. The 0.8 g/kg option is the adult RDA reference; higher values are selectable scenarios and not individualized medical advice."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const protein = weight*goal; return { protein, perMeal: protein/3, proteinPerKg: goal, caloriesFromProtein: protein*4 };",
    "inputs": [
      {
        "name": "weight",
        "type": "number",
        "default": 75,
        "min": 20,
        "max": 400,
        "step": 0.5,
        "slider": true
      },
      {
        "name": "goal",
        "type": "select",
        "default": 1.6,
        "options": [
          {
            "value": 0.8
          },
          {
            "value": 1.2
          },
          {
            "value": 1.6
          },
          {
            "value": 2.2
          }
        ]
      }
    ],
    "outputs": [
      {
        "name": "protein",
        "precision": 0,
        "unit": "g"
      },
      {
        "name": "perMeal",
        "precision": 0,
        "unit": "g"
      },
      {
        "name": "proteinPerKg",
        "precision": 2,
        "unit": "g/kg"
      },
      {
        "name": "caloriesFromProtein",
        "precision": 0,
        "unit": "kcal"
      }
    ],
    "interpret": null
  }
}
