Free calculator · 2026
Caffeine cutoff calculator
A 95 mg cup of brewed coffee, on the 5-hour average half-life, needs to be about 7.8 hours before bed to leave 32 mg. For an 11 pm bedtime that is 3:09 pm. Log what you already had, pick the next drink, and the calculator names the last call.
When should you stop caffeine tonight?
Runs in your browser. What you type is not sent to us or stored, and there is no sign-up. A share link carries your numbers in the link itself.
How long does caffeine last?
Caffeine fades by half every few hours. That time is the half-life. The Institute of Medicine puts the average at about 5 hours in healthy adults, and the range between people at about 1.5 to 9.5 hours. Oral contraceptives can roughly double it.
Caffeine left after t hours = dose × 0.5(t / half-life). This model does not add an absorption delay. The whole serving is treated as present at the time you log.
Here is a 95 mg brewed coffee on the 5-hour average.
| Hours after a brewed coffee | Caffeine left |
|---|---|
| 0 | 95 mg |
| 5 | 48 mg |
| 10 | 24 mg |
| 15 | 12 mg |
Gardiner et al. 2023 pooled 24 studies. Caffeine cut total sleep time by 45 minutes and sleep efficiency by 7%. Time to fall asleep rose 9 minutes. Time awake after falling asleep rose 12 minutes.
When should you stop caffeine before bed?
Gardiner 2023 says a 107 mg coffee should be at least 8.8 hours before bed, and a 217.5 mg pre-workout at least 13.2 hours, to avoid losing total sleep time. On the 5-hour average half-life, those leftover amounts are about 32 mg and 35 mg. We calculated those leftovers. The calculator uses 32 mg, the coffee figure, for every drink. It is an average, not personal advice.
Drake 2013 gave 400 mg at bedtime, 3 hours before, or 6 hours before. Even the 6-hour dose cut measured sleep by more than an hour. The authors support avoiding substantial caffeine for a minimum of 6 hours before bedtime.
Times below are for an 11:00 PM bedtime and 32 mg left at bed. Faster, average, and slower are 3, 5, and 8 hour half-lives. Drinks at or under 32 mg are fine up to bedtime on this model.
| Drink | Faster (3 h) | Average (5 h) | Slower (8 h) |
|---|---|---|---|
| Brewed coffee (95 mg) | 4.7 h · 6:17 PM | 7.8 h · 3:09 PM | 12.6 h · 10:26 AM |
| Espresso (64 mg) | 3 h · 8:00 PM | 5 h · 6:00 PM | 8 h · 3:00 PM |
| Black tea (47 mg) | 1.7 h · 9:20 PM | 2.8 h · 8:14 PM | 4.4 h · 6:34 PM |
| Green tea (28 mg) | Fine up to bedtime | Fine up to bedtime | Fine up to bedtime |
| Cola (33 mg) | 0.1 h · 10:52 PM | 0.2 h · 10:47 PM | 0.4 h · 10:39 PM |
| Energy drink (75 mg) | 3.7 h · 7:19 PM | 6.1 h · 4:51 PM | 9.8 h · 1:10 PM |
| Dark chocolate, 70–85% cacao (23 mg) | Fine up to bedtime | Fine up to bedtime | Fine up to bedtime |
| Milk chocolate (9 mg) | Fine up to bedtime | Fine up to bedtime | Fine up to bedtime |
| Pre-workout, one standard serve (217.5 mg) | 8.3 h · 2:42 PM | 13.8 h · 9:11 AM | 22.1 h · 12:53 AM |
How much caffeine is in coffee, tea, and chocolate?
Values are USDA FoodData Central, caffeine per 100 g scaled to the serving, read December 1, 2026. Pre-workout is the 217.5 mg standard serve in Gardiner 2023. Decaf is left out. Brands vary. Read the can.
| Drink | Serving | Caffeine | Source |
|---|---|---|---|
| Brewed coffee | 8 fl oz cup | 95 mg | USDA FDC 171890 |
| Espresso | 1 fl oz shot | 64 mg | USDA FDC 171891 |
| Black tea | 8 fl oz cup | 47 mg | USDA FDC 173227 |
| Green tea | 8 fl oz cup | 28 mg | USDA FDC 171917 |
| Cola | 12 fl oz can | 33 mg | USDA FDC 174852 |
| Energy drink | 8.4 fl oz can | 75 mg | USDA FDC 173210 |
| Dark chocolate, 70–85% cacao | 1 oz | 23 mg | USDA FDC 170273 |
| Milk chocolate | 1.55 oz bar | 9 mg | USDA FDC 167587 |
| Pre-workout, one standard serve | — | 217.5 mg | Gardiner 2023 |
The FDA cites 400 mg a day as an amount not generally linked to negative effects for most adults. People vary widely in sensitivity and in how fast they clear caffeine. That daily line is not a sleep line. A single coffee too close to bed can cost sleep at well under 400 mg.
Why is your own cutoff different?
A calculator like this has to pick one half-life and one bedtime leftover for everyone. The Institute of Medicine range is about 1.5 to 9.5 hours between people, so the last call on this page can miss yours by hours.
NutriCam on iPhone lets you log the coffee, the tea, even the chocolate, by photo or by saying what you had. It counts the caffeine down by half-life. With Apple Health sleep connected, it shows the most caffeine you can have at bedtime for good sleep, how much each 10 mg of caffeine changes your sleep quality, and your best caffeine cutoff time, from your own nights. It does not diagnose sleep disorders.
More on the job: the best caffeine tracker app for sleep, and does caffeine affect your sleep even if you fall asleep fine.
FAQ
How long does caffeine stay in your system?
The average half-life in healthy adults is about 5 hours, so half of a 2 pm coffee is still there at 7 pm and a quarter at midnight. The range between people is about 1.5 to 9.5 hours, and oral contraceptives can roughly double it.
What time should I stop drinking coffee?
Gardiner 2023 says a 107 mg coffee should be at least 8.8 hours before bed to avoid losing total sleep time. For an 11 pm bedtime that is about 2:12 pm. This calculator uses a 95 mg USDA cup and a 32 mg leftover, which for an 11 pm bedtime is about 3:09 pm on the average half-life. Slow clearers need earlier.
Does tea or chocolate count?
Yes. An 8 fl oz black tea is 47 mg, green tea is 28 mg, a 1 oz square of 70–85% dark chocolate is 23 mg, and a 1.55 oz milk chocolate bar is 9 mg, per USDA. Hidden caffeine in iced tea, cola, and chocolate adds up with the coffee you remember.
What is a caffeine half-life?
It is how long your body takes to clear half of a dose. The Institute of Medicine puts the average at about 5 hours in healthy adults. This calculator treats leftover caffeine as dose × 0.5^(hours / half-life), with no absorption delay.
Why 32 mg?
Gardiner 2023 published two cutoffs, not a leftover milligram target. A 107 mg coffee 8.8 hours before bed, and a 217.5 mg pre-workout 13.2 hours before bed, on a 5-hour half-life, leave about 32 mg and 35 mg. We calculated those leftovers. The calculator uses 32 mg, the coffee figure. It is an average, not personal advice.
Is this caffeine calculator medical advice?
No. It is an estimate from average half-lives and typical servings, not medical advice or a sleep test. It does not diagnose sleep disorders. Ask a clinician if you have a sleep problem. It runs in your browser, and what you type is not sent to us.
Sources
The 32 mg bedtime leftover is our calculation from Gardiner 2023's published cutoffs, using a 5-hour average half-life. Drink values are USDA FoodData Central, per 100 g scaled to the serving shown, read December 1, 2026, except pre-workout, which is the Gardiner 2023 standard serve. Brands vary. Read the label on yours.
This is an estimate from average half-lives, not medical advice.
- Gardiner et al. 2023, The effect of caffeine on subsequent sleep: a systematic review and meta-analysis, Sleep Medicine Reviews
- Institute of Medicine, Pharmacology of Caffeine, 2001
- Drake et al. 2013, Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed
- FDA, Spilling the Beans: How Much Caffeine is Too Much? (content current as of August 28, 2024)
- USDA FoodData Central: brewed coffee, FDC 171890
- USDA FoodData Central: espresso, FDC 171891
- USDA FoodData Central: black tea, FDC 173227
- USDA FoodData Central: green tea, FDC 171917
- USDA FoodData Central: cola, FDC 174852
- USDA FoodData Central: energy drink, FDC 173210
- USDA FoodData Central: dark chocolate, 70–85% cacao, FDC 170273
- USDA FoodData Central: milk chocolate, FDC 167587
- NutriCam on the App Store