Your day
Drinks today
Choose a drink to fill its default caffeine amount, or enter the total milligrams from its label. The amount is for the whole drink, not per 100 ml.
Enter valid times, weight and caffeine amounts to see the estimate.
At 23:00 you are 21 mg under the threshold.
The brown line is your caffeine level. The dashed green line is the model threshold. The blue line is bedtime. The small ticks on the bottom axis are the drinks you listed.
See your caffeine curve on your phone
Log a coffee in WaterChamp and it draws the same caffeine curve as this calculator. It shows when you will be under the sleep threshold, and it reminds you before your last chance for coffee.
- Coffee and tea logged by the shot and the cup
- Your sleep-safe time next to your bedtime
- A reminder before your coffee cutoff
Free on iPhone and Android. The forecast part of the chart is in WaterChamp Pro.
How caffeine half-life works
Caffeine clears at a steady percentage rate: each half-life removes half of what is left. For most adults one half-life is about five hours. Try one 95 mg coffee at 15:00 in the calculator above. It peaks near 74 mg at about 16:50, and is still about 53 mg at 20:00, 26 mg at 01:00 and 13 mg at 06:00. What is left at bedtime comes from that tail.
Absorption matters too. The level climbs for the first hour or two after you drink. The calculator models the climb and the fall with the same equation the app uses, so a drink from 40 minutes ago counts for less than the same drink from two hours ago.
How long caffeine lasts
How much of a 95 mg cup of coffee is left after each number of hours, for a fast, a typical and a slow half-life. After 24 hours almost nothing is left in any case.
| Half-life | 1 h | 2 h | 4 h | 6 h | 8 h | 12 h | 24 h |
|---|---|---|---|---|---|---|---|
| 3 hours | 62 mg | 65 mg | 45 mg | 28 mg | 18 mg | 7 mg | 0 mg |
| 5 hours | 66 mg | 73 mg | 60 mg | 46 mg | 35 mg | 20 mg | 4 mg |
| 8 hours | 68 mg | 79 mg | 71 mg | 60 mg | 51 mg | 36 mg | 13 mg |
When to stop drinking coffee before bed
The latest time to start a 95 mg coffee and still be under the model threshold at bedtime. The table is for a 70 kg (154 lb) adult with no other caffeine that day. Each earlier drink moves the time earlier.
| Half-life | Bed at 21:00 | Bed at 22:00 | Bed at 23:00 | Bed at 00:00 |
|---|---|---|---|---|
| 3 hours | 16:30 | 17:30 | 18:30 | 19:30 |
| 5 hours | 14:05 | 15:05 | 16:05 | 17:05 |
| 8 hours | 10:25 | 11:25 | 12:25 | 13:25 |
Caffeine clearance varies by person
Half-life differs from person to person. Clearance depends mostly on the liver enzyme CYP1A2. Measured half-lives in healthy adults span roughly two to ten hours. Smoking makes clearance faster. Oral contraceptives, pregnancy and some medicines make it slower.2 Two people can drink the same flat white at the same hour and have very different amounts left at midnight. If you do not know your half-life, compare the 3, 5 and 8 hour settings.
In a controlled trial, 400 mg of caffeine taken six hours before bed still cut total sleep time by more than an hour.1 The participants did not report the loss themselves. It showed in the sleep recordings.
How the threshold and cutoff are calculated
WaterChamp uses 0.83 µg/mL as a model threshold, converted to milligrams with an assumed distribution volume of 0.7 litres per kilogram. That gives about 35 mg at 60 kg and 52 mg at 90 kg. Reference 3 measured how plasma caffeine relates to deep sleep.3 Staying under the line does not guarantee good sleep.
The next-drink cutoff searches from 04:00 until before bedtime, adding the caffeine amount you entered to your listed drinks. It finds a start time within five minutes of the latest modeled time below the threshold. The default is a 95 mg black coffee. The app reminder uses a 63 mg espresso, so their default cutoff times can differ.
The caffeine values in the drink list are the app’s defaults for one standard serving. A real cup varies with how it is made, so enter the label amount when you have one. A drink taken shortly before bed is still being absorbed and can peak after you fall asleep.
Check the caffeine in your drink
See how much caffeine is in coffee, drink by drink, and how much caffeine is too much in a day. Compare the serving examples for espresso, black coffee, cold brew, decaf coffee, matcha latte and energy drinks. The drink guide lists the app's serving sizes and values together.
To work out your daily drinking target as well, use the water intake calculator.
In the app
The WaterChamp app runs the same curve on your phone from the drinks you log. It warns you before your last chance for coffee passes. It also tracks water, alcohol and calories from 102 pickable drinks. It writes your water intake to Apple Health and Health Connect.
Not medical advice. Half-life varies widely between people and changes with pregnancy, liver conditions, smoking and medicines. Talk to a doctor about caffeine if you are pregnant, take medication or have ongoing trouble sleeping.
1. Drake C, Roehrs T, Shambroom J, Roth T. "Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed." Journal of Clinical Sleep Medicine, 2013;9(11):1195-1200. pubmed.ncbi.nlm.nih.gov/24235903
2. Nehlig A. "Interindividual differences in caffeine metabolism and factors driving caffeine consumption." Pharmacological Reviews, 2018;70(2):384-411. pubmed.ncbi.nlm.nih.gov/29514871
3. Baur DM, Dornbierer DA, Landolt HP. "Concentration-effect relationships of plasma caffeine on EEG delta power and cardiac autonomic activity during human sleep." Journal of Sleep Research, 2024;33:e14140. pubmed.ncbi.nlm.nih.gov/38221756
Hydration figures elsewhere on this site come from the Beverage Hydration Index: Maughan RJ, Watson P, Cordery PA, et al. "A randomized trial to assess the potential of different beverages to affect hydration status." American Journal of Clinical Nutrition, 2016;103(3):717-723. pubmed.ncbi.nlm.nih.gov/26702122
