Caffeine cutoff calculator: latest coffee time before bed
Enter your bedtime and the calculator counts back to your latest caffeine time. A 2023 review of 24 studies estimated that a regular cup of coffee should be finished at least 8.8 hours before bed, and a strong dose such as a pre-workout drink at least 13.2 hours before, to avoid losing sleep. People clear caffeine at very different speeds, so use the time as a starting point to test. Nothing is stored.
Nothing is stored or sent: everything runs in your browser, even offline after the first visit.
What to do now
- Pick the kind of drink you usually have.
- Enter your usual bedtime and, if you like, your current last caffeine time.
- Note the cut-off time and set a reminder for it.
- At that time, swap to decaf, herbal tea or water.
What not to do
- Do not stop all caffeine at once if you drink a lot: withdrawal headaches are common.
- Do not forget energy drinks, pre-workout, cola and some painkillers or cold remedies.
- Do not take the time as exact: your own cut-off may be earlier or later.
- Do not use more caffeine to make up for a short night every day.
After the calculation
- Move your last cup earlier by about an hour every few days until you reach the cut-off.
- Keep your wake time steady so you can see the effect of caffeine.
- After two weeks, compare your sleep diary with the weeks before.
When to see a professional
- You still sleep badly on most nights for months after cutting late caffeine.
- You need more and more caffeine to get through the day.
- Caffeine gives you palpitations, chest pain or strong anxiety.
- You snore loudly, gasp or stop breathing in your sleep.
How it works
Caffeine blocks adenosine, a chemical that builds up while you are awake and helps you feel sleepy. If it is still in your body at bedtime, it can make sleep shorter and lighter, even when you fall asleep without trouble.
The calculator uses the gaps from a 2023 systematic review and meta-analysis of 24 studies (Gardiner et al.). To avoid losing total sleep time, it estimated that a cup of coffee with about 107 mg of caffeine should be drunk at least 8.8 hours before bed, and a standard serve of pre-workout supplement (about 217.5 mg) at least 13.2 hours before. We round these up to 9 hours and 13 hours 15 minutes and count back from your bedtime.
Example: for an 11:00 p.m. bedtime, the last regular coffee is about 2:00 p.m., and the last energy drink or pre-workout is about 9:45 a.m. For a 10:00 p.m. bedtime, the times are about 1:00 p.m. and 8:45 a.m.
Why so long? In a small home study, a large dose (400 mg) taken even 6 hours before bed still disturbed sleep compared with a placebo (Drake et al. 2013). How fast the body clears caffeine also differs a lot between people, depending on genes, age, hormones, smoking, liver health and some medicines (Nehlig 2018).
The calculator cannot see your body or your sleep. It does not know how sensitive you are or how much caffeine is in your drink. Use the result as a cautious starting point and adjust it based on how you sleep.
Sources
- Gardiner C, Weakley J, Burke LM, et al. The effect of caffeine on subsequent sleep: a systematic review and meta-analysis. Sleep Med Rev 2023;69:101764
- 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
- Roehrs T, Roth T. Caffeine: sleep and daytime sleepiness. Sleep Med Rev 2008;12(2):153–162
- Juliano LM, Griffiths RR. A critical review of caffeine withdrawal: empirical validation of symptoms and signs, incidence, severity, and associated features. Psychopharmacology 2004;176(1):1–29
- U.S. Food and Drug Administration. Spilling the beans: how much caffeine is too much?