Caffeine cutoff calculator
Set your dose, when you drink it, and your bedtime. The calculator uses caffeine’s 5-hour half-life to show how much is in your system when you try to sleep — and how late you can have your last cup. Optionally personalise by age, sex, hormonal status and body weight — clearance varies from about 3 to 10 hours between individuals.
Above the ~50 mg threshold where most sleepers see reduced deep sleep.
Drinking 200 mg later than this leaves enough caffeine in your system at 23:00 to disrupt deep sleep. (10h before bed)
Personalise for your body
Caffeine clearance varies with age, sex, hormonal status, and weight. Leave any field blank to use the 5-hour adult average.
The half-life math
Caffeine clears via first-order elimination — every five hours, roughly half of what’s in your bloodstream is gone. That sounds fast until you do the arithmetic. A 200 mg coffee at 2 PM leaves 100 mg at 7 PM, 50 mg at midnight, and 25 mg at 5 AM. The “I don’t feel it anymore” point is hours before the “it’s gone from my system” point.
Why 50 mg matters
Studies measure sleep disruption against the amount of caffeine still bound to adenosine receptors at bedtime. Below about 50 mg in circulation, most healthy sleepers fall asleep normally and reach normal amounts of slow-wave sleep. Above that, the effect is dose-dependent: 100 mg measurably reduces deep sleep; 400 mg taken even six hours before bed cuts total sleep time by close to an hour in lab settings (Drake et al., 2013, J Clin Sleep Med).
Genetics matter more than most rules of thumb
CYP1A2, the liver enzyme that metabolizes caffeine, comes in fast and slow variants. About 10% of people are fast metabolizers (half-life ~3 hours) and another 10% are slow (half-life closer to 8 hours). The rest are in between. If your friend can have an espresso after dinner and sleep fine while a 3 PM coffee wrecks your night, you’re not imagining it — you’re probably a slow metabolizer.
Use the half-life slider on the calculator to model this. If caffeine seems to affect you longer than average, set it to 7 or 8 hours and see what your "latest safe time" becomes.
Practical rules that actually work
Total daily dose under 400 mg. The FDA threshold above which adverse effects (anxiety, palpitations, GI upset) become more common.
No caffeine after 2 PM if you’re a slow metabolizer or sensitive sleeper. Yes, it feels extreme. Yes, the polysomnography data backs it up.
If you skip caffeine for 2 weeks, tolerance resets. The next cup is stronger than you remember. Your "safe time" calculation should assume a tolerant user — re-test after a break.
Frequently asked questions
How late can I drink coffee before bed?
A common rule is 6 hours before bed, but the right number depends on your dose. A 200 mg coffee at 5 PM leaves about 50 mg in your system at 11 PM — borderline for sensitive sleepers. For consistent sleep, most adults should stop caffeine by 8 hours before bed, or earlier if drinking more than 200 mg.
What’s the half-life of caffeine?
Average ~5 hours in healthy adults, but the range is 3–7 hours. Slow metabolizers (the AA variant of the CYP1A2 gene, roughly 10% of people) can have half-lives near 8 hours. Smoking shortens it; oral contraceptives, pregnancy, and some medications (fluvoxamine, ciprofloxacin) extend it significantly.
Why does caffeine still affect sleep when I don’t feel it?
Subjective wakefulness fades faster than the underlying biochemistry. Caffeine blocks adenosine receptors — you might not feel "wired" 6 hours after a coffee, but enough caffeine is still binding to reduce slow-wave (deep) sleep. Polysomnography studies show 400 mg of caffeine taken even 6 hours before bed cuts total sleep by about an hour.
Does decaf have any caffeine?
Yes — typically 2–15 mg per cup, vs ~95 mg in regular drip coffee. For most people the amount is too small to disrupt sleep, but very sensitive sleepers may want to avoid even decaf in the evening.
What about chocolate or tea before bed?
Dark chocolate has 20–30 mg per 50g — non-trivial close to bedtime. Black tea has about 50 mg per cup, green tea 25–30 mg. The threshold for sleep disruption is around 50 mg in your system at bedtime, so a 6 PM cup of green tea is usually fine; a 9 PM piece of dark chocolate sometimes isn’t.
How does body weight and age affect caffeine tolerance?
Body weight determines the effective dose in mg/kg — 200 mg is a strong 3.3 mg/kg dose for a 60 kg person and a mild 2.2 mg/kg dose for a 90 kg person. Age affects clearance: children and adults over 65 metabolise caffeine more slowly (half-life ~6.5h vs ~5h). Sex plus hormonal status matters more than either alone — women on oral contraceptives have roughly 1.7× the half-life of the baseline adult, and third-trimester pregnancy can push it to 10–15 hours. Enter your details in the Personalise section above for a body-adjusted estimate.
How can I tell if I’m a slow caffeine metabolizer?
Signs: you still feel coffee 8+ hours later; you sleep worse after any afternoon coffee; jitters or anxiety from doses other people tolerate. Genetic tests (23andMe, ancestry tests) can show CYP1A2 status. If you suspect you’re a slow metabolizer, treat your last-cup time as 10–12 hours before bed.