Skip to main content
Tool / Sleep

Caffeine Half-Life Calculator.

Plot your bloodstream caffeine decay curve across the day and find the exact time you need to stop drinking coffee to protect your sleep.

When you plan to fall asleep

Add every drink with its time

mg
mg
Result
Caffeine at bedtime
38mg
Threshold for undisturbed sleep: ≤ 50 mg
05010015020050 mg thresholdBedtime0:004:008:0012:0016:0020:0024:00
Peak
152 mg
at 12:00 PM
Half-Life
5.5 hours
Drops Below 50 mg
8:51 PM
2.1h before bedtime

Medical Disclaimer

This calculator uses population-average pharmacokinetic constants. Individual clearance varies with liver function, medication, pregnancy stage, and oral contraceptive use. For clinical guidance, consult a physician.

How the Math Works

Caffeine clearance follows first-order elimination — the body removes a fixed fraction of whatever is in the bloodstream each unit of time. Half the dose disappears every half-life.

  1. 01Decay constant. k = ln(2) / half-life. For an average metabolizer (t½ = 5.5h), k ≈ 0.126 per hour.
  2. 02Single dose decay. C(t) = D × exp(-k × Δt). A 100 mg dose 11 hours later is 100 × exp(-0.126 × 11) ≈ 25 mg.
  3. 03Superposition. For multiple doses, total caffeine is the sum of each individual decay curve. The calculator adds them at every quarter-hour from 0 to 36 hours.
  4. 04Bedtime threshold. The 50 mg horizontal line marks the published level above which slow-wave sleep is measurably suppressed.
  5. 05Cutoff time. Solving C(t) = 50 backward from bedtime gives the latest time you can have caffeine without exceeding the threshold.

Frequently Asked Questions

What is the half-life of caffeine?+

In healthy adults the average caffeine half-life is about 5–6 hours, but the population range is roughly 1.5 to 9.5 hours. Genetic variation in the CYP1A2 enzyme, smoking, pregnancy, oral contraceptives, and certain medications all shift the value — which is why this calculator lets you pick a metabolizer profile rather than assuming the population average.

How do I calculate caffeine half-life?+

The model: C(t) = D × exp(−k × Δt), where C(t) is bloodstream caffeine at time t, D is the dose, and k = ln(2) ÷ half-life. For multiple doses, you sum each curve (superposition). To find the cutoff for sleep, solve C(t) ≤ 50 mg working back from bedtime — this calculator does that solve for you.

Does pregnancy or smoking change caffeine half-life?+

Yes — both substantially. Pregnancy (especially third trimester) roughly doubles caffeine half-life to ~11 hours because hepatic CYP1A2 activity drops. Smoking does the opposite: it induces CYP1A2 and roughly halves the half-life to ~2.5 hours. Quitting smoking unmasks the slower clearance within a few days, which is why ex-smokers often suddenly find their old afternoon coffee disrupts sleep.

How long does caffeine stay in your body?+

Caffeine has an average half-life of about 5.5 hours in healthy adults, meaning half the dose is cleared every 5.5 hours. A standard 200 mg dose at noon drops to ~100 mg by 5:30 PM, ~50 mg by 11:00 PM, and ~25 mg by 4:30 AM.

Why does the calculator support five metabolizer types?+

The CYP1A2 enzyme drives ~95% of caffeine breakdown, and genetic variants change its activity. Pregnancy roughly doubles the half-life (ACOG guidance), while smoking induces CYP1A2 and shortens the half-life to ~2.5 hours.

What is the 50 mg bedtime threshold based on?+

Sleep research shows that doses as low as 20–50 mg in the bloodstream near bedtime can suppress slow-wave (deep) sleep and increase sleep onset latency. The 50 mg line is a conservative cut-off; sensitive sleepers may need an even lower target.

What math does the calculator use?+

It applies first-order elimination kinetics: C(t) = D × exp(-k × Δt), where k = ln(2) / half-life. Multiple doses are summed via the superposition principle — each dose decays on its own curve, and total bloodstream caffeine is the sum at any given time.

How accurate is the prediction?+

The model is a population-level estimate. Real-world clearance varies with liver function, oral contraceptives, certain medications, and food. Treat the curve as a planning guide, not a precise blood measurement.

How can I avoid caffeine ruining sleep?+

Work backwards from bedtime: if your half-life is 5.5 hours, cutting off at 8–9 hours before bed keeps bedtime levels below 50 mg for most moderate-dose coffee drinkers. The calculator finds your personal cutoff.

Does caffeine half-life change with age?+

In healthy adults, age on its own has only a modest effect — caffeine half-life rises slightly in older adults as liver CYP1A2 activity gradually declines, but it stays within the usual 4–7 hour band for most people. The dramatic differences are at the extremes of life: newborns clear caffeine extremely slowly (half-life can exceed 70–100 hours because CYP1A2 is immature), and clearance reaches adult levels by roughly 6–12 months. The bigger drivers in adults are genetics (CYP1A2 variant), smoking, pregnancy, and oral contraceptives — which is why this tool asks for a metabolizer profile rather than your age.

The Science

How caffeine actually leaves your body.

Caffeine is cleared by first-order elimination kinetics: the amount removed in any given hour is a fixed fraction of what is still circulating. The hepatic enzyme CYP1A2 does the bulk of the work, breaking caffeine down into paraxanthine, theobromine, and theophylline. The half-life — the time for blood caffeine to drop by 50% — averages around 5 hours in healthy adults but ranges from under 3 hours to over 9.

This calculator applies first-order decay and superposition across multiple doses: C(t) = D × exp(−k × Δt) where k = ln(2) / half-life. Stacking doses is additive on the curve, which is why a 200 mg afternoon coffee on top of morning leftovers can land you at bedtime with more circulating caffeine than the afternoon dose alone implies.

Why your half-life is not five hours.

CYP1A2 activity varies ten-fold across the population. The single nucleotide polymorphism rs762551 (CYP1A2 *1F) splits adults into "fast" and "slow" metabolizers — Cornelis et al. (2006) showed that slow metabolizers carry meaningfully higher cardiovascular risk from heavy caffeine intake. Smoking induces CYP1A2 and roughly halves the half-life (to ~2.5h); pregnancy in the third trimester roughly doubles it (to ~11.5h).

Oral contraceptives, certain SSRIs, ciprofloxacin, and grapefruit also inhibit CYP1A2 and extend caffeine half-life by 50–100%. If you take any of these and your sleep is fragmented, your effective caffeine cutoff is much earlier than the population average suggests.

The bedtime threshold that actually matters.

The most direct evidence comes from Drake et al. (2013): 400 mg of caffeine at bedtime, 3 hours before bed, or 6 hours before bed all measurably degraded sleep quality vs placebo — including the 6-hour-before condition. The pragmatic threshold most sleep researchers use is to keep blood caffeine under ~50 mg at bedtime, which corresponds roughly to a 9–10 hour gap between a 200 mg coffee and lights-out for an average metabolizer.

For an 8-hour or earlier cutoff to actually deliver that target, the math has to match your metabolizer type. Slow metabolizers should treat noon as the absolute back-stop. Fast metabolizers can sometimes drink coffee at 5 PM without sleep effects — but ask whether your sleep would be better if you did not.

Go Further
The Cortisol Protocol$19

Caffeine timing is one lever on cortisol. The protocol pairs the cutoff with light, breathwork, and sleep architecture.

Get the guide →

For education, not medical advice. Results are estimates, not a diagnosis — discuss any abnormal value or health concern with a qualified clinician.

Free / PDF Guide

50 High-Protein Snacks. Free.

Drop your email — we'll send the PDF straight to your downloads and add you to the weekly research drop. Unsubscribe anytime.

See what's inside →
← All Tools