Caffeine cutoff calculator
When should you have your last coffee? Log what you drink, set your bedtime, and watch the caffeine in your body decay by its half-life to see how much will still be circulating when you try to sleep.
Today's caffeine
The half-life of caffeine in healthy adults averages around 5 hours but ranges from about 2 to 10. It's longer in pregnancy and with some oral contraceptives, and shorter in smokers.
When to stop drinking coffee before bed
The most-cited study here is Drake and colleagues (2013, Journal of Clinical Sleep Medicine): 400 mg of caffeine taken 0, 3 or even 6 hours before bed measurably reduced total sleep, and people often didn't notice. That's why many sleep researchers suggest a cutoff of 8 hours or more before bed for a large dose.
This calculator uses simple half-life decay: every half-life, the caffeine left in your blood halves. A 200 mg cold brew at 2 pm with a 5-hour half-life leaves about 100 mg at 7 pm and 50 mg at midnight.
The "safe" level at bedtime isn't a medical threshold — it's a personal target. Around 50 mg (half an espresso) is a sensible starting point; if you still sleep lightly, lower it.
Caffeine in common drinks
| Drink | Typical caffeine |
|---|---|
| Brewed coffee, 8 oz | 95 mg |
| Espresso, single shot | 63 mg |
| Cold brew, 16 oz | 200 mg |
| Black tea, 8 oz | 47 mg |
| Green tea, 8 oz | 28 mg |
| Cola, 12 oz can | 34 mg |
| Energy drink, 8.4 oz | 80 mg |
| Pre-workout scoop | 200 mg |
Approximate values from the USDA FoodData Central and FDA consumer guidance. Actual content varies widely by brand, bean and brew.
Questions people ask
How long before bed should I stop drinking coffee?
For a typical 95 mg cup and a 5-hour half-life, about 6 hours if you want less than 50 mg left at bedtime. Research by Drake et al. (2013) found a large 400 mg dose disrupted sleep even when taken 6 hours before bed, so bigger doses need an earlier cutoff.
What is the half-life of caffeine?
Roughly 5 hours on average in healthy adults, with a wide range of about 2 to 10 hours depending on genetics, liver function, pregnancy, some medications and smoking.
How much caffeine is too much?
The US FDA cites 400 mg a day as an amount not generally associated with negative effects in healthy adults. People who are pregnant, have heart conditions or take certain medications should ask a clinician.
Is decaf caffeine-free?
No. Decaf coffee usually contains around 2–15 mg per cup. That rarely matters for sleep but adds up across several cups.
Does this account for absorption?
It uses simple exponential decay from the moment you drink. In reality caffeine peaks in the blood about 30–60 minutes after drinking, so the early part of the curve is slightly simplified; the bedtime estimate is not affected much.