Tools · Sleep

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.

1. What do you usually drink

Regular: one cup of brewed coffee, about 100 mg of caffeine. Strong: a large or double coffee, an energy drink or a pre-workout product, about 200 mg or more. Not sure? Check the label or pick «strong». The review did not estimate a time for much larger doses; with them, the cut-off may need to be earlier still.

2. Your times

Leave the second field empty if you only want the cut-off time.

Nothing is stored or sent: everything runs in your browser, even offline after the first visit.

Sources checked Not yet reviewed by a clinician How we review

How this was made: drafted with AI (Claude); we check every number and link against its source. Review by a clinician is planned and has not started yet. When a reviewer signs a page, their name appears above. How we review

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.

Read the full guide to caffeine and sleep →

Sources

  1. 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
  2. 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
  3. Nehlig A. Interindividual differences in caffeine metabolism and factors driving caffeine consumption. Pharmacol Rev 2018;70(2):384–411
  4. Roehrs T, Roth T. Caffeine: sleep and daytime sleepiness. Sleep Med Rev 2008;12(2):153–162
  5. 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
  6. U.S. Food and Drug Administration. Spilling the beans: how much caffeine is too much?

If things are hard right now

Resteady is not an emergency service. If you are in danger or thinking about harming yourself, call a crisis line or emergency services now. It is free and confidential.

Numbers can change. If a line does not answer, call 112 or your local emergency number.

Open SOSAll lines by country

  • EU / EEA112Emergency number
  • Ukraine112Emergency number
  • Ukraine103Ambulance
  • Ukraine0 800 210 160People in Need psychological support (24/7, free)
  • United States988Suicide & Crisis Lifeline
  • United States988988 Lifeline in Spanish (press 2, or text AYUDA to 988)
  • Colombia123Emergency number
  • Colombia106Línea 106 mental health support (24/7, free)
  • Chile*4141Línea *4141 suicide prevention (24/7, free, from mobile phones)
  • Peru113Línea 113, option 5: mental health support (24/7, free)
  • Mexico800 911 2000Línea de la Vida mental health and addictions support (24/7, free)
  • Argentina911Emergency number
  • Argentina135Centro de Asistencia al Suicida (free from Buenos Aires City and Greater Buenos Aires, 8:00–24:00)
  • Argentina0800 345 1435Centro de Asistencia al Suicida (nationwide, 8:00–24:00)
  • United Kingdom116 123Samaritans
  • Ireland116 123Samaritans
  • Germany0800 111 0 111TelefonSeelsorge
  • Spain024Línea 024
  • Poland116 123Telefon zaufania dla osób dorosłych w kryzysie
  • France3114Numéro national de prévention du suicide

Other countries: findahelpline.com — Free, confidential lines for every country.