
Caffeine and Sleep: How Late Is Too Late for Coffee?
Listen to this article
Listen to this article
Listen while you read
🌙 Sleep music
Press play and let the music stay with you while you read. No need to leave the page.
This player uses YouTube, which sets third-party cookies. Load it only if you want to.
Clicking accepts marketing/media cookies.
Caffeine and Sleep: How Late Is Too Late for Coffee?
Let's start with the number that made me want to write this.
A 2023 systematic review and meta-analysis pooled 24 controlled crossover trials and built a model to answer the question everyone actually wants answered: how late can I have coffee? For a 10pm bedtime, their answer for a standard coffee was 1:12 in the afternoon.
Not 6pm. Not "avoid it after dinner." Early afternoon.
If your reaction is that can't be right, I drink coffee at four and sleep fine — hold that thought, because there is a study specifically about that reaction, and it is the most interesting thing in this article.
Part 1: What caffeine actually does (it's not what most people think)
Caffeine does not give you energy. It has no calories and it doesn't fuel anything. What it does is hide your tiredness from you.
From the moment you wake up, a molecule called adenosine accumulates in your brain. It's a by-product of your cells using energy, and as it builds up over the day it binds to receptors that produce the feeling of sleepiness. By evening you have a lot of it, which is why you want to go to bed. Sleep is when it gets cleared out.
Caffeine is shaped closely enough to adenosine that it fits into those same receptors — and it occupies them without activating them. The adenosine is still there. Your tiredness is still there. You just can't feel it, because the doorbell has been unplugged.
This matters for two reasons. First, it explains the afternoon crash: when caffeine finally clears, all the adenosine that accumulated while you couldn't feel it arrives at once. Second, it explains why caffeine damages sleep in a way that's easy to miss — adenosine signalling is part of what drives deep sleep specifically, so blocking it doesn't just keep you awake, it degrades the quality of the sleep you do get.
Caffeine hits peak blood levels fast: within 30 to 60 minutes by most accounts, with a wider range of 15 minutes to 2 hours depending on what else is in your stomach.
Part 2: The half-life math (do this with your own coffee)
Here's where it gets concrete. Caffeine's half-life — the time for your body to clear half of it — is commonly given as 3 to 5 hours, though the full range across individuals is roughly 1.5 to 9.5 hours.
Take a 5-hour half-life and a 200 mg coffee at 2pm:
| Time | Caffeine still circulating |
|---|---|
| 2:00pm | 200 mg |
| 7:00pm | 100 mg |
| 10:00pm | 66 mg |
| 11:00pm | 57 mg |
| 12:00am | 50 mg |
At 10pm, as you're getting into bed, you still have about 66 mg on board — roughly a shot of espresso, or two thirds of a standard cup of coffee. Starting from 200 mg, it takes around 15 hours to fall below 25 mg.
Nobody would drink an espresso at bedtime on purpose. A 2pm coffee does it to you quietly.
Try it with your own habit: halve the dose for every five hours between your last cup and your bedtime. Most people are surprised by what's left.
Part 3: The study that should change your mind
In 2013, a team led by Christopher Drake ran the experiment that settles the "it doesn't affect me" argument.
Twelve healthy normal sleepers took 400 mg of caffeine — about two to three cups of coffee — at one of three times: immediately before bed, 3 hours before bed, or 6 hours before bed. The other doses that day were placebos, and one day was all placebo as a control. Sleep was measured objectively, not self-reported.
Even taken six hours before bedtime, caffeine reduced total sleep time by more than an hour.
And then the finding that matters most:
The participants didn't notice. Their own subjective reports suggested they were unaware of the disruption. The researchers specifically observed that people are less likely to detect caffeine's disruptive effects when it's taken in the afternoon.
Sit with that for a second. The sleep loss was real and measurable. The people experiencing it would have told you, in good faith, that they slept fine. So "coffee in the afternoon doesn't affect my sleep" is not evidence that it doesn't. It is exactly what this research predicts you would say.
The authors' practical conclusion was that caffeine should generally be avoided after 5pm.
Part 4: What 24 trials say, and the detail everyone gets backwards
The 2023 meta-analysis I opened with pooled 24 controlled crossover trials covering roughly 340 participants. Here is what caffeine did on average, compared to control:
- Total sleep time: −45.3 minutes
- Sleep efficiency: −7.0% (the share of time in bed actually spent asleep)
- Deep sleep (N3/N4): −11.4 minutes, and down 1.4% as a proportion of the night
- Light sleep (N1): +6.1 minutes, and up 1.7% as a proportion
- Time to fall asleep: +9.1 minutes
Look at that last line next to the others. Nine minutes. That's the one everybody judges caffeine by — "I fell asleep fine, so it's fine" — and it's the measure caffeine affects least.
The real damage is elsewhere: three quarters of an hour of sleep gone, a seventh of your night in bed no longer spent asleep, and deep sleep traded for light sleep. None of that is visible from the inside. You fall asleep normally and wake up vaguely unrested, and nothing points at the coffee.
The model also quantified timing: every extra hour between the dose and bedtime reduced the sleep loss by about 2.8 minutes per unit of dose. Earlier genuinely is better, in a smooth and predictable way.
The cutoff times the authors derived
For a 10pm bedtime, aiming to avoid a significant reduction in sleep:
| Drink | Dose modelled | Cutoff |
|---|---|---|
| Black tea | 47 mg | No strict cutoff needed |
| Coffee | 107 mg | ~1:12pm |
| Pre-workout supplement | 217.5 mg | ~8:50am |
Two honest caveats. These come out of a statistical model for specific doses and one bedtime, so the suspiciously precise minutes are an artefact of the maths, not a biological threshold. And they're stricter than Drake's "nothing after 5pm," because they aim to avoid any significant reduction rather than the obvious disruption Drake was testing for.
But the two approaches point the same direction, and that direction is: earlier than you think. Somewhere between early afternoon and 5pm is the honest range, and where you land inside it depends on your dose and on the next section.
Part 5: Why your friend drinks espresso at 10pm and sleeps like a stone
They're probably not lying, and you're probably not imagining it either. Caffeine clearance varies enormously between people, mostly down to a liver enzyme called CYP1A2 and the genetic variants that govern how fast it works.
Watch what that does to the same cup of coffee — 200 mg at 2pm, measured at a 10pm bedtime:
| Metabolism | Half-life | Still circulating at 10pm |
|---|---|---|
| Fast | ~3 hours | 32 mg |
| Average | ~5 hours | 66 mg |
| Slow | ~8 hours | 100 mg |
Same coffee, same time, and the slow metaboliser goes to bed with triple the caffeine of the fast one. Variants in the adenosine receptor gene ADORA2A add another layer, affecting how strongly a given amount of caffeine is felt.
There's also tolerance. Drink caffeine daily and your body adapts — the alertness boost fades, which is why your two-cup habit stopped feeling like anything. The trap is assuming that adapting to the feeling means your sleep has adapted too. Drake's participants, who were unaware of an hour of lost sleep, suggest those are two different things.
So the practical answer to "how late is too late for me" isn't in any table. It's in Part 7.
Part 6: How much are you actually drinking?
Most people underestimate this badly, because the figures below are per 8 oz (about 240 ml) — and almost nobody drinks an 8 oz coffee. A large takeaway cup can be double or triple that.
| Drink | Caffeine (per 8 oz / 240 ml) |
|---|---|
| Brewed coffee | 95 mg |
| Espresso | 65 mg per 1.5 oz shot |
| Black tea | 47 mg |
| Green tea | 28 mg |
| Cola | 40 mg per 12 oz can |
| Energy drink | 85 mg (but typically sold as 16 oz = ~170 mg) |
| Decaf coffee | 4 mg |
The FDA considers 400 mg a day — about four brewed coffees — a safe amount for healthy adults. That's a ceiling for general health, not a sleep guideline; 400 mg taken at the wrong hour will wreck your night while sitting comfortably inside the limit.
Don't forget the quiet sources: strong tea, cola, chocolate, and a surprising number of over-the-counter painkillers and cold remedies.
Part 7: What to actually do
The goal here is not to quit coffee. Caffeine genuinely improves reaction time, mood and mental performance, and giving up something you enjoy is rarely the best available move.
1. Set a cutoff, and start at bedtime minus 8 hours. For an 11pm bedtime that's 3pm. If you suspect you're a slow metaboliser — caffeine hits you hard, a late cup leaves you wired, you're jittery on one cup — move it earlier.
2. Front-load the day. Put your largest dose in the morning, when it's doing real work and has all day to clear.
3. Make the afternoon cup decaf. At 4 mg it's a rounding error, and it keeps the ritual intact — which is honestly half of what the afternoon coffee was for.
4. Count your real intake for three days. Use the table above and actual cup sizes, not nominal ones. The number is usually higher than expected, and seeing it is more persuasive than any article.
5. Don't quit abruptly. Withdrawal brings headaches, low energy and irritable moods for several days. Reduce gradually, or just move your existing coffee earlier and change nothing else — that single adjustment does most of the work.
Run a 10-day test on yourself
Self-experiment beats averages, because you are the one person whose metabolism actually matters here.
- Days 1–5: keep your caffeine exactly as it is. Each morning, rate how rested you feel out of ten and note roughly how long it took to fall asleep.
- Days 6–10: same amount of caffeine, all of it before 1pm. Same two ratings each morning.
Compare the two averages. Watch the rested score more than the fell asleep score — Part 4 explains why. If there's a difference, you've found something no table could have told you.
Part 8: Better afternoon fixes than another coffee
That 3pm slump is real — it's partly a genuine dip in your circadian rhythm, not just tiredness. A few things address it without borrowing from tonight:
- Ten minutes of daylight outdoors. The single most effective and least appreciated option, and it supports your body clock at the same time. See How to Reset Your Circadian Rhythm.
- A short nap, done properly. Twenty minutes, early enough in the afternoon not to interfere with the night. How to Take the Perfect Power Nap has the timing.
- Movement. A brisk walk or a few flights of stairs shifts alertness faster than most people expect.
- Water and something to eat. Mild dehydration and a long gap since lunch both masquerade as needing caffeine.
- Changing your audio, not your chemistry. If the slump is really a focus problem, the right background sound does more for the next hour than a cup that costs you sleep. Best Music for Focus and Concentration covers what works.
And if the real issue is that you're tired every afternoon because your nights aren't working, caffeine is treating a symptom. How to Build a Relaxing Bedtime Routine, Why Do I Wake Up at 3am? and Foods That Help You Sleep address the cause.
A note on health: This article is general information, not medical advice. If you are pregnant or breastfeeding, take medication, or have a heart condition, high blood pressure, an anxiety disorder or any ongoing health concern, your safe caffeine level may be much lower than the general guideline — talk to your doctor rather than relying on a general figure. Persistent insomnia or daytime sleepiness that doesn't improve when you adjust your caffeine deserves proper assessment, since both can have causes that have nothing to do with coffee.
Sources
- Gardiner C, et al. The effect of caffeine on subsequent sleep: A systematic review and meta-analysis. Sleep Medicine Reviews, 2023 (24 controlled crossover trials, ~340 participants).
- 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.
- American Academy of Sleep Medicine — Sleep and Caffeine (half-life, deep sleep, tolerance and withdrawal).
- Harvard T.H. Chan School of Public Health, The Nutrition Source — Caffeine (content per drink, absorption, FDA 400 mg guidance, adenosine mechanism).
This article was created with the assistance of AI and reviewed by our team for accuracy. It is intended for general wellness and informational purposes only and is not medical advice.