Your intake

mg
Brewed coffee ≈ 95 mg/cup · espresso ≈ 63 mg/shot · energy drink ≈ 80–150 mg.
Average adult ≈ 5 h. Higher = more sensitive.

Caffeine remaining at bedtime

mg

Latest cutoff for < 50 mg by bedtime
Time to clear to 25 mg

Decay from now to bedtime

How this works

Methodology reviewed July 2026

Caffeine clears from the body by first-order decay — a roughly fixed fraction leaves every few hours. The tool models how much of each dose is still circulating at bedtime using an exponential half-life curve, then works backward to the latest your last cup should be to keep bedtime caffeine below a sleep-friendly threshold.

Formularemaining (mg) = dose × 0.5 ^ (hours elapsed / half-life) default half-life ≈ 5 hours (individual range ~3–7 h)
Inputs

Caffeine doses and times · Bedtime · Optional half-life

Outputs

Caffeine still circulating at bedtime · Recommended last-cup time

Assumptions
  • A ~5-hour half-life; yours shifts with genetics, pregnancy, smoking, and some medications.
  • All caffeine is absorbed and decays from its intake time.
Limitations
  • Individual clearance varies two-fold or more, so treat the cutoff as a guide, not a guarantee.
  • Sensitivity to a given circulating amount also varies between people.
Safety
  • This estimates caffeine levels for sleep planning; it is not medical advice about caffeine intake.

This calculator is for educational purposes only and is not medical advice, diagnosis, or treatment. Results are estimates based on published formulas and population averages — your individual values may differ. Nothing here is calculated on a server: everything runs in your browser and no data is stored or sent anywhere. Always consult a qualified clinician before making health, medication, or training decisions.