PlentaHealth

Plainly written health guides, with the evidence graded

Sleep

How Long Does Caffeine Actually Keep You Awake Before Bed?

The common advice — stop caffeine by early afternoon — is built on one average adult's clearance rate. Whether that fits your own bedtime depends on a number that varies enormously between people.

By Bram Ferreiro, Contributor, sleep and stressFirst published 18 September 2026Moderate evidence

The short answer

Caffeine's half-life is roughly five hours in a typical adult, so about a quarter of an afternoon dose is still active ten hours later and about an eighth remains after fifteen hours, per NIH-hosted pharmacology reference data. That clearance rate runs up to about three times longer in the third trimester of pregnancy and up to twice as fast in smokers, which is why a single cutoff hour fits some people and badly undershoots others.

A coffee at two in the afternoon does not vanish from your system by dinner. It fades on a curve, and the curve has a name — half-life — attached to a specific number that most “cut off caffeine by early afternoon” advice never actually shows you.

The number underneath the advice

Caffeine’s half-life in a typical adult is approximately five hours, according to pharmacology reference material hosted by the National Library of Medicine. That single figure is the entire basis for every “stop by such-and-such time” rule you have ever read, and it is worth seeing what it actually implies rather than taking the rule on faith.

Half-life means exponential decay, not a countdown to zero. Each five-hour block clears half of whatever caffeine remains, not half of the original dose:

Time since your last dose Roughly how much caffeine is still active
0 hours All of it
~5 hours (one half-life) About half
~10 hours (two half-lives) About a quarter
~15 hours (three half-lives) About an eighth

Run that against a real evening. A coffee at 2 p.m. and a midnight bedtime is a ten-hour gap — two half-lives — which puts roughly a quarter of that dose still circulating when you turn out the light. Push the same coffee to 4 p.m. with the same midnight bedtime and you have only shaved the gap to eight hours, which is still short of even two full half-lives. The popular rule of thumb is not wrong; it is just doing arithmetic on an average that may not be your average.

What caffeine is actually blocking

It helps to know what that remaining quarter or eighth is doing, because “still in your system” undersells the mechanism.

Across a waking day your brain steadily builds up adenosine, a molecule that binds to receptors and produces the physical sensation of sleep pressure — the heavier, foggier pull toward bed the longer you have been awake. Caffeine crosses into the brain and occupies those same receptors, particularly the A2a subtype, without activating them. The adenosine is still there and still accumulating; caffeine simply keeps it from docking and reporting in.

That is a meaningfully different mechanism from a stimulant that adds energy. Caffeine does not increase alertness from a baseline of zero — it delays your access to information your own body already has. Which is also the reason a caffeine crash exists: when the blockade wears off, the adenosine that built up underneath is often still there, sometimes now joined by more, and it reaches its receptors all at once instead of gradually.

Why the average is a bad fit for a lot of people

Five hours is a population average, and the individual range sitting underneath it is wide enough that the same coffee at the same hour genuinely means different things for different people. A few factors that shift the number materially, all from the same pharmacology reference:

Factor Effect on half-life
Smoking Shortened, by up to roughly 50%
Third trimester of pregnancy Lengthened, to as much as roughly 15 hours
Liver disease or enzyme-inhibiting medications Lengthened, from reduced activity of the liver enzyme that breaks caffeine down

A smoker’s 2 p.m. coffee may be almost fully cleared by a midnight bedtime. The same coffee, at the same hour, in someone in their final trimester of pregnancy could still be close to half-active at that same midnight — a genuinely different night from an identical cup. Liver disease and certain medications move the number for a related reason: caffeine is broken down by a liver enzyme, and anything that slows that enzyme down slows clearance with it. None of this shows up by looking at the drink. It shows up only in how the night goes.

How much matters alongside when

The half-life curve describes one dose fading on its own. It says nothing about a second or third dose landing on top of it before the first has cleared.

The U.S. Food and Drug Administration lists about 400 milligrams a day — roughly two to three 12-ounce cups of coffee — as an amount not generally associated with negative effects in healthy adults, and lists insomnia and sleep disruption among the signs that intake has run past what a person’s system is handling well. That figure describes a whole day’s total, not a single dose, which is the part a strict cutoff-hour rule tends to miss. A morning coffee, an afternoon energy drink and an evening square of dark chocolate each start their own five-hour decay on their own schedule, but the doses overlap rather than reset, so a later hit lands on whatever the earlier ones left circulating rather than starting from a clean baseline.

One reassurance worth stating plainly, because the language of “still in your system” can sound worse than it is: caffeine does not build up day over day the way some substances do. MedlinePlus describes it as leaving the body in urine over a period of many hours rather than being stored, so yesterday’s coffee is not still present in tomorrow’s evening bloodstream. Each day’s clearance clock effectively resets with sleep. When timing becomes a real problem, it is a same-day total-and-timing issue, not a slow accumulation across the week.

The part that stays honest rather than tidy

It would be satisfying to close with “so stop caffeine by X o’clock,” and that is exactly the kind of tidiness this piece is trying to avoid. The five-hour figure and the adenosine mechanism are well-characterized pharmacology, sourced above. The leap from that figure to a single recommended cutoff hour is arithmetic you can run for your own bedtime, not a published guideline handed down by a health authority — the CDC’s own sleep-hygiene advice stops at “avoid caffeine in the afternoon or evening,” and stops there for a reason. It does not name an hour because an hour that is honest for a non-smoker with normal liver function is not honest for someone in later pregnancy or on an enzyme-inhibiting medication.

That is also why this entry is graded moderate rather than strong. The clearance curve and the receptor mechanism are solid. What a reader actually wants — “so when should I personally stop” — sits one inferential step further out, built from that curve rather than measured directly for every situation it gets applied to.

Reasoning about your own evening

The useful version of this is not a rule, it is a method. Take your usual bedtime and count backward using the table above rather than a fixed hour: two half-lives, roughly ten hours, gets you to about a quarter of a dose still active; three half-lives, roughly fifteen hours, gets you to about an eighth. Then adjust for whichever column in the second table applies to you — smoking shortens the whole curve, later pregnancy or an enzyme-affecting medication stretches it.

Two details worth keeping separate while you do that math. First, caffeine content varies far more across drinks than the half-life number does — a strong brewed coffee can carry two or three times the caffeine of a cup of black tea, so “one drink” is not a fixed dose to begin with. Second, “no longer able to keep you awake” and “no longer doing anything to your sleep” are not the same claim. The mechanism above — adenosine receptors still partially blocked — does not stop mattering the moment you can technically fall asleep; it simply becomes harder to notice, and this piece has deliberately not extended into a specific claim about sleep quality that the sources above do not make.

If none of that arithmetic changes anything — if you already avoid caffeine for a long stretch before bed and sleep is still not working — the next step is describing the pattern to a clinician rather than adjusting the numbers again. Caffeine timing is a lever with real limits, and it is not the only one in the room.

When to stop reading and see someone

A racing, pounding, or irregular heartbeat, chest pain, or a panic-like surge after caffeine is a reason to get checked rather than adjust your cutoff time — caffeine can unmask an underlying heart rhythm issue or anxiety condition that a timing change will not fix. And if you have dropped caffeine entirely for two weeks and still cannot fall or stay asleep most nights, the cause has moved past caffeine and is worth describing to a clinician rather than re-running the arithmetic.

Questions we get

How many hours before bed should I stop drinking caffeine?

There is no single official cutoff hour, because the honest answer is arithmetic rather than a rule. With an average half-life of about five hours, caffeine taken at 2 p.m. still has roughly a quarter of its dose active by midnight and around an eighth left by 3 a.m. The CDC lists avoiding caffeine in the afternoon or evening as a sleep-hygiene habit rather than naming a specific hour, and that vagueness is accurate — the right cutoff depends on your own clearance rate and your own bedtime, not a number that works for everyone.

What exactly is caffeine's half-life, and how long does it actually stay in your body?

Half-life is the time it takes your body to clear half of what is circulating, and NIH-hosted pharmacology references put caffeine's half-life at approximately five hours in a typical adult. Clearance is exponential rather than linear: after one half-life, about five hours, roughly half the dose remains; after two half-lives, about ten hours, roughly a quarter remains; after three, about fifteen hours, roughly an eighth remains. Caffeine does not switch off at one moment — it fades on a curve, which is why a late-afternoon coffee still has a measurable amount on board at a normal bedtime for most adults.

Does caffeine actually wake you up, or does it just hide how tired you already are?

Mechanistically it is closer to the second description. Through the day your brain builds up adenosine, a molecule that binds to receptors and produces the pressure to sleep, and caffeine works by blocking those same receptors — specifically the A2a subtype is responsible for its wakefulness effect — so the tiredness signal cannot dock even though the underlying pressure keeps building. Caffeine does not add energy so much as delay the sensation of needing it, which is also why the fatigue is often still there, sometimes more noticeable, once the blockade wears off and the accumulated adenosine finally reaches its receptors.

Why does the same cup of coffee keep some people awake and barely affect others?

Because the five-hour average half-life is exactly that, an average, and the real spread between individuals is wide. NIH-hosted pharmacology data describes caffeine's half-life as up to roughly 50% shorter in smokers, and as long as roughly 15 hours, about three times the average, in the third trimester of pregnancy; liver disease and certain enzyme-inhibiting medications slow clearance for a related reason, reduced activity of the liver enzyme that breaks caffeine down. None of that is visible on the cup itself, which is why identical intake produces such different nights for different people.

Where the figures came from

  1. NCBI Bookshelf (StatPearls) — "Caffeine," National Library of Medicine, National Institutes of HealthCaffeine's half-life is approximately 5 hours in a typical adult, is reduced by up to 50% in smokers, and can extend to as much as 15 hours in the third trimester of pregnancy or with reduced liver enzyme activity from liver disease or enzyme-inhibiting medications.
  2. NCBI Bookshelf (StatPearls) — "Caffeine," National Library of Medicine, National Institutes of HealthCaffeine crosses the blood-brain barrier and antagonizes adenosine receptors (A1, A2a, A2b, A3); blockade of the A2a receptor specifically is responsible for caffeine's wakefulness effect.
  3. U.S. Food and Drug Administration — "Spilling the Beans: How Much Caffeine Is Too Much"400 mg of caffeine a day, about two to three 12-fluid-ounce cups of coffee, is an amount not generally associated with negative effects in healthy adults, and insomnia or sleep disruption is listed among the signs of consuming too much.
  4. CDC — About SleepAvoiding caffeine in the afternoon or evening is listed as a recommended sleep-hygiene habit.
  5. MedlinePlus — Caffeine in the DietCaffeine does not accumulate in the bloodstream or get stored in the body; it leaves the body in the urine over a period of many hours, and difficulty sleeping is listed among its effects.

Bram Ferreiro

Contributor, sleep and stress

Bram writes the sleep and stress entries. His working assumption is that anyone searching these topics has already read the standard advice and wants to know which parts of it are actually supported. He is not a clinician and holds no medical qualification, and he is careful to separate what is well established from what is a plausible mechanism with thin human evidence behind it.

More in Sleep

Does Blue Light From Your Phone Actually Ruin Your Sleep?

The mechanism connecting light to melatonin is one of the best-established findings in sleep biology. Whether an ordinary evening of phone use delivers enough of it to be the reason you're still awake is a narrower, murkier question.

How Many Hours of Sleep Do You Actually Need?

The line everyone repeats is 'eight hours.' The number actually published is a range that shifts by decade of life, and the harder question isn't which target to hit — it's what a night below it really costs you.

REM Sleep vs. Deep Sleep: What's the Real Difference?

Both stages get called 'the important one' by different corners of the internet, as if a night had to pick a winner. What each stage actually is — and which one's absence is the real red flag — is a sharper question than ranking them.