How much caffeine is left at bedtime?
Add your drinks for today. See the caffeine still in your body when you go to bed, and the latest time for one more cup.
Your drinks today
Add each drink and the time you had it.
Metrya draws this curve from the caffeine you log or that apps write to Apple Health, and puts it next to how you slept. Read about caffeine and sleep →
How long caffeine stays in your body
Caffeine is absorbed within about an hour. Then your liver clears it slowly. The half-life is the time it takes to clear half. For most adults it is about 5 hours, but it ranges from about 2 to 10 hours from person to person.
So a 95 mg coffee at 15:00 still leaves around 45 mg at 21:00 and over 30 mg at 23:00. Two or three cups in the afternoon add up.
Why bedtime caffeine matters
Caffeine blocks adenosine, the signal that builds sleep pressure during the day. In a sleep-lab study, 400 mg taken even 6 hours before bed cut total sleep by more than an hour. The European Food Safety Authority says 100 mg close to bedtime can make it harder to fall asleep and shorten sleep in some adults.
This calculator uses 50 mg at bedtime as a sleep-friendly line — the same line the Metrya app uses. It is a guide, not a hard limit. Some people sleep fine above it; others are sensitive well below it.
How much caffeine is in drinks
| Drink | Typical caffeine |
|---|---|
| Brewed coffee, 240 ml (8 oz) | 95 mg |
| Espresso, single shot | 63 mg |
| Cold brew, 355 ml (12 oz) | 155 mg |
| Black tea | 47 mg |
| Green tea | 28 mg |
| Matcha | 70 mg |
| Energy drink, can | 80 mg |
| Cola, 355 ml (12 oz) | 35 mg |
| Pre-workout, scoop | 200 mg |
Real drinks vary a lot. A large coffee-shop coffee can have twice the amount above. Check the label when there is one.
How the curve is worked out
Each drink is absorbed quickly and then cleared at a steady rate (a one-compartment model with first-order absorption). The curves of all your drinks are added up. It is an estimate for an average body, not a blood test.
- EFSA Panel on Dietetic Products, Nutrition and Allergies. Scientific Opinion on the safety of caffeine. EFSA Journal. 2015;13(5):4102.
- Drake C, Roehrs T, Shambroom J, Roth T. Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed. J Clin Sleep Med. 2013;9(11):1195–1200.
- Nehlig A. Interindividual differences in caffeine metabolism and factors driving caffeine consumption. Pharmacol Rev. 2018;70(2):384–411.
Common questions
How long does caffeine stay in your system?
For most adults the half-life is about 5 hours, so half of a coffee is still there 5 hours later and a quarter after 10 hours. It ranges from about 2 to 10 hours between people. Smoking makes it faster; the birth-control pill and pregnancy make it much slower.
When should I stop drinking coffee before bed?
It depends on how much you drink and how fast you clear it. With a typical half-life, one 95 mg coffee is under 50 mg after about 5 hours, but two or three afternoon cups take much longer. Enter your drinks above to see the latest time for one more cup.
How much caffeine is too much?
The European Food Safety Authority says up to 400 mg a day is not a safety concern for healthy adults (not pregnant), and up to 200 mg in one go. For sleep, what you have in the afternoon matters more than the daily total.
Why 50 mg at bedtime?
It is a practical line, not a medical limit. Studies show that 100 mg close to bedtime can affect sleep in some adults, so 50 mg leaves a margin. Metrya uses the same line on its caffeine card.
Does Metrya track caffeine automatically?
Metrya reads caffeine that you or other apps log in Apple Health, or you log a drink in two taps. It draws this curve through the day and shows it next to how you slept that night.
See your caffeine
next to your sleep.
Free on iPhone. Metrya draws your caffeine curve from Apple Health and shows it beside last night's sleep.
Metrya is a wellness app, not a medical device. Your health data stays on your devices.