Caffeine Cutoff Calculator: When to Stop Drinking Coffee
For most adults, the last cup of coffee lands about 8 to 9 hours before bed. Caffeine has a half-life of roughly 5 hours, so a mid-afternoon coffee is still partly active at lights-out. Enter your bedtime below for your personal cutoff.
Want a morning focus ritual?Wake Up Smart is our daily focus & cognition formula. Make it part of your morning routine.
See Wake Up SmartHow the caffeine cutoff calculator works
Your caffeine cutoff is the latest time you can have caffeine and still give your body enough hours to clear most of it before bed. Caffeine works by blocking adenosine, the chemical that builds 'sleep pressure' across the day, so caffeine still circulating at bedtime is linked to taking longer to fall asleep and spending less time in deep sleep.
This calculator works backward from your bedtime using three inputs. Your drink sets the starting dose: an 8 oz brewed coffee is about 95 mg, a single espresso about 64 mg and green tea about 28 mg (USDA FoodData Central). Your sensitivity sets the half-life: fast metabolizers clear caffeine in about 3 hours, average adults in about 5 and slow metabolizers in 7 or more. Servings multiply the dose.
It then finds the time when that dose falls to about 30 mg, roughly a third of a cup, by bedtime, and never suggests less than 6 hours. That floor comes from a sleep-lab study in which caffeine taken 6 hours before bed was still linked to over an hour less sleep. For an average coffee drinker with a 10:30 PM bedtime, the cutoff lands around 2 PM, close to the 8.8 hours a 2023 meta-analysis suggested.
Use the result as a starting point. Keep a simple sleep diary for a week, and if you still feel wired at night, move your cutoff an hour earlier.
How it works
Caffeine blocks adenosine, a chemical that builds up while you are awake and makes you feel sleepy. That's why coffee feels like it switches the lights on.
Your liver clears caffeine at a steady rate, measured as a half-life: the time it takes for half of it to leave your blood. For most adults that's about 3 to 7 hours, so a 2 PM coffee can still be partly active at bedtime.
The math: hours needed = half-life x log2(caffeine dose / 30 mg). For an 8 oz coffee (95 mg) at a 5-hour half-life, that's 5 x log2(3.2) = about 8.3 hours. We never suggest less than 6 hours.
What the research says
- Drake et al. (2013) gave adults 400 mg of caffeine 0, 3 or 6 hours before bed. Even at 6 hours, it was linked to more than an hour less sleep. Read the study
- A 2023 meta-analysis of 24 studies linked caffeine to about 45 minutes less total sleep and less deep sleep, and suggested having coffee at least 8.8 hours before bed. Read the study
- Reviews describe a 3 to 7 hour half-life in adults, with genes (the CYP1A2 enzyme) and hormones (oral contraceptives roughly double it) shifting it a lot. Read the study
Glossary
- Half-life
- The time it takes your body to clear half of a substance.
- Adenosine
- A brain chemical that builds 'sleep pressure' through the day. Caffeine blocks its receptors.
- Metabolizer
- How fast your body breaks caffeine down: fast, average or slow.
- CYP1A2
- The liver enzyme that handles about 95% of caffeine breakdown.
Frequently asked questions
When should I stop drinking caffeine before bed?
Most adults do well stopping caffeine about 8 to 9 hours before bed. A 2023 meta-analysis of 24 studies suggested having coffee at least 8.8 hours before bedtime and a pre-workout supplement at least 13.2 hours before. If you clear caffeine slowly, aim earlier.
What time should my last coffee be if I go to bed at 11 PM?
With an average 5-hour half-life and one 8 oz coffee, the calculator suggests about 2:40 PM for an 11 PM bedtime. Fast metabolizers can push closer to 5 PM, while slow metabolizers may land late morning.
How long does caffeine stay in your system?
In adults, caffeine's half-life is about 3 to 7 hours, so half of a dose is still in your blood that long after you drink it, and a quarter remains after two half-lives. Genetics (the CYP1A2 enzyme) and hormones, such as oral contraceptives, shift this a lot.
Does caffeine 6 hours before bed affect sleep?
It can. In a 2013 study, 400 mg of caffeine taken 6 hours before bed was linked to more than an hour less total sleep compared with placebo.
Does decaf coffee count?
Only a little. The FDA says decaf coffee typically has 2 to 15 mg of caffeine per 8 oz cup, compared with about 95 mg in regular brewed coffee, so it adds very little by bedtime.
Do tea, soda and energy drinks count toward the cutoff?
Yes. Every caffeine source counts. Black tea has about 47 mg per 8 oz and cola about 32 mg per 12 oz, while energy drinks range widely from 54 to 328 mg per 16 oz, so check the label and use the custom option.
Keep exploring
Related tools
Related reading
Related products
- Wake Up Smart — Focus & Cognition Formula: Our Focus & Cognition Formula.
- Magnesium Glycinate: A gentle, popular form for evening routines.
- Drake C, et al. Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed. J Clin Sleep Med. 2013;9(11):1195-1200. https://pmc.ncbi.nlm.nih.gov/articles/PMC3805807/
- Gardiner C, et al. The effect of caffeine on subsequent sleep: a systematic review and meta-analysis. Sleep Med Rev. 2023;69:101764. https://pubmed.ncbi.nlm.nih.gov/36870101/
- Temple JL, et al. The safety of ingested caffeine: a comprehensive review. Front Psychiatry. 2017;8:80 (half-life 3-7 h in adults). https://pmc.ncbi.nlm.nih.gov/articles/PMC5445139/
- Nehlig A. Interindividual differences in caffeine metabolism and factors driving caffeine consumption. Pharmacol Rev. 2018;70(2):384-411. https://pubmed.ncbi.nlm.nih.gov/29514871/
- USDA FoodData Central, SR Legacy caffeine values per 100 g: brewed coffee 40 mg (FDC 171890), espresso 212 mg (171891), black tea 20 mg (173227), green tea 12 mg (171917), cola 9 mg (174852), Red Bull 29 mg (173210). Serving totals assume about 1 g per mL. https://fdc.nal.usda.gov/
For information only, not medical advice.