Farnflower Newsletter
Drinks

When should you stop drinking coffee for better sleep?

Stop about nine hours before bed for one cup and thirteen for a strong dose, because caffeine can cost you sleep you never notice losing.

How much caffeine is in your own day? Take the one-minute test

Dark roasted coffee beans filling the frame

Have your last regular cup of coffee about nine hours before you go to bed, so around 1 pm if you sleep at 10 pm. Two cups at once, a large energy drink or a pre-workout needs about thirteen hours. In sleep studies, caffeine cost people sleep even when they felt they had slept normally.

Key takeaways

  • A normal cup needs about nine hours before bed, a strong dose about thirteen.
  • Caffeine can cost sleep even when you feel you slept fine.
  • Even a morning dose can still affect your sleep that night.
  • Some bodies clear caffeine far more slowly, for example with hormonal birth control.
  • Energy drinks and pre-workouts need a much earlier cutoff than one cup.
  • Decaf or herbal tea keeps the afternoon ritual without the caffeine.

Your last coffee, by bedtime

If you go to bed atLast regular coffee (about 100 mg)Last strong dose (about 200 mg)
10 pm1 pm9 am
11 pm2 pm10 am
midnight3 pm11 am

How many hours before bed should you stop caffeine?

About nine hours for a normal cup of coffee. A 2023 review pooled 24 sleep studies and found that caffeine shortened sleep by 45 minutes on average. To avoid losing sleep, a cup of coffee with 107 mg of caffeine should come at least 8.8 hours before bedtime, and a dose of about 217 mg, the amount in a typical pre-workout drink, at least 13.2 hours before (Gardiner et al., 2023).

Those are averages. The authors derived the cutoffs from the pattern across all studies, so your own body can be faster or slower. The popular advice of “no coffee after 2 pm” works for people who sleep at 11 pm and drink one normal cup. It is too late for an energy drink, and too late for anyone whose body clears caffeine slowly.

Why don’t you notice that coffee costs you sleep?

Because the loss is real but quiet. In a study at the Henry Ford sleep center in Detroit, twelve adults took 400 mg of caffeine, about four cups, either at bedtime, three hours before or six hours before, on separate nights at home. A sleep monitor recorded significantly less sleep in all three conditions, including the six-hour one. The participants’ own sleep diaries told a different story: after caffeine six hours before bed, they reported 41 minutes less sleep, a difference too uncertain to count as clear. Only the monitor caught it reliably (Drake et al., 2013).

An older study went further. Nine healthy men took 200 mg of caffeine, about two cups, at ten past seven in the morning. By 11 pm, the caffeine in their saliva had dropped to a small fraction of its morning peak. They still slept less and less efficiently that night than after a placebo, and the recordings of their brain waves showed weaker signs of deep sleep (Landolt et al., 1995). Caffeine works by blocking adenosine, the substance that builds up while you are awake and makes you sleepy, and even small leftover amounts seem to keep doing that (Landolt et al., 1995).

Two small studies are not the last word. Together they explain a common experience, though: you fall asleep fine after an afternoon coffee, wake up tired anyway, and blame something else.

Why does coffee last longer in some people?

Your body breaks caffeine down at its own speed. In healthy adults, half of a dose is usually gone after about four hours, but this “half-life” ranges from two to eight hours, and it changes with pregnancy, medication, liver health and age (EFSA, 2015a). Ninety-five percent of caffeine is broken down by a single liver enzyme, CYP1A2, and common gene variants make that enzyme faster or slower from person to person (Nehlig, 2018).

Hormonal birth control matters too. In a small study, women on low-dose estrogen pills cleared caffeine more slowly, with a half-life of almost eight hours instead of a little over five (Abernethy & Todd, 1985). For them, a 3 pm coffee is still noticeably active at bedtime.

Do tea, cola and chocolate count too?

Yes, all caffeine counts, but the amounts differ a lot.

How much caffeine is in common drinks and foods

Drink or foodCaffeine
Brewed coffee, 8 oz (240 ml)about 95 mg
Espresso, one shot (30 ml)about 64 mg
Black tea, 8 ozabout 47 mg
Green tea, 8 ozabout 28 mg
Cola, 12 oz can (355 ml)about 33 mg
Dark chocolate (70–85 %), 1 oz (28 g)about 22 mg
Decaf coffee, 8 ozabout 2 to 15 mg

Source: USDA, n.d.; FDA, n.d..

An evening cup of green tea carries less than a third of a coffee. Two regular cups at once already make about 200 mg, the amount that needs thirteen hours. Europe’s food safety authority concluded that even a single dose of 100 mg can lengthen the time it takes to fall asleep and shorten sleep in some adults, especially close to bedtime (EFSA, 2015b).

What I’d do

  • Count back nine hours from your usual bedtime and make that your last regular cup.
  • Move anything stronger than one cup, like a double espresso, an energy drink or a pre-workout, into the morning.
  • Try a two-week test: same bedtime, last coffee two hours earlier than now, and note how you feel when you wake up.
  • Switch to decaf or herbal tea for the afternoon ritual if you want the cup without the caffeine.
  • Leave a bigger buffer if you take hormonal birth control, are pregnant or already sleep badly.

Frequently asked questions

Is decaf fine in the evening? For most people, yes. A cup of decaf contains about 2 to 15 mg of caffeine, a small fraction of regular coffee (FDA, n.d.). More in Is decaf worth switching to? Very sensitive people may still want to keep it before dinner.

Does caffeine affect deep sleep? Yes. In the 2023 review, caffeine reduced deep sleep by about 11 minutes a night and increased light sleep (Gardiner et al., 2023). Deep sleep is the phase that feels most restorative.

Does green tea keep you awake like coffee? Less, because a cup has far less caffeine. Matcha is the exception: you drink the whole leaf, and depending on the product a bowl can come close to a small coffee, as explained in Is matcha better for you than coffee? What green tea does for your heart is covered in Is green tea good for you?

What if I need coffee to get through the afternoon? The early-afternoon slump is partly built into your body clock, and a short nap or a walk in daylight can replace the late cup, as explained in Why am I tired after lunch? For how long that nap should be, see How long should a power nap be?

Is a glass of wine in the evening better for sleep than coffee? It works the other way round. Alcohol helps you fall asleep faster and makes the second half of the night more restless, as explained in Does a glass of wine before bed change your sleep?

Sources

  • Abernethy, D. R., & Todd, E. L. (1985). Impairment of caffeine clearance by chronic use of low-dose oestrogen-containing oral contraceptives. European Journal of Clinical Pharmacology, 28(4), 425–428. https://doi.org/10.1007/bf00544361
  • Drake, C., Roehrs, T., Shambroom, J., & Roth, T. (2013). Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed. Journal of Clinical Sleep Medicine, 9(11), 1195–1200. https://doi.org/10.5664/jcsm.3170
  • EFSA Panel on Dietetic Products, Nutrition and Allergies. (2015b). Scientific opinion on the safety of caffeine. EFSA Journal, 13(5), 4102. https://doi.org/10.2903/j.efsa.2015.4102
  • European Food Safety Authority [EFSA]. (2015a). EFSA explains risk assessment: Caffeine. efsa.europa.eu
  • Gardiner, C., Weakley, J., Burke, L. M., et al. (2023). The effect of caffeine on subsequent sleep: A systematic review and meta-analysis. Sleep Medicine Reviews, 69, 101764. https://doi.org/10.1016/j.smrv.2023.101764
  • Landolt, H. P., Werth, E., Borbély, A. A., & Dijk, D. J. (1995). Caffeine intake (200 mg) in the morning affects human sleep and EEG power spectra at night. Brain Research, 675(1–2), 67–74. https://doi.org/10.1016/0006-8993(95)00040-w
  • Nehlig, A. (2018). Interindividual differences in caffeine metabolism and factors driving caffeine consumption. Pharmacological Reviews, 70(2), 384–411. https://doi.org/10.1124/pr.117.014407
  • U.S. Department of Agriculture [USDA]. (n.d.). FoodData Central: brewed coffee, espresso, brewed black and green tea, cola, dark chocolate 70–85 % cacao. fdc.nal.usda.gov
  • U.S. Food and Drug Administration [FDA]. (n.d.). Spilling the beans: How much caffeine is too much? fda.gov

One question a month, answered properly