{
  "schemaVersion": 1,
  "slug": "tea-brewing-calculator",
  "category": "cooking",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "b2fadbaf3b42bd21cbccb528d0980e2de7cd78b1cb8ccc94f22473b95d0d8779",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/tea-brewing-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": "g = d × (V ÷ 250) × m",
    "vars": [
      [
        "d",
        "Tea dose per 250 ml (g)"
      ],
      [
        "V",
        "Water volume (ml)"
      ],
      [
        "m",
        "Strength factor: 0.7/1/1.4"
      ],
      [
        "g",
        "Tea leaves needed (g)"
      ]
    ],
    "note": "Starting values by tea type are a lookup table: temperature °C, steep minutes, grams per 250 ml and estimated caffeine mg per 250 ml. Leaf amount and caffeine scale linearly with water volume; strength scales leaf amount and steep time by 0.7/1/1.4. These are planning estimates."
  },
  "externalEvidence": {
    "reviewedAt": "2026-10-12",
    "sources": [
      {
        "name": "Twinings — supplier brewing guidance (not this model’s caffeine table)",
        "url": "https://twinings.co.uk/blogs/news/how-to-make-a-cup-of-tea-perfectly"
      }
    ],
    "basis": "Each tea type selects starting values for temperature, time, grams and estimated caffeine per 250 ml. Leaf quantity and caffeine scale with water volume; light/standard/strong uses a 0.7/1/1.4 multiplier for leaves and time. This illustrative table is not a laboratory caffeine measurement or the supplier’s recipe. Follow the tea supplier’s instructions and adjust for taste.",
    "limitations": "Follow the tea supplier’s instructions and adjust for taste.",
    "implementationHash": "b2fadbaf3b42bd21cbccb528d0980e2de7cd78b1cb8ccc94f22473b95d0d8779",
    "domain": "cooking"
  },
  "contract": {
    "compute": "const T = { black:[95,3,2.5,45], green:[80,2.5,2,28], white:[85,3,2.5,20], oolong:[90,2.5,3,35], 'pu erh':[100,3,4,60], herbal:[100,4,3,0] }; const t = T[teaType] || T.black; const m = strength === 'light' ? 0.7 : strength === 'strong' ? 1.4 : 1; return { teaGrams: t[2]*(waterMl/250)*m, temperatureC: t[0], steepMinutes: t[1]*m, caffeine: t[3]*(waterMl/250) };",
    "inputs": [
      {
        "name": "teaType",
        "type": "select",
        "default": "black",
        "options": [
          {
            "value": "black"
          },
          {
            "value": "green"
          },
          {
            "value": "white"
          },
          {
            "value": "oolong"
          },
          {
            "value": "pu erh"
          },
          {
            "value": "herbal"
          }
        ]
      },
      {
        "name": "waterMl",
        "type": "number",
        "default": 250,
        "min": 1,
        "max": 5000,
        "step": 10,
        "slider": true
      },
      {
        "name": "strength",
        "type": "select",
        "default": "standard",
        "options": [
          {
            "value": "light"
          },
          {
            "value": "standard"
          },
          {
            "value": "strong"
          }
        ]
      }
    ],
    "outputs": [
      {
        "name": "teaGrams",
        "precision": 2,
        "unit": "g"
      },
      {
        "name": "temperatureC",
        "precision": 0,
        "unit": "°C"
      },
      {
        "name": "steepMinutes",
        "precision": 1,
        "unit": "min"
      },
      {
        "name": "caffeine",
        "precision": 0,
        "unit": "mg"
      }
    ],
    "interpret": null
  }
}
