Caffeine Cut-Off Calculator
Pick your drink and bedtime to find the latest you can have caffeine without leaving enough in your system to disrupt sleep — based on its ~5.5-hour half-life.

That's about 5.1 h before your 23:00 bedtime. Have it later and more than ~50 mg is still circulating when you try to sleep.
Educational estimate, not medical advice. Caffeine half-life varies widely between people (≈4 h for smokers, 8–10 h+ in pregnancy or on oral contraceptives). Drink mg values are typical averages — actual content varies by brand, roast and serving size.
See how caffeine timing actually affects your sleep
ONDA Life tracks your overnight sleep and HRV — so you can test your own caffeine cut-off against real recovery data, not just a formula.
Download ONDA Life on the App Store →Caffeine in common drinks
| Drink | Serving | Caffeine |
|---|---|---|
| Espresso (single) | ~30 ml shot | 63 mg |
| Brewed coffee | 240 ml / 8 oz | 95 mg |
| Large coffee | 470 ml / 16 oz | 155 mg |
| Cold brew | 350 ml / 12 oz | 205 mg |
| Energy drink | 250 ml can | 80 mg |
| Pre-workout | typical scoop | 200 mg |
| Matcha | 1 tsp / 2 g | 70 mg |
| Black tea | 240 ml | 47 mg |
| Green tea | 240 ml | 28 mg |
| Cola / soda | 355 ml can | 40 mg |
| Dark chocolate | 40 g bar | 24 mg |
Common questions
When should I stop drinking coffee before bed?
As a rule of thumb, stop caffeine 8–10 hours before bed if you are sleep-sensitive. The exact cutoff depends on the dose: caffeine has a ~5.5-hour half-life, so a 95 mg coffee takes about 5 hours to fall to ~50 mg and roughly 8–9 hours to become negligible. Bigger doses need a longer gap.
How long does caffeine stay in your system?
With a ~5.5-hour half-life, half the dose is gone in ~5.5 h, three-quarters in ~11 h, and it takes roughly 5 half-lives (≈24–30 h) to fully clear. That is why an afternoon coffee can still affect sleep even if you no longer "feel" it.
Why is everyone different with caffeine?
Caffeine is broken down mainly by the liver enzyme CYP1A2. Genetics, smoking (speeds it up, ~4 h half-life), pregnancy and oral contraceptives (slow it down, 8–10 h+), and some medications all shift your half-life. Adjust the slider toward "slow" if caffeine keeps you up.
Does caffeine before bed really hurt sleep if I fall asleep fine?
Often, yes. Controlled studies (e.g. Drake 2013) found caffeine taken even 6 hours before bed reduced total sleep time by about an hour and cut deep sleep — even when people did not report trouble falling asleep. It is the sleep architecture, not just sleep onset, that suffers.
What counts as a safe residual at bedtime?
This tool uses ~50 mg residual as the "unlikely to disrupt most people" line — roughly the caffeine in half a cup of coffee. If you are highly sensitive, aim for near zero; if you are a fast metaboliser, you may tolerate more. Track your own sleep to calibrate.