Does Caffeine Affect Sleep? The Half-Life Problem
Caffeine's half-life is longer than most people plan around — here's the trial that measured a 6pm coffee's effect on sleep at midnight.
Not medical advice — general information based on published research.Full disclaimer →

Short answer
Yes — caffeine has a half-life of roughly 5 hours in most healthy adults, meaning a coffee at 3pm still has about a quarter of its caffeine active in your system at 1am. A controlled sleep-lab trial found measurable sleep disruption from caffeine taken even six hours before bed.
On this page
“I only had coffee at 4pm, that’s got nothing to do with why I can’t sleep” is one of the more confidently wrong things people say about their own sleep. Caffeine’s pharmacokinetics don’t cooperate with that instinct.
The trial that actually tested this
A 2013 double-blind, placebo-controlled study in the Journal of Clinical Sleep Medicine [1] gave participants 400mg of caffeine (roughly the amount in three to four cups of brewed coffee) at three different points relative to bedtime: 0 hours, 3 hours, and 6 hours before. All three timings produced measurable sleep disruption compared to placebo — reduced total sleep time and more time awake after initially falling asleep — with the 6-hour group still showing significant impairment.
That’s the practical finding worth remembering: a 6pm coffee, for a midnight bedtime, was still doing measurable damage to sleep quality in this trial. “It was hours ago” is not the same as “it’s gone.”
Why the timing surprises people: the half-life
Caffeine’s elimination half-life in healthy, non-pregnant adults is typically in the 4-6 hour range [2]. Half-life means: after that many hours, roughly half the caffeine is still active. Run the math on a 3pm coffee with a 5-hour half-life:
- 3pm: 100% of the dose active
- 8pm: ~50% still active
- 1am: ~25% still active
A quarter of a stimulant dose still circulating at 1am is enough to measurably disrupt sleep architecture for a lot of people, even if it doesn’t feel like “being awake from caffeine” in the way a double espresso at 9am does.
It’s not the same for everyone, and there’s a real reason why
This is one of the more legitimate “it depends” stories in stimulant pharmacology. A 2018 review in Pharmacological Reviews [2] covers the real drivers of individual variation: genetic differences in the CYP1A2 liver enzyme (which metabolises most caffeine) mean some people clear it meaningfully faster or slower than others, and factors like pregnancy, hormonal contraceptive use, smoking status, and liver function all shift the half-life further. Some people can drink coffee at 7pm and sleep fine; that’s a real physiological difference, not just a difference in willpower or belief.
What to actually do with this
- If you have any trouble falling or staying asleep, treat “no caffeine after 2pm” as a real experiment worth running for a couple of weeks, not a wellness platitude — the half-life math suggests a 2pm cutoff clears most of the dose by a typical 10-11pm bedtime.
- If you sleep fine after an evening coffee, you may just be a fast metaboliser — that doesn’t mean the research above is wrong, it means individual variation is real.
- The habit tracker’s “no caffeine after 2pm” habit is built directly off this half-life logic, not an arbitrary cutoff.
Common questions
How long does caffeine actually stay in your system?
Caffeine's half-life is typically 4-6 hours in healthy adults, though it varies with genetics, liver function, pregnancy, and other factors. After roughly 5 half-lives (about a day), it's largely cleared.
Does everyone react to caffeine and sleep the same way?
No. Genetic variation in the CYP1A2 liver enzyme changes how fast people metabolise caffeine, and some people are far more sensitive to its sleep-disrupting effects than others at the same dose.
Sources cited
- [1]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.Single RCT
- [2]Nehlig A (2018). Interindividual Differences in Caffeine Metabolism and Factors Driving Caffeine Consumption . Pharmacological Reviews.Guideline


