HealthCalculatorLifestyleEducation

Caffeine Half-Life Calculator

Plot how much caffeine is still in your system hour by hour. Log your coffees, teas and energy drinks, set your half-life, and see how much is left at bedtime.

010020050 mg sleep thresholdbedtime00:0003:0006:0009:0012:0015:0018:0021:0000:0003:0006:00

Total intake

223 mg

56% of 400 mg

Peak level

172 mg

at 13:30

At bedtime

46 mg

Minor effect likely

Drops below 50 mg

22:30

same day

Last call

To be under 50 mg at bedtime, that 128 mg drink needs to happen by 14:15 — about 8.7 hours before bed.

Today's caffeine

mg
mg
5 h
50 mg

Around 50 mg — half a coffee — is the level at which sleep studies start to show measurable disruption.

Half-life, and why the afternoon coffee matters

Caffeine leaves the body by first-order kinetics: a fixed fraction disappears per unit of time, not a fixed amount. The half-life is how long it takes to clear half of what is there, and for a healthy adult it averages about five hours, with a normal range of roughly four to six.

That produces the exponential decay drawn above. A 95 mg coffee at 3 pm is down to 48 mg by 8 pm, 24 mg by 1 am, and 12 mg by 6 am. The tail is long — after five half-lives, about 3% is still circulating, which is why "it wore off hours ago" and "it is out of my system" are different claims.

Absorption is much faster than clearance. Caffeine reaches peak blood concentration 30–60 minutes after drinking, and about 99% of it is absorbed. The model here treats each drink as arriving instantly, which overstates the first half hour slightly and matches reality closely after that.

Your half-life is not five hours

FactorEffect on half-lifeWhy
Smoking≈ 3 hoursPolycyclic aromatic hydrocarbons induce CYP1A2, roughly doubling clearance.
Oral contraceptives7–10 hoursOestrogen inhibits CYP1A2 — the same coffee lasts about twice as long.
Pregnancy, 3rd trimesterup to 15 hoursHepatic metabolism slows dramatically; the usual advice is under 200 mg a day.
CYP1A2 genotype2–8 hoursThe single biggest source of variation. "Fast" and "slow" metaboliser variants are both common.
Liver diseaseup to 96 hoursCaffeine is almost entirely cleared by the liver; cirrhosis can stretch it to days.
Some antibiotics (ciprofloxacin)+50–100%Direct CYP1A2 inhibition — a documented drug interaction, not folklore.

Tolerance changes how caffeine feels but not how fast it clears. A daily drinker metabolises it at the same rate as anyone else with their genotype — the receptors have adapted, the liver has not.

What caffeine does to sleep

Caffeine works by blocking adenosine receptors. Adenosine builds up through the day and is the chemical basis of sleep pressure — the tired feeling that accumulates the longer you are awake. Caffeine does not remove it; it hides it. When the caffeine clears, the accumulated adenosine is still there, which is the afternoon crash.

The best-known controlled study on timing gave participants 400 mg at 0, 3, and 6 hours before bed. Even the six-hours-before dose cut total sleep time by more than an hour — and participants did not notice. Subjective sleep quality ratings were unchanged while the objective measurements were clearly worse.

Deep slow-wave sleep takes the largest hit, which is the stage most associated with physical recovery and memory consolidation. That is why the threshold in this calculator defaults to 50 mg rather than zero: the goal is getting the residual level low enough not to suppress deep sleep, not achieving a perfectly clean system.

A practical cut-off

For a five-hour half-life and a 23:00 bedtime, a 95 mg coffee needs to happen by about 18:30 to be under 50 mg at bedtime. A 200 mg pre-workout scoop needs to be five hours earlier than that. Push the half-life to nine hours and both move into the morning.

How much is in what

Espresso

64 mg

1 shot, 30 ml

Brewed coffee

95 mg

240 ml

Cold brew

155 mg

350 ml

Black tea

47 mg

240 ml

Green tea

28 mg

240 ml

Energy drink

80 mg

250 ml

Cola

34 mg

355 ml

Dark chocolate

40 mg

50 g

These are averages, and the spread is wide. Independent testing of the same drink from the same chain has found two-to-threefold differences between visits, driven by bean variety, grind, water temperature, and brew time. A "large coffee" can plausibly be anywhere from 150 to 400 mg.

Dose guidelines

  • 400 mg/day — the level the EFSA and FDA both consider safe for healthy non-pregnant adults, roughly four brewed coffees.
  • 200 mg per single dose — the EFSA's ceiling for one sitting, and the recommended daily maximum during pregnancy.
  • 3 mg per kg body weight — the sports-science dose for performance, taken about 60 minutes before effort. More is not better; side effects scale faster than benefit.
  • Adolescents: ~100 mg/day — the commonly cited limit, and a reason energy drinks are age-restricted in several countries.
  • Withdrawal is real. Headache, fatigue, and irritability peak 24–48 hours after stopping and fade within a week. Tapering by about 25% every few days avoids most of it.

This calculator is an educational model of first-order elimination, not medical advice. It ignores individual absorption differences, food effects, and drug interactions. If caffeine is affecting your sleep or heart rhythm, that is a conversation for a doctor rather than a chart.