When should you stop drinking coffee to sleep well tonight? Enter your details and get a science-backed cutoff time with a real-time caffeine decay chart.
Caffeine blocks adenosine receptors in your brain — the molecule that builds up sleep pressure during the day. Even when you feel "fine" after afternoon coffee, measurable caffeine remains in your system and can reduce deep sleep quality by up to 20%.
This calculator uses exponential decay, the standard pharmacokinetic model for caffeine metabolism:
The cutoff time is calculated by working backward from your bedtime to find when caffeine drops below 25 mg — the threshold below which most adults experience negligible sleep disruption.
| Drink | Serving | Caffeine |
|---|---|---|
| Drip coffee | 8 oz | 95 mg |
| Espresso | 1 shot | 63 mg |
| Cold brew | 12 oz | 200 mg |
| Black tea | 8 oz | 47 mg |
| Green tea | 8 oz | 28 mg |
| Coca-Cola | 12 oz | 34 mg |
| Red Bull | 8.4 oz | 80 mg |
| Monster | 16 oz | 160 mg |
Caffeine has a half-life of about 5 hours in most healthy adults, meaning half the caffeine you consume is still circulating 5 hours later. After 10 hours, roughly 25% remains. It typically takes 12–14 hours for caffeine to fully clear your system (below 5 mg).
Individual variation is significant — genetics, medications, and liver function all play a role. Smokers metabolize caffeine roughly twice as fast (half-life ~3 hours), while pregnancy can extend the half-life to 8–12 hours.
Caffeine half-life is the time it takes for your body to eliminate half the caffeine you consumed. The average is 5 hours, but it ranges from 3 to 7 hours depending on your genetics, age, and medications.
This matters for sleep because even small amounts of caffeine (25–50 mg) at bedtime can reduce deep sleep by up to 20% — even if you fall asleep normally. This calculator uses the standard pharmacokinetic decay formula to model exactly how much caffeine remains at your bedtime.
The general rule is to stop caffeine at least 6 hours before bedtime, but this varies based on how much you drink and your personal metabolism. Drake et al. (2013) found that 400 mg of caffeine taken 6 hours before bed still reduced total sleep time by over an hour.
For a single cup of drip coffee (95 mg) with average metabolism, a cutoff of 5–6 hours before bed is usually sufficient. For larger doses like cold brew (200 mg) or multiple cups, you may need 8–10 hours of clearance time. Use the calculator above to get a cutoff time specific to your dose and half-life.
Yes. Research shows caffeine can significantly reduce deep sleep (slow-wave sleep) even when it doesn't affect how quickly you fall asleep. You may feel like you slept fine, but your sleep architecture is disrupted — less time in restorative deep sleep means you wake up less refreshed.
The Drake et al. study found that participants who consumed caffeine 6 hours before bed lost an average of 41 minutes of sleep and reported more restlessness, even though many didn't attribute it to caffeine.
Caffeine content varies widely by preparation method and serving size:
Drip coffee: 95 mg per 8 oz — Espresso: 63 mg per shot — Cold brew: 200 mg per 12 oz — Black tea: 47 mg per 8 oz — Green tea: 28 mg per 8 oz — Coca-Cola: 34 mg per 12 oz — Red Bull: 80 mg per 8.4 oz — Monster: 160 mg per 16 oz.
Note that cold brew and large energy drinks can contain 2–3x the caffeine of a regular coffee, so the cutoff time shifts dramatically. The calculator above adjusts for your specific drink and serving count.
Several factors influence your caffeine half-life:
Genetics: Variants in the CYP1A2 gene make some people "fast metabolizers" (half-life ~3 hrs) and others "slow metabolizers" (half-life ~7 hrs). Smoking: Induces CYP1A2 activity, roughly halving the half-life to ~3 hours. Pregnancy: Half-life extends to 8–12 hours, especially in the third trimester. Oral contraceptives: Can increase half-life to 6–7 hours. Liver conditions: Can significantly slow caffeine clearance.
If you're unsure, start with the default 5-hour half-life and adjust the slider based on how sensitive you feel to afternoon caffeine.