Caffeine and Sleep: How Late Is Too Late for Coffee?
Share
You drink a flat white at 4 pm, fall asleep at 11 without any trouble and decide that caffeine doesn’t affect you. Sleep researchers would gently disagree. When they measure sleep with monitors instead of simply asking people how they slept, afternoon caffeine often shortens the night and makes it lighter, even when the sleeper notices nothing.
So how late is too late? The research on caffeine and sleep points to a simple rule of thumb: keep a regular cup of coffee at least 6 hours away from bedtime, and closer to 9 hours if you want a comfortable margin. Bigger doses, such as several espresso shots or a pre-workout drink, need even more time. Here is what the studies actually show, and how to set a cutoff that fits your own evening.
Key takeaways
- Caffeine keeps you alert by blocking adenosine, a chemical signal linked to the sleep pressure that builds while you are awake.
- In a 2013 study, 400 mg of caffeine taken 6 hours before bed cut measured sleep by more than an hour, and participants largely did not notice.
- A 2023 meta-analysis of 24 studies found caffeine reduced total sleep by about 45 minutes and deep sleep by about 11 minutes. It suggested having a typical coffee at least 8.8 hours before bed.
- Europe’s food safety agency (EFSA) notes that even 100 mg, about one 8 oz cup of brewed coffee, may delay and shorten sleep in some people when taken close to bedtime.
- Your personal cutoff depends on the dose, your genes, medications, pregnancy, smoking and habits, so it is worth testing on yourself.
In this article
- How caffeine affects sleep
- What sleep studies show
- Why you might not notice
- Why some people are more sensitive
- How late is too late? A bedtime-based cutoff
- What to drink in the evening instead
- Caffeine and sleep FAQ
How caffeine affects sleep
From the moment you wake up, your brain keeps a running tally of how long you have been awake. The US National Institute of Neurological Disorders and Stroke (NINDS) describes this sleep drive as getting stronger with every hour you stay awake. One of the messengers involved is adenosine, a byproduct of the energy your brain cells use all day. As adenosine accumulates, it acts on its receptors and nudges you toward sleep.
Caffeine has a shape similar enough to adenosine to sit in those receptors without switching them on. As NINDS explains, it works against sleepiness by blocking adenosine. The sleep pressure keeps building in the background; you simply feel less of it. If caffeine is still circulating when you go to bed, that same block can make it harder to drift off and can make your sleep lighter.
Timing is what turns a helpful morning coffee into a problem at night. Caffeine reaches peak levels in your blood between 15 and 120 minutes after you drink it, according to a report from the US National Academies, but it leaves slowly. The average half-life in healthy adults is about 5 hours, so roughly half of the caffeine from a 3 pm coffee can still be in your body at 8 pm. To estimate how much is left at your own bedtime, try our caffeine half-life calculator.
It may also nudge your body clock
Caffeine does not only fight sleep pressure. In a tightly controlled 49-day study published in Science Translational Medicine, a dose equivalent to a double espresso taken 3 hours before bedtime delayed the evening rise of melatonin, the hormone that signals night to your body, by about 40 minutes. That shift was nearly half the size of the delay caused by 3 hours of bright evening light. In practice, a late coffee may make you feel ready for bed later than usual, not just more alert.
What sleep studies show
Sleep scientists distinguish between how long it takes to fall asleep, how long you stay asleep, how often you wake up and how much time you spend in each stage of sleep. Caffeine can touch all of them. Here are the key studies behind today’s advice.
| Study | What was tested | Main finding |
|---|---|---|
| Drake et al., 2013, Journal of Clinical Sleep Medicine | 400 mg of caffeine or placebo at bedtime, 3 hours or 6 hours before bed; 12 healthy sleepers monitored at home | All three timings disturbed sleep. Even at 6 hours, measured total sleep fell by more than an hour. |
| Gardiner et al., 2023, Sleep Medicine Reviews | Meta-analysis of 24 studies | Total sleep about 45 minutes shorter, sleep efficiency down 7%, 9 minutes longer to fall asleep, 12 minutes more time awake during the night, about 11 minutes less deep sleep |
| Gardiner et al., 2025, Sleep | 100 mg or 400 mg taken 12, 8 or 4 hours before bed; 23 young men with moderate caffeine habits | 100 mg had no measurable effect at any timing. 400 mg still changed sleep when taken 12 hours before bed, and the effects grew stronger closer to bedtime. |
| Burke et al., 2015, Science Translational Medicine | Double-espresso dose 3 hours before bed | Body clock (melatonin rhythm) delayed by about 40 minutes |
| EFSA safety opinion, 2015 | Review of the evidence on caffeine safety | 100 mg may lengthen the time to fall asleep and shorten sleep in some people, especially close to bedtime |
The meta-analysis is the best overall summary, because it pools results from many smaller trials. Its authors turned the data into a practical estimate: a standard cup of coffee containing about 107 mg of caffeine (250 ml) should be finished at least 8.8 hours before bedtime to avoid losing sleep, and a typical pre-workout serving of about 217.5 mg needs at least 13.2 hours. They present these numbers as a starting point that you can adjust to your own response, not a strict law.
The deep-sleep finding deserves attention. NINDS describes deep sleep (stage N3, or slow-wave sleep) as the sleep you need to feel refreshed in the morning, and it is concentrated in the first half of the night. Caffeine trimmed about 11 minutes from it on average, while light sleep increased. You might sleep for a similar number of hours and still wake up feeling less rested.
Why you might not notice
One of the most striking results in this research is the gap between what people feel and what the monitors record. In the 2013 study, the participants’ own sleep diaries suggested they were largely unaware of the lost hour when caffeine was taken 6 hours before bed. In the 2025 trial, volunteers reported clearly worse sleep quality, about a third lower, only when they took 400 mg 4 hours before bed. At 8 and 12 hours, the disruption showed up on the recordings but not consistently in how they rated their night.
Tolerance may play a part. People who drink coffee every day often feel less buzz from the same cup, and some researchers think regular drinkers may also be less sensitive to its effects on sleep. EFSA’s experts, however, noted that it is unclear whether tolerance explains why some people seem unaffected. The safest assumption is that falling asleep easily does not prove your late coffee is harmless to your sleep.
Why some people are more sensitive
Some people can drink an espresso after dinner and sleep soundly, while others lie awake after a cup of tea at lunch. Much of this comes down to how fast your body clears caffeine and how strongly your brain responds to it.
- Clearance speed. The National Academies report gives an average half-life of about 5 hours but a range from 1.5 to 9.5 hours between healthy adults. EFSA’s experts give a range of roughly 2 to 8 hours.
- Your liver enzyme. About 95% of the caffeine you drink is broken down by a liver enzyme called CYP1A2, and common genetic variations make it faster or slower in different people.
- Your receptors. The adenosine A2A receptor, caffeine’s main target in the brain, comes in several genetic variants, and genetic studies have tied differences in how caffeine affects sleep and anxiety to people’s genes.
- Smoking speeds up caffeine breakdown, and clearance returns to normal after quitting, so the same coffee may linger longer once you stop smoking.
- Oral contraceptives can double the half-life of caffeine, according to the National Academies report.
- Pregnancy slows clearance progressively, with half-lives of up to 16 hours late in pregnancy. EFSA concluded that up to 200 mg a day during pregnancy and breastfeeding does not raise safety concerns for the baby; always follow your doctor or midwife.
- Medications. The FDA notes that some medications and health conditions make people more sensitive to caffeine. Your pharmacist can tell you whether yours interact with it.
Children and teens are a separate case: the FDA cites the American Academy of Pediatrics’ advice against energy drinks for children and teens, and suggests talking with a health professional about a young person’s caffeine intake.
How late is too late? A bedtime-based cutoff
Instead of a fixed clock time, work backward from when you actually go to bed. The 6-hour figure comes from the 2013 study, which supported the classic advice to avoid substantial caffeine for at least 6 hours before sleep. The 8.8-hour figure is the meta-analysis estimate for one standard coffee. If you are sensitive, take the earlier time.
| Your usual bedtime | Comfortable cutoff for one regular coffee (8.8 hours before) | Bare minimum (6 hours before) |
|---|---|---|
| 9:00 pm | 12:12 pm | 3:00 pm |
| 10:00 pm | 1:12 pm | 4:00 pm |
| 11:00 pm | 2:12 pm | 5:00 pm |
| Midnight | 3:12 pm | 6:00 pm |
Two adjustments make this table more useful:
- Scale for the dose. The cutoffs above are for one regular coffee. A double shot, a large coffee-shop cup or a pre-workout drink pushes the safe window earlier: the meta-analysis suggested about 13 hours for a 217.5 mg pre-workout serving, and in the 2025 trial a 400 mg dose still changed sleep when taken 12 hours before bed.
- Count hidden caffeine. According to Mayo Clinic figures, an 8 oz cup of brewed black tea has about 48 mg, green tea about 29 mg and cola about 33 mg, while a single 1 oz espresso has about 63 mg. Energy drinks, chocolate and some pain relievers add more.
There is also good news in the data. In the 2025 trial, a 100 mg dose, about one 8 oz cup of brewed coffee, showed no measurable effect on sleep even when taken 4 hours before bed. The participants were healthy young men with moderate caffeine habits, so the result may not apply to everyone, but it suggests that one modest afternoon cup is not a problem for many people, while large late doses are.
Find your own cutoff in two weeks
- Week 1: keep your normal coffee routine and write down, each morning, what time you had your last caffeine, roughly how long you took to fall asleep, how often you woke up and how rested you feel on a scale of 1 to 10.
- Week 2: move your last caffeinated drink at least 2 hours earlier, or swap it for decaf, and keep everything else the same: bedtime, alcohol, screens and exercise.
- Compare. If your mornings feel noticeably better, keep the earlier cutoff. If nothing changes, your old routine may suit you, as long as you stay within your daily limit.
If you drink several cups a day and decide to cut back, go gradually to avoid withdrawal headaches. Our guide to coffee addiction and caffeine withdrawal explains how to taper without the rough days.
What to drink in the evening instead
An evening cup is often more about ritual than caffeine: the warmth, the aroma, a moment to slow down after dinner. You can keep that ritual and drop most of the caffeine. Decaf coffee still contains a little, typically 2 to 15 mg in an 8 oz cup according to the FDA, which is far below the 100 mg level EFSA flagged. Herbal infusions such as chamomile or rooibos contain none, while black tea, green tea, matcha and hojicha all contain some caffeine.
If you want the taste of real coffee after dinner, our Decaf Espresso is water-process decaf roasted dark for a chocolatey, full-bodied shot, and Peru Decaf is a Swiss Water Process single origin from Piura and Amazonas with caramel, citrus and a smooth body. For a cup with no caffeine at all, Chamomile Ginger blends organic chamomile, ginger root and lemon myrtle. Like all our coffee, the decafs are roasted 1 to 5 days before delivery, so even your last cup of the day tastes fresh.
Caffeine and sleep FAQ
How many hours before bed should I stop drinking coffee?
At least 6 hours for a regular cup, and about 9 hours if you want a comfortable margin, based on a 2023 meta-analysis that estimated 8.8 hours for a standard 107 mg coffee. Large doses such as pre-workout drinks need even longer, around 13 hours.
Can morning coffee affect my sleep at night?
For most people a normal morning cup is unlikely to matter: in a 2025 trial, 100 mg of caffeine had no measurable effect on sleep at any timing tested. Very large doses are different: in that study, 400 mg taken 12 hours before bed still changed sleep.
Is decaf coffee OK before bed?
Decaf typically contains 2 to 15 mg of caffeine per 8 oz cup, according to the FDA, far below the 100 mg dose that EFSA notes can affect sleep in some people. Most people can enjoy it in the evening, but very sensitive people may want a caffeine-free herbal tea instead.
Why can I drink espresso at night and still fall asleep?
Falling asleep is only one part of sleep. Studies show late caffeine can reduce deep sleep and increase awakenings even when people fall asleep normally and do not notice a difference. People also clear caffeine at very different speeds, so some are genuinely less affected than others.
Does caffeine reduce deep sleep?
Yes, on average. A 2023 meta-analysis of 24 studies found caffeine reduced deep (slow-wave) sleep by about 11 minutes and increased lighter sleep, with stronger effects when the dose was larger or taken closer to bedtime.
Sources
- 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. Read
- American Academy of Sleep Medicine. Late afternoon and early evening caffeine can disrupt sleep at night (press release), 2013. Read
- 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. Read
- Gardiner CL, Weakley J, Burke LM, et al. Dose and timing effects of caffeine on subsequent sleep: a randomized clinical crossover trial. Sleep, 2025. Read
- Burke TM, Markwald RR, McHill AW, et al. Effects of caffeine on the human circadian clock in vivo and in vitro. Science Translational Medicine, 2015. Read
- EFSA Panel on Dietetic Products, Nutrition and Allergies. Scientific Opinion on the safety of caffeine. EFSA Journal, 2015. Read
- EFSA. On the safety of caffeine (scientific presentation), 2015. PDF
- National Institute of Neurological Disorders and Stroke (NIH). Brain Basics: Understanding Sleep. Read
- Institute of Medicine. Caffeine for the Sustainment of Mental Task Performance. National Academies Press, 2001. Read
- Nehlig A. Interindividual differences in caffeine metabolism and factors driving caffeine consumption. Pharmacological Reviews, 2018. Read
- US Food and Drug Administration. Spilling the Beans: How Much Caffeine Is Too Much? Read
- Mayo Clinic. Caffeine content for coffee, tea, soda and more. Read
Facts checked in October 2026.
This article is for general information only and is not medical advice. If you have a health condition, are pregnant or take medication, ask your doctor before changing your caffeine intake.
Keep reading: Coffee addiction: signs, withdrawal and how to cut back · Benefits of caffeine · Shop our teas