Clear Head Habits

Evidence-based habits for a sharper mind

Caffeine and Sleep: How Late Is Too Late?

Written by

in

By Matt · Last reviewed: 9 October 2026

This article is general information, not medical advice. I’m not a health professional. See the medical disclaimer.

When the afternoon drags, is a 4pm coffee harmless, or is it quietly trimming your sleep?

Here’s how long caffeine stays in the body, what studies found about timing, why people differ, and how to find your own cut-off.

In short

  • Caffeine’s half-life (the time it takes your body to clear half of it) is typically 3 to 7 hours in adults, so an afternoon coffee can still be working at bedtime.
  • A 2023 review of 24 studies found that caffeine cut total sleep by about 45 minutes on average and reduced deep sleep.
  • The NHS advises no tea or coffee for at least 6 hours before bed if you have trouble sleeping. The 2023 review suggests a typical coffee may need closer to 9 hours.
  • People vary a lot. Age, genes, pregnancy, smoking and some medicines all change how quickly caffeine is cleared.
  • You may not notice the effect. In one small study, caffeine 6 hours before bed cut measured sleep by more than an hour, but people’s own sleep diaries showed a smaller change.

How caffeine works, briefly

During the day a chemical called adenosine builds up in the brain, and it’s one of the signals that makes us feel sleepy. Caffeine works mainly by blocking adenosine receptors, which is why it makes us feel more alert (Reichert et al., 2022). The sleep pressure is still there; caffeine just masks it for a while.

Caffeine is absorbed quickly, in less than an hour. Levels peak in saliva about 45 minutes after you drink it and in the blood after about 2 hours. Its half-life in adults is usually somewhere between 3 and 7 hours (Temple et al., 2017).

In practice, if you drink a coffee at 3pm and your half-life is 5 hours, about half the caffeine is still in your system at 8pm and a quarter at 1am. That’s simple arithmetic, not a measured result, but it shows why an afternoon cup can still matter at bedtime.

How much caffeine is in your drink?

Amounts vary a lot with the brand, the strength and the cup size. These are rough guides from the European Food Safety Authority (EFSA):

Drink or food Approximate caffeine
Espresso (60ml) 80mg
Cup of filter coffee (200ml) 90mg
Cup of black tea (220ml) 50mg
Can of cola (355ml) 40mg
Can of energy drink (250ml) 80mg
Bar of plain chocolate (50g) 25mg

NHS figures are a little different. It estimates about 100mg in a cup of instant coffee and 75mg in a cup of tea, and notes that filter coffee and coffee-shop coffee can contain more (NHS). A big takeaway coffee could easily contain more than any figure in the table. And EFSA notes that tea, not coffee, is the main source of caffeine for UK adults, so this applies to tea drinkers too.

On daily totals, EFSA concluded that up to 400mg a day spread through the day doesn’t raise safety concerns for healthy adults, except in pregnancy. It also said that a single dose of just 100mg may affect sleep in some adults, particularly close to bedtime (EFSA). In pregnancy, the NHS advises no more than 200mg a day (NHS).

What the studies show about caffeine and sleep

The big picture

A 2017 systematic review of experiments and population studies found a consistent pattern. Caffeine typically made it take longer to fall asleep, cut total sleep, made sleep less efficient and worsened how well people felt they had slept. It also reduced deep (slow-wave) sleep and increased light sleep and brief awakenings. The effects grew with the dose and the closer to bedtime it was taken (Clark & Landolt, 2017).

A 2023 meta-analysis put numbers on it. Across 24 studies, caffeine reduced total sleep time by 45 minutes and sleep efficiency by 7%. It took people 9 minutes longer to fall asleep, and they spent 12 minutes more awake during the night. Deep sleep fell by about 11 minutes (Gardiner et al., 2023).

So how late is too late?

To avoid losing sleep, the 2023 review’s authors calculated that a standard coffee (107mg in 250ml) should be drunk at least 8.8 hours before bedtime. For a larger dose of about 218mg, the gap stretched to 13.2 hours (Gardiner et al., 2023). For someone going to bed at 11pm, that puts the last ordinary coffee at roughly 2pm.

That’s stricter than the NHS, which advises not drinking tea or coffee for at least 6 hours before bed if you have insomnia (NHS: Insomnia). Another NHS page says caffeine’s effects can last up to 7 hours, so you may want to avoid it in the evening if you’re having trouble sleeping (NHS), while its tiredness page suggests avoiding caffeine in the couple of hours before sleep (NHS).

The study behind the “6-hour rule”

A frequently quoted US study gave 12 healthy sleepers a large dose of caffeine (400mg, roughly four cups of filter coffee) at bedtime, 3 hours before or 6 hours before, or a placebo, on different nights at home. All three caffeine timings disrupted sleep compared with placebo (Drake et al., 2013).

The interesting detail is in the full paper. Measured by a sleep monitor, caffeine 6 hours before bed cut sleep by more than an hour. In people’s own sleep diaries, the drop was smaller (about 41 minutes) and not statistically significant. The authors suggest people may not fully notice caffeine’s effect on their sleep (Drake et al., 2013, full text). This was a very small study using a high dose.

A real-world counterpoint

Not every study agrees. In a US study of 785 adults (average age about 64) who wore activity trackers for around a week, having caffeine within 4 hours of bedtime wasn’t linked to that night’s sleep. Alcohol and nicotine in the evening were (Spadola et al., 2019). But it couldn’t control how much caffeine people had, and people who know caffeine keeps them awake may already avoid it at night.

Why your cut-off might differ from your friend’s

  • Genes. One liver enzyme (CYP1A2) handles most caffeine breakdown, and common genetic differences in it and in adenosine receptors help explain why some people can drink espresso after dinner and others can’t (Nehlig, 2018).
  • Age. The sleep of older adults may be more sensitive to caffeine (Clark & Landolt, 2017). In one lab study, a high dose disturbed sleep more in middle-aged adults (around 50) than in young adults (Robillard et al., 2015).
  • Pregnancy and the contraceptive pill. Caffeine’s half-life is longer in pregnancy, and oral contraceptives tend to double it (Temple et al., 2017).
  • Smoking. Smoking roughly doubles the rate at which caffeine is cleared (Temple et al., 2017).
  • Medicines. Many medicines interact with caffeine (Nehlig, 2018). If you take regular medication, ask a pharmacist whether caffeine timing matters for you.

What about tolerance? Researchers still disagree about how much tolerance regular drinkers develop to caffeine’s effects on sleep (Reichert et al., 2022). Given the Drake finding that people underestimate the effect, “it doesn’t bother me” is worth testing rather than assuming.

Try it: a two-week cut-off experiment

Because people differ so much, the most useful number is your own. This simple self-experiment isn’t a scientific trial, but it beats guessing.

  1. Week 1: keep your normal routine. Each morning, jot down roughly when you went to bed, how long it took to fall asleep, how often you woke and how rested you feel (1 to 5). Note the time of your last caffeinated drink, including tea, cola and energy drinks.
  2. Week 2: move your cut-off earlier. Have your last caffeine at least 8 to 9 hours before your usual bedtime, in line with the 2023 review. Keep bedtime, alcohol and exercise as similar as you can. Decaf or herbal tea in the afternoon makes this easier.
  3. Compare. Did you fall asleep faster, wake less or feel better in the morning? If not, a later cut-off may be fine for you. If so, keep the earlier one.

Stopping caffeine abruptly can cause withdrawal symptoms such as headache and tiredness, typically lasting 2 to 9 days (Juliano & Griffiths, 2004), so you may prefer to move your cut-off gradually. If your sleep is poor whatever you do, the wind-down habits in A Science-Backed Wind-Down Routine for Better Sleep are worth a look.

Caffeine can’t replace sleep

Caffeine has its uses (see Are Naps Good for Your Brain? on sleepy driving). But if you need more and more of it to get through the day, the real problem is usually too little or poor-quality sleep.

Separately, the government plans to ban sales of high-caffeine energy drinks (over 150mg per litre) to under-16s in England from April 2027 (GOV.UK).

This article covers caffeine in everyday food and drink. It doesn’t cover caffeine tablets, sports products or other supplements, which this site doesn’t review or recommend.

How strong is the evidence?

Strong that caffeine can shorten and lighten sleep, especially in larger doses and closer to bedtime. Two systematic reviews that include controlled experiments agree. Moderate to limited for exact cut-off times. The 8.8-hour figure comes from a modelling exercise in one meta-analysis, and the “6-hour” study had only 12 participants. Most studies were in healthy adults, mostly men in Western countries, so results may not apply equally to everyone. Limited for how much tolerance regular drinkers develop.

Speak to your GP if…

  • changing your habits, including caffeine, hasn’t helped your sleep, you’ve had trouble sleeping for months, or it’s making daily life hard to cope with (NHS: Insomnia);
  • you get heart palpitations that keep coming back, are happening more often, last longer than a few minutes, or you have a heart condition or a family history of heart problems (NHS: Heart palpitations);
  • you’re pregnant and unsure how much caffeine is safe for you (NHS), or you take regular medicines and aren’t sure how caffeine fits in (a pharmacist can also help);
  • you’ve been feeling tired for a few weeks and aren’t sure why, or tiredness is affecting your daily life (NHS: Tiredness and fatigue).

Call 999 if you have palpitations that don’t go away, or palpitations with chest pain, shortness of breath or fainting (NHS).

References

  1. Gardiner C, Weakley J, Burke LM, et al. The effect of caffeine on subsequent sleep: a systematic review and meta-analysis. Sleep Medicine Reviews. 2023;69:101764. doi:10.1016/j.smrv.2023.101764
  2. Clark I, Landolt HP. Coffee, caffeine, and sleep: a systematic review of epidemiological studies and randomized controlled trials. Sleep Medicine Reviews. 2017;31:70-78. doi:10.1016/j.smrv.2016.01.006
  3. Drake C, Roehrs T, Shambroom J, Roth T. Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed. Journal of Clinical Sleep Medicine. 2013;9(11):1195-1200. doi:10.5664/jcsm.3170 (free full text)
  4. Spadola CE, Guo N, Johnson DA, et al. Evening intake of alcohol, caffeine, and nicotine: night-to-night associations with sleep duration and continuity among African Americans in the Jackson Heart Sleep Study. Sleep. 2019;42(11):zsz136. doi:10.1093/sleep/zsz136 (free full text)
  5. Temple JL, Bernard C, Lipshultz SE, et al. The safety of ingested caffeine: a comprehensive review. Frontiers in Psychiatry. 2017;8:80. doi:10.3389/fpsyt.2017.00080 (free full text)
  6. Reichert CF, Deboer T, Landolt HP. Adenosine, caffeine, and sleep-wake regulation: state of the science and perspectives. Journal of Sleep Research. 2022;31(4):e13597. doi:10.1111/jsr.13597 (free full text)
  7. Nehlig A. Interindividual differences in caffeine metabolism and factors driving caffeine consumption. Pharmacological Reviews. 2018;70(2):384-411. doi:10.1124/pr.117.014407
  8. Robillard R, Bouchard M, Cartier A, Nicolau L, Carrier J. Sleep is more sensitive to high doses of caffeine in the middle years of life. Journal of Psychopharmacology. 2015;29(6):688-697. doi:10.1177/0269881115575535
  9. European Food Safety Authority. Caffeine (topic page summarising the 2015 Scientific Opinion on the safety of caffeine).
  10. NHS. Insomnia; Self-help tips to fight tiredness; Tiredness and fatigue.
  11. NHS. Foods to avoid in pregnancy (caffeine section).
  12. 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. doi:10.1007/s00213-004-2000-x
  13. NHS. Heart palpitations.
  14. GOV.UK. Children’s health further protected with energy drinks ban (16 July 2026).

About the author

Matt (a pen name) runs Clear Head Habits from Belfast, Northern Ireland. Matt is a successful entrepreneur and registered consulting engineer who also holds a diploma and degree in sociology. He’s keenly interested in design and in making design processes more efficient, and he likes to challenge conventional ways of thinking and doing. He writes about the research behind sleep, focus and memory. He isn’t a health professional. More about Matt · How we research

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *