How Late Is Too Late for Caffeine? What the Studies Say
Key takeaways
- Caffeine has an average half-life of about five hours, with a range of roughly 1.5 to 9.5 hours between individuals.
- A 2013 trial found 400 mg disrupted sleep even when taken six hours before bed.
- A 2025 study reported no significant effect from 100 mg at four, eight or twelve hours before bed.
- Caffeine reduces deep sleep without necessarily stopping you falling asleep, so judge it by how you wake rather than how you drift off.
- Pregnancy, oral contraceptives, some medications, liver disease and slow CYP1A2 genetics all extend how long it lasts.
The popular answer to this is a single number, usually two in the afternoon, repeated with more confidence than the evidence supports. The real answer depends on the dose, on how fast your particular liver clears caffeine, and on which study you ask. What is clear is that the effect lasts considerably longer than most people assume, and that the damage it does is often invisible: you fall asleep fine and simply get worse sleep.
How late is too late for caffeine: the short answer
Caffeine has an average half-life of around five hours, meaning half of it is still in your system five hours after you drink it. That average hides enormous variation, with a reported range of roughly 1.5 to 9.5 hours depending on genetics, age, medication and liver function. The person who drinks espresso after dinner and sleeps soundly is not lying, and neither is the person whose afternoon tea ruins their night.
On the research, the most conservative guidance suggests stopping about nine hours before bed, which for an eleven o'clock bedtime means nothing after two in the afternoon. A more generous reading, based on a smaller recent study using a single modest dose, suggests four hours may be enough for the equivalent of one coffee. Both numbers are defensible from the current literature, which is a less satisfying answer than the internet gives but a more accurate one.
The discrepancy is mostly explained by dose. A study using the equivalent of four coffees will produce a longer required gap than one using a single cup, and both can be reported as what the research says about caffeine and sleep. Reading any cut-off figure without asking how much caffeine it was based on is the main reason the advice circulating online contradicts itself so often.
What the trials actually tested
The most cited study, published by Drake and colleagues in 2013, gave participants 400 milligrams of caffeine, roughly four cups of coffee, at bedtime, three hours before bed and six hours before bed. All three timings disrupted sleep compared with placebo, which is the finding that produced the familiar advice to stop six hours or more before bed. The detail that matters is the dose: 400 milligrams is a large amount, and most people drinking a coffee at four in the afternoon are not taking that.
A 2025 study took a more realistic approach, giving 23 healthy men either 100 milligrams or 400 milligrams at 12, 8 and 4 hours before bedtime, double blind and placebo controlled, with sleep measured at home. As reported secondhand, 100 milligrams produced no significant effect at any of the three timings, while 400 milligrams reduced deep sleep when taken four hours before bed. That is a meaningfully different message, and it is worth saying that we were unable to verify the original paper directly.
Both studies share a limitation worth naming: they were run in healthy adults who were not reporting sleep problems. Someone already sleeping badly has less margin, and the same dose at the same hour may matter considerably more for them than for a well-rested participant in a sleep laboratory. Averages from healthy volunteers describe the population rather than the person reading this at midnight.
Falling asleep is not the measure
The reason people underestimate caffeine is that they judge it by whether they fell asleep. Caffeine works by blocking adenosine, the molecule that accumulates through the day and creates sleep pressure. Blocking it does not remove the tiredness, it masks it, and when enough pressure has built up you will fall asleep regardless.
What changes is the quality. Caffeine late in the day reduces deep slow-wave sleep, the stage most associated with physical restoration, and it can shift the architecture of the night without changing how long you were unconscious. The result is the familiar experience of eight hours in bed and no benefit from it. If you sleep what looks like a normal night and wake unrefreshed, afternoon caffeine is among the more common and most fixable explanations.
This sets up a loop that is easy to miss from inside. Poor quality sleep produces a tired morning, a tired morning produces more caffeine, and more caffeine produces another poor night. People in that cycle usually conclude they need the coffee because they are so tired, which is true in the short term and is also the mechanism keeping them tired. Breaking it takes about two weeks of worse mornings before the nights improve enough to pay it back.
Finding your own cut-off
Since the research gives a range rather than a number, the practical approach is to test yourself rather than adopt somebody else's rule.
- Count your actual intake, remembering a large coffee shop drink can exceed 200 mg on its own.
- Include the hidden sources: tea, cola, energy drinks, dark chocolate, pre-workout and some painkillers.
- Set a cut-off at two in the afternoon for two weeks as a starting test.
- Judge by how you feel on waking, not by how quickly you fell asleep.
- Move the cut-off later in 30-minute steps once sleep is good, until quality drops.
- Keep the morning intake consistent, since abrupt reduction causes headaches.
- Halve the dose rather than the timing if you want an afternoon drink, since dose matters at least as much.
Decaf is worth knowing about here: it is not caffeine free, typically containing a small amount per cup, which is irrelevant for most people and not for the unusually sensitive. Matcha and green tea deserve the same check, since both are often assumed to be gentle and a strong serving is not far off a cup of coffee.
Who clears it slowly
Variation in the CYP1A2 enzyme is the main genetic factor, and it splits people into fast and slow metabolisers. Slow metabolisers keep caffeine circulating far longer, and they are the people for whom a mid-afternoon coffee genuinely does ruin the night while their colleague sleeps fine after an espresso at nine.
Several other factors slow clearance substantially. Pregnancy extends the half-life considerably, which is one reason intake limits are advised. Oral contraceptives, some antibiotics and certain other medications interfere with the same enzyme. Liver disease slows it, and clearance declines with age. Smoking has the opposite effect, speeding it up, which is why people who stop smoking often become unexpectedly sensitive to their usual coffee. If any of these apply to you, assume a later cut-off is needed rather than experimenting your way there slowly.
When to see a doctor
See a doctor if you are sleeping what should be enough and still waking unrefreshed after cutting caffeine back, if you fall asleep unintentionally during the day, or if your partner reports snoring with pauses in breathing, which can indicate sleep apnoea. Persistent insomnia lasting more than a few weeks deserves proper assessment rather than another adjustment to your coffee, and cognitive behavioural therapy for insomnia is the first-line treatment in most guidelines rather than medication.
Mention your caffeine intake if you have palpitations, anxiety, tremor, reflux or high blood pressure, since it contributes to all of them and is easy to overlook. Seek prompt medical advice if you are pregnant and unsure about limits, and urgent care for chest pain, a racing or irregular heartbeat, or severe agitation after a large dose, particularly from energy drinks or caffeine tablets. This is general information rather than medical advice, and some of the figures here come from secondary reporting of studies rather than from the original papers.
Frequently asked questions
How many hours before bed should I stop drinking caffeine?
The conservative answer from recent reviews is about nine hours. A 2013 trial found 400 mg disrupted sleep at six hours, while a 2025 study reported no significant effect from 100 mg at four hours.
How long does caffeine stay in your system?
The average half-life is around five hours, so half remains after five hours. The range across individuals is roughly 1.5 to 9.5 hours depending on genetics, age, medication and liver function.
Does caffeine affect sleep if I fall asleep fine?
Yes. It blocks adenosine and reduces deep slow-wave sleep without necessarily preventing you falling asleep, which is why people wake unrefreshed after a full night.
Why does caffeine affect some people more than others?
Mainly variation in the CYP1A2 enzyme, which makes some people slow metabolisers. Pregnancy, oral contraceptives, some medications and liver disease also slow clearance.
Is decaf coffee caffeine free?
No. It contains a small amount per cup, which is irrelevant for most people but can matter for those who are unusually sensitive.
Read next
- How to Fall Asleep Fast: Techniques That Actually Work
What to do once the caffeine is out of the way.
- Natural Sleep Aids That Are Not Addictive: What Works
Options beyond adjusting your coffee.
- Sleep Apnoea: The Signs Most People Miss
When unrefreshing sleep is not about caffeine.
This article is for general informational purposes only and is not medical advice. Always consult a qualified healthcare professional about your individual situation, and never start or stop a medication without your doctor. See our Medical Disclaimer.