- Published on
- Last updated
- Updated
- · 8 min read
Caffeine and Sleep: Finding the Coffee Cutoff That Actually Works
A sleep-lab study found caffeine taken six hours before bed still cut sleep by about an hour — here is how I used that finding to pick a real cutoff without giving up coffee.
Founder & Editor, MindFuel Wellness
Here is the short answer: if you want caffeine out of your sleep's way, your last full-strength cup should land roughly eight or more hours before bed. For an 11 p.m. bedtime, that means wrapping up by early afternoon — and if you are on the sensitive end, before lunch.
That number is not a vibe. In the most-cited experiment on caffeine timing, researchers gave people 400 mg of caffeine at bedtime, three hours before bed, or six hours before bed. Even the six-hour dose shaved about an hour off their measured sleep. The detail that stuck with me: participants barely noticed the difference. Their sleep trackers did; their own reports did not.
The study that made me move my coffee
I used to treat 4 p.m. coffee as harmless because I fell asleep fine. Then I read the Drake study properly instead of skimming a headline about it. Forty-plus minutes of lost sleep from a dose taken six hours out, and the subjects consistently underestimated the damage. That gap between what people felt and what the monitors recorded is the whole problem: you can be running a quiet caffeine deficit for years and blame everything else.
Two honest caveats before you panic-toss your kettle. First, 400 mg is a big hit — roughly four cups of brewed coffee taken at once, which is not how most of us drink. Second, this was one lab study with a small group. Smaller doses earlier in the day almost certainly matter less. But the direction of the finding is hard to argue with: caffeine reaches further into the night than it feels like it does.
Half-life, minus the chemistry lecture
Caffeine leaves your body on a slow curve, not a cliff. The FDA cites a half-life of four to six hours; the clinical reference literature puts the average around five, with a wide range on either side. Half-life means exactly what it sounds like — after that many hours, half the dose is still circulating. After two half-lives, a quarter. It never hits zero on a schedule; it just fades.
The range is the part people skip. Genetics, pregnancy, some medications, and age can stretch clearance dramatically, which is why your friend drinks espresso after dinner and sleeps like a stone while your 2 p.m. tea keeps you buzzing. Neither of you is imagining it. It also means no article — including this one — can hand you a universal cutoff time. It can only hand you a starting point and a way to test it.
What is still in your blood at 11 p.m.
Rough math using a five-hour half-life, for a single 100 mg cup (a typical mug of brewed coffee), assuming an 11 p.m. bedtime:
| Last cup at | Hours before bed | Approx. caffeine left at 11 p.m. |
|---|---|---|
| 8 a.m. | 15 | ~12 mg |
| 10 a.m. | 13 | ~16 mg |
| 12 p.m. | 11 | ~22 mg |
| 3 p.m. | 8 | ~33 mg |
| 5 p.m. | 6 | ~44 mg |
These are approximations, and slow metabolizers can carry considerably more. But notice the shape of it: the 5 p.m. cup leaves nearly half its caffeine on board at lights-out. Nobody would knowingly drink half a coffee in bed. That is effectively what late-afternoon coffee does.
"But I fall asleep fine after espresso"
Maybe you do. Fast metabolizers genuinely exist, and I am not interested in pretending everyone is fragile. But falling asleep is the least sensitive test there is. Caffeine's more common trick is quieter: lighter sleep, more brief awakenings, less of the deep slow-wave stuff that makes morning feel like morning. In the Drake study, sleep onset was not the only casualty — total sleep and sleep quality took the hit, and again, people did not feel it happening.
My own tell was the 3 a.m. wake-up. For a stretch of last year I kept surfacing in the small hours, wide awake for no reason, and blamed stress. On a whim I moved my last coffee to before lunch and kept everything else identical. Within about a week the 3 a.m. wake-ups mostly stopped. Not a controlled trial, obviously — one guy, one variable, no placebo. But it cost me nothing to test, and that is rather the point.
Run the experiment on yourself
Here is the protocol I would give a friend. Pick a cutoff — say 1 p.m. — and hold it for one full week. Do not change anything else. Each morning, rate how rested you feel out of five before you touch your phone. If the week looks better, you have your answer. If nothing budges, either move the cutoff earlier and repeat, or accept that caffeine may not be your bottleneck and look at your evening routine instead.
I built a small calculator so you can skip the napkin math — plug in your usual drinks and bedtime and it estimates how much caffeine is still circulating when you turn out the light.
Interactive tool
Caffeine cutoff calculator
Estimates your latest low-regret caffeine time from a ~5-hour average half-life. Individual clearance varies widely (roughly 1.5–9.5 hours), so treat this as a starting point, not a rule.
Last caffeine by about 5:52 PM — roughly 4.6 hours before your 10:30 PM bedtime, for ~95 mg to decay below your ~50 mg comfort level.
Simplified model for healthy adults; pregnancy, some medications, and liver conditions slow caffeine clearance substantially. General information, not medical advice.
It lives with the rest of the site's free tools if you want to come back to it later. Treat its output as a starting hypothesis, not a verdict — your genes did not fill in the form.
The caffeine you are not counting
The classic way to ruin this experiment is to quit afternoon coffee and keep afternoon everything-else. Black and green tea, cola, energy drinks, dark chocolate, pre-workout powders, and some headache tablets all carry caffeine, sometimes plenty of it. An "afternoon without coffee" that includes an energy drink at 4 p.m. is not an experiment; it is a rebrand.
For overall intake, the FDA's guidance is that around 400 mg a day is generally fine for healthy adults — the issue in this article is not how much, but when. You can stay well under 400 mg and still sabotage your night by back-loading it. Front-load instead: I now put most of my caffeine before 11 a.m., when it does the most good and the least harm.
What I reach for at 3 p.m. now
The slump that used to send me to the coffee machine did not disappear when I moved my cutoff — I just had to handle it differently. A ten-minute walk outside works embarrassingly well, partly because daylight is its own alertness signal; that logic is the backbone of my morning light routine too. A glass of water handles the surprising number of slumps that are really mild dehydration. And decaf, which has come a long way, covers the ritual itself — it turns out half of what I wanted from afternoon coffee was the warm mug and the pause, not the drug.
If your mid-afternoon crash is severe and daily, timing tweaks may not be enough on their own; I wrote separately about the afternoon energy slump and what actually moves it.
FAQ
How many hours before bed should I stop drinking caffeine?
Eight or more hours is a sensible default for a full cup of coffee, based on the six-hour dose still disrupting sleep in the Drake study plus a margin for smaller-but-real effects. Sensitive people may need ten to twelve. The only reliable way to find your number is a one-week test at a fixed cutoff.
Can caffeine affect my sleep even if I fall asleep easily?
Yes — this is the best-documented trap. Lab studies show caffeine can reduce total sleep time and deep sleep even when people report sleeping normally. Falling asleep fast tells you about sleep pressure, not about what caffeine does to the rest of your night.
How much caffeine per day is too much?
The FDA suggests healthy adults generally tolerate around 400 mg a day — roughly four brewed cups — though pregnancy, medications, and health conditions change that, so check with a clinician if any apply. For sleep specifically, timing matters at least as much as total.
References
- Drake C, et al. — "Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed", Journal of Clinical Sleep Medicine, 2013. https://jcsm.aasm.org/doi/10.5664/jcsm.3170
- FDA — "Spilling the Beans: How Much Caffeine Is Too Much?", U.S. Food and Drug Administration. https://www.fda.gov/consumers/consumer-updates/spilling-beans-how-much-caffeine-too-much
- StatPearls (NCBI Bookshelf) — "Caffeine". https://www.ncbi.nlm.nih.gov/books/NBK519490/
- Watson NF, et al. — "Recommended Amount of Sleep for a Healthy Adult" (AASM/Sleep Research Society consensus), Journal of Clinical Sleep Medicine, 2015. https://jcsm.aasm.org/doi/10.5664/jcsm.4758
- CDC — "About Sleep". https://www.cdc.gov/sleep/
This article is general information from a curious layperson, not medical advice — if caffeine triggers palpitations, anxiety, or persistent sleep problems for you, talk to a clinician, and see our medical disclaimer.
Keep reading
Morning Light: The Ten-Minute Habit That Reset My Sleep
Ten minutes of outdoor light within an hour of waking is one of the cheapest sleep interventions there is — the lux numbers, the camping study behind it, and how I fit it into real mornings.
Why 3 P.M. Hits So Hard — and a 20-Minute Plan That Actually Helps
The afternoon slump is scheduled by your circadian clock, not caused by weakness — here is a 20-minute counterplan built from lunch, light, a short walk, and smarter caffeine timing.
Screens Before Bed: What the Evidence Actually Says (and What I Do Instead)
Blue light is real but smaller than the headlines claim — the bigger sleep thieves are what you watch and how long it keeps you up, and fixing those is a different job entirely.