Results are estimates for healthy adults unless stated, and are not medical advice. Your doctor or a registered dietitian can give advice for your situation.
Caffeine can keep you awake long after the buzz has worn off. Even if you fall asleep easily, caffeine late in the day can make your sleep lighter and shorter. This calculator works out the latest time you can have coffee, tea or energy drinks based on your bedtime and how much you drink.
How to use the caffeine calculator
- Enter your usual bedtime.
- Pick your drink and how many you have.
- Choose how sensitive you are to caffeine.
How it works: caffeine half-life
Caffeine has an average half-life of about 5 hours in healthy adults, meaning half of it is still in your body 5 hours after you drink it. This varies from about 2 to 10 hours. Smoking speeds it up, while pregnancy, some birth-control pills, liver problems and certain medicines slow it down.
The calculator finds when your caffeine would fall to about 50 mg (roughly half a cup of coffee) by bedtime. It never suggests less than 6 hours, because research has found that caffeine taken 6 hours before bed can still noticeably reduce sleep.
Example
Two cups of brewed coffee contain about 190 mg of caffeine. With an average 5-hour half-life and a 10:30 PM bedtime, the calculator suggests finishing your last cup by about 1 PM. A single cup of green tea (about 28 mg) only needs the 6-hour minimum, so you could have it up to about 4:30 PM.
Caffeine in common drinks
| Drink | Typical caffeine |
|---|---|
| Brewed coffee, 240 ml (8 oz) | about 95 mg |
| Espresso, 1 shot | about 63 mg |
| Black tea, 240 ml | about 47 mg |
| Green tea, 240 ml | about 28 mg |
| Cola, 355 ml can | about 34 mg |
| Energy drink, 250 ml | about 80 mg |
Amounts vary a lot by brand and brewing method. Check the label where you can.
Frequently asked questions
How much caffeine is safe per day?
For most healthy adults, up to about 400 mg a day is considered safe. During pregnancy the usual advice is no more than 200 mg a day.
Does decaf have caffeine?
Yes, a little: usually 2–15 mg per cup. That rarely affects sleep.
Why can I drink coffee at night and still sleep?
Some people clear caffeine quickly. Even so, studies show caffeine can reduce deep sleep without you noticing, so you may wake less refreshed.
Sources
- U.S. Food and Drug Administration (FDA) – caffeine limits for adults
- USDA FoodData Central – caffeine content of drinks
- Drake C. et al., Journal of Clinical Sleep Medicine (2013) – caffeine taken 0, 3 or 6 hours before bed
