Caffeine Half-Life and Sleep: Why Your 2 PM Coffee Is Still Working at Midnight
Medically reviewed for accuracy by Dr. Bruce Rubinowicz, Board-Certified Neurologist & Sleep Medicine Specialist

Quick Answer
Caffeine does not create energy; it blocks adenosine, the molecule your brain uses to track how long you have been awake, so it hides tiredness rather than erasing it. Because caffeine's half-life averages about five hours in adults, a 200 mg coffee at 2 PM leaves roughly 100 mg in your system at 7 PM and about 50 mg at midnight, which is close to half a cup of coffee at lights-out. Controlled research shows this matters even for people who fall asleep easily: 400 mg of caffeine taken a full six hours before bed cut objectively measured sleep by more than an hour while participants did not notice the loss, and a 2023 meta-analysis found caffeine reduced total sleep time by 45 minutes and trimmed deep sleep. The same meta-analysis calculated that a standard cup of coffee should end about 8.8 hours before bedtime. Individual clearance varies widely, from about 3 to 10 hours, largely because of differences in the CYP1A2 liver enzyme, so the honest answer is a conservative cutoff of bedtime minus 8 to 10 hours, then a two-week personal experiment to find your own line.
"I can drink an espresso after dinner and fall asleep in ten minutes." Everyone has an uncle who says this, and plenty of people say it about themselves. The claim is usually true. It's also mostly beside the point, because falling asleep is the one part of the night that late caffeine damages least. What an afternoon coffee takes is the depth underneath, and depth is the part you can't feel.
Two pieces of physiology decide all of this: what caffeine actually does in your brain, and how slowly your body clears it. Neither is complicated. Run the arithmetic on an ordinary 2 PM coffee and the case for moving your last cup earlier mostly makes itself.
Tape Over the Fuel Gauge
All day long, as a byproduct of simply being awake and burning energy, your brain accumulates a molecule called adenosine. Rising adenosine is a big part of what sleep scientists call sleep pressure — the steadily building drive to sleep that makes 11 PM feel different from 11 AM. Adenosine is now widely accepted as a sleep-regulatory substance in its own right, and caffeine works by parking itself in adenosine's receptors so the signal can't land, which is why it reduces sleepiness (Reichert and colleagues, 2022).
Notice what's missing from that mechanism: energy. Caffeine adds no fuel to your system and can't substitute for the sleep you skipped. Caffeine doesn't drain the tank of tiredness. It puts tape over the gauge.
And while the tape is on, adenosine keeps accumulating in the background. The coffee never stopped the buildup, only the reading. So the question that decides your night isn't whether caffeine works — it obviously does — but how long the tape stays on.
The Math on a 2 PM Coffee
Caffeine is absorbed fast, reaching peak blood levels within about 20 to 40 minutes, then leaves slowly. In healthy adults the half-life averages roughly 5 hours, meaning every five hours or so your body clears about half of whatever caffeine remains (Evans and colleagues, StatPearls, 2024).
Take a concrete case: you finish 200 mg of caffeine at 2 PM. That's a large coffee, or about two standard cups by the research convention of roughly 107 mg per 250 mL cup. With a five-hour half-life, about 100 mg is still on board at 7 PM. At midnight, about 50 mg. At 5 AM, you're still carrying roughly 25 mg.
Fifty milligrams is close to half a cup of coffee. Nobody drinks half a cup of coffee at midnight and expects nothing to happen, yet the 2 PM version of the same chemistry gets a pass, because the drinking and the sleeping feel like separate events. Your adenosine receptors don't experience them as separate events.
And that's the average case. The documented range of caffeine half-life runs from about 3 to 10 hours between individuals (StatPearls, Caffeine Toxicity). Here's the same 200 mg coffee across that spread, all figures approximate:
| Time | Fast metabolizer (~3.5 hr half-life) | Average (~5 hr half-life) | Slow (~8 hr half-life) |
|---|---|---|---|
| 2 PM, cup finished | 200 mg | 200 mg | 200 mg |
| 7 PM | ~75 mg | ~100 mg | ~130 mg |
| Midnight | ~30 mg | ~50 mg | ~85 mg |
| 5 AM | ~10 mg | ~25 mg | ~55 mg |
A slow metabolizer going to bed at midnight is doing so with the better part of half their afternoon coffee still circulating; a fast metabolizer is carrying a fraction of that. Same cup, same clock, completely different night.
When Researchers Actually Timed It
The cleanest test came from a 2013 study in the Journal of Clinical Sleep Medicine (Drake et al.), which gave people 400 mg of caffeine — roughly the dose in a large gas-station coffee or two energy drinks — at bedtime, 3 hours before bed, or 6 hours before bed, against a placebo, double-blind, with objective sleep monitoring at home. All three timings significantly disrupted sleep compared to placebo. The condition worth memorizing is the 6-hour one: caffeine taken a full six hours before bed cut objectively measured total sleep time by more than an hour, and the participants' own reports barely registered the loss.
They lost an hour of sleep and didn't notice.
Zoom out from one study and the picture holds. A 2023 meta-analysis in Sleep Medicine Reviews (Gardiner and colleagues) pooled 24 studies and found caffeine reduced total sleep time by 45 minutes and sleep efficiency by 7 percent, while adding about 9 minutes to the time it took to fall asleep and 12 minutes of wakefulness after sleep onset. The shape of that damage matters. The falling-asleep penalty, 9 minutes, is the small piece; the bigger losses are in how long and how solidly you stay asleep, which is the part self-assessment misses.
The same meta-analysis ran the timing math in reverse and produced the most useful number in this whole literature: to avoid losing total sleep time, a standard cup of coffee should be finished at least 8.8 hours before bedtime, and a typical pre-workout dose of about 217 mg needs roughly 13.2 hours. The evidence-based buffer for one cup, in other words, sits closer to "nothing after lunch" than to the folk wisdom of "nothing after 4 PM."
"I Fall Asleep Fine After Coffee"
Back to the espresso-at-dinner crowd. When someone says coffee doesn't affect their sleep, they're reporting one metric: how fast they fell asleep. That's the metric caffeine disturbs least, and it's the only one you can consciously observe. The rest of the night is where the bill gets paid.
A 2017 systematic review in Sleep Medicine Reviews (Clark and Landolt) looked across epidemiological studies and randomized trials and found a consistent pattern: caffeine prolonged sleep latency, reduced total sleep time and sleep efficiency, and worsened perceived sleep quality, but it also specifically reduced slow-wave sleep and the slow-wave brain activity that goes with it, while increasing light stage-1 sleep, wakefulness, and arousals. Slow-wave sleep is the deep, physically restorative portion of the night; caffeine shaves it down and backfills with lighter sleep and more brief awakenings. In the 2023 meta-analysis, deep sleep lost about 11 minutes per night on average. None of that shows up in "I fell asleep in ten minutes."
It's also why late caffeine belongs on the suspect list if you keep surfacing in the small hours. More arousals and more wake after sleep onset are the fingerprint late caffeine leaves, and they stack on top of the other physiology behind middle-of-the-night wakeups covered in why you wake up at 3 AM. The review also noted that older adults appear more sensitive to caffeine's sleep effects than younger adults, so a habit that cost nothing at 30 may be costing something at 60, even while falling asleep still feels easy.
Why Your Friend Gets Away With It
So is the dinner-espresso person lying? Not necessarily. The individual variation here is real, and it's large.
About 95 percent of the caffeine you ingest is metabolized by a single liver enzyme, CYP1A2, and a common genetic polymorphism in that enzyme makes caffeine pharmacokinetics highly variable from person to person (Nehlig, 2018). That's the fast-versus-slow metabolizer split in the table above, and it's mostly inherited. Life circumstances move the number too: smoking can shorten the half-life by up to half (one of the very few favors cigarettes do anyone), pregnancy can stretch it to as long as 15 hours in the final trimester, and some medications that share the same metabolic machinery slow clearance substantially (Evans and colleagues, StatPearls, 2024). On top of clearance speed, Clark and Landolt's review points to genetic differences in the adenosine system itself, meaning two people with identical blood caffeine levels can feel it differently at the receptor.
Population averages, then, are a starting line, not a verdict. A true fast metabolizer with insensitive receptors may genuinely tolerate an afternoon coffee. The catch, and Drake's study makes this point sharply, is that you can't trust your own impression to tell you which kind of person you are, because the losses land while you're unconscious.
Finding Your Own Cutoff
One number, then one experiment.
The number: last caffeine at bedtime minus 8 to 10 hours. For a 10:30 PM bedtime that puts the cutoff between 12:30 PM and 2:30 PM, which sits right on top of the meta-analysis figure of 8.8 hours for a single cup. If your caffeine comes in bigger units (energy drinks, pre-workout), the buffer stretches toward 13 hours, which in practice means morning only.
Then front-load. Nothing in this article is an argument against coffee, and caffeine finished before roughly 10 AM gives even a slow metabolizer a long runway before a normal bedtime. Anchoring your intake to the early part of the day also slots naturally into the same early-light-and-movement window described in the first-90-minutes morning framework, and the whole question of evening interference mostly disappears.
The experiment, because your half-life isn't the average and no article can tell you what it is: for two weeks, hold your bedtime steady and enforce a hard caffeine cutoff at your bedtime-minus-10 mark. Change nothing else. Each morning, note how rested you feel on waking and any wakeups you remember. If mornings improve, you have your answer, and you can relax the cutoff an hour at a time until you find your personal line. If two disciplined weeks change nothing, you may really be a fast metabolizer, and you keep your afternoon cup with a clear conscience. Either way, you're working from your own data now.
The Bottom Line
None of this is medical advice. Sleep that's been broken for months, loud snoring with gasping, or daytime exhaustion that won't lift deserves a clinician, not another rule about coffee. If you're pregnant or take medications, caffeine clears more slowly, so check with a physician or pharmacist about what's sensible for you.
Sources
Frequently Asked Questions
How many hours before bed should you stop drinking coffee?
For a standard cup (about 107 mg of caffeine), at least 8.8 hours before bedtime — that's the cutoff a 2023 meta-analysis in Sleep Medicine Reviews calculated, with a large pre-workout dose (about 217 mg) needing roughly 13 hours. A practical everyday rule is bedtime minus 8 to 10 hours, so a 10:30 PM bedtime puts the last cup around noon to 2:30 PM. Clearance speed varies several-fold between people, so treat that as a starting point and adjust from your own two-week test.
How long does caffeine stay in your system?
The average half-life in healthy adults is about 5 hours, with documented values running from roughly 3 to 10 hours depending on genetics, smoking, pregnancy, and medications. In practice, a 200 mg coffee at 2 PM leaves about 100 mg at 7 PM, 50 mg at midnight, and 25 mg at 5 AM for an average metabolizer. Slow metabolizers can still be carrying a quarter or more of an afternoon dose at bedtime.
Does caffeine hurt sleep even if you fall asleep fine?
Yes. Falling asleep is the metric caffeine disturbs least, so "I dropped off in ten minutes" proves less than it seems. In a controlled 2013 study, 400 mg of caffeine taken six hours before bed reduced objectively measured sleep by more than an hour while participants reported their sleep as basically normal, and reviews consistently find caffeine cuts deep slow-wave sleep and increases nighttime arousals — losses you can't feel from the inside.
Why does coffee affect some people so much more than others?
Mostly one liver enzyme. CYP1A2 metabolizes about 95 percent of the caffeine you ingest, and common genetic variants make some people clear it several times faster than others. Smoking roughly halves the half-life, pregnancy can stretch it to as long as 15 hours, and some medications slow it too. There are also genetic differences in the adenosine receptors caffeine blocks, so both clearance speed and brain sensitivity vary person to person.
Is morning coffee bad for your sleep?
For most people, no. Caffeine finished in the first half of the morning has 14 or more hours to clear before a typical bedtime, which is beyond even the conservative cutoffs in the research. Timing is the problem far more often than the coffee itself — which is why shifting your intake earlier is usually a better experiment than quitting outright.

From Risachi
Sleep Collection Gummies
20mg CBN + 15mg CBG + 500mg Montmorency tart cherry per gummy. Melatonin-free.
- Melatonin-free — no morning fog
- Third-party lab tested, COA published
- Vegan, non-habit forming
$39.9924 Gummies per bottle
60-day money-back guarantee · Bundle savings available
Reading List
Get the next breakdown before anyone else
New sleep-science articles and lab-testing explainers, reviewed by a board-certified sleep-medicine physician. No daily email.
Educational content only — not medical advice. Unsubscribe anytime.