How Long Caffeine Really Stays in Your Body: A Half-Life Guide
Caffeine has a half-life of about 5 hours, so an afternoon coffee lingers until bedtime. Learn to estimate residual caffeine, set safe limits, and time your last cup.
How Long Caffeine Really Stays in Your Body: A Half-Life Guide
Most people think caffeine wears off "in a couple of hours." It does not. The cup you drink after lunch is still measurably in your bloodstream when you climb into bed, and that is the single most common reason perfectly tired people lie awake at 1am wondering what went wrong. The fix is not willpower or a stronger pillow. It is arithmetic, and once you can do the arithmetic in your head, you start making better decisions about when to stop drinking coffee.
This guide walks through how caffeine actually clears from your body, why a 3pm coffee can still hurt sleep at 11pm, what a sensible daily ceiling looks like, and how to time your last cup. I have built a free caffeine calculator that does the decay math for you, but it is worth understanding the model first so the numbers mean something.
What "half-life" actually means
Caffeine follows first-order pharmacokinetics, which is a fancy way of saying it clears at a constant percentage per hour rather than a constant amount. The half-life is the time it takes for the amount in your blood to drop by half. For a healthy adult that average is about 5 hours, with a normal range of roughly 4 to 6 hours.
Here is the part that surprises people. A half-life of about 5 hours means half the dose is still in you after 5 hours, and a quarter is still there after 10 hours. It does not vanish at hour 6. So if you have 200mg of caffeine at 9am, you are carrying around 100mg at 2pm and 50mg at 7pm. That long tail is exactly why caffeine is so good at quietly sabotaging sleep: the part of the dose you forgot about is the part that gets you.
If you want to play with the raw decay curve for any substance, not just caffeine, the half-life calculator lets you punch in a starting amount and a half-life and watch it fall off over time. Caffeine is just one example of the same exponential pattern.
Why an afternoon coffee wrecks your sleep
Caffeine keeps you awake by blocking adenosine, the molecule that builds up across your waking hours and creates the pressure to sleep. When caffeine occupies those receptors, the sleep signal cannot land. The problem is not just falling asleep, either. Even when you do drift off, residual caffeine measurably cuts your deep slow-wave sleep, so you wake feeling like you slept badly even after a full eight hours.
The math makes the danger obvious. Take a single 95mg cup of brewed coffee at 4pm. With a 5-hour half-life, you still have roughly 47mg onboard at 9pm and about 24mg near midnight. Twenty-four milligrams is not nothing — it is enough adenosine-blocking to thin out your deep sleep. That "harmless" 4pm cup is a real cost, and the cost is invisible because it shows up six or seven hours later as restlessness you blame on stress.
A worked example: the 3pm coffee at bedtime
Let me make this concrete with the case I use myself. I am a 200mg-coffee-at-3pm person — a big mug, double-strength, right after lunch slows down. Here is what the decay looks like with a 5-hour half-life:
- 3pm: 200mg (the moment I finish it)
- 8pm: 100mg (one half-life later)
- 1am: 50mg (two half-lives later)
If my bedtime is 11pm, I am interpolating between 8pm and 1am — call it roughly 60mg still circulating when my head hits the pillow. The rough rule I use is that anything above about 50mg at bedtime is a likely sleep wrecker. Sixty milligrams is over that line, which means my 3pm habit was costing me sleep quality every single night and I never connected the two until I ran the numbers.
When I started logging it honestly, I moved that big coffee to 1pm. Same caffeine, two hours earlier, and the bedtime residual dropped to around 40mg — under the line. My sleep tracker stopped complaining. Nothing else changed. That is the whole point of estimating this stuff: small timing shifts beat heroic willpower.
What a safe daily limit looks like
The FDA cites 400mg per day as a ceiling for healthy adults that is generally not associated with negative effects — roughly four 8oz brewed coffees. That is a useful anchor, but treat it as a population guideline, not a personal target. Caffeine-sensitive people get jitters, a racing heart, or insomnia well below 400mg, and tolerance shifts the line over weeks of regular use.
Two groups should be more careful. Pregnant people are usually advised to stay under 200mg per day, partly because the half-life can roughly double during pregnancy, so each dose lingers far longer than the standard model suggests. Anyone with anxiety, heart-rhythm issues, or certain medications can react strongly to small amounts. None of this is medical advice — it is a starting framework, and you should check with a clinician for your own situation.
It also helps to know that the milligram counts you read are ballpark. Brewed coffee swings from about 70 to 140mg per cup depending on bean, roast, and grind. A single espresso is around 63mg, black tea about 47mg, cola about 34mg. Log your real drinks rather than trusting a single round number.
How to time your last cup
The practical takeaway is a single number: your caffeine cutoff time, the latest you can drink coffee and still be under roughly 50mg at bedtime. To find it, work backward from when you sleep using the half-life.
If you go to bed at 11pm and want under 50mg, a 95mg cup needs about one half-life (5 hours) to fall to 47mg — so 6pm is your edge, and earlier is safer. A bigger 150mg dose needs longer to decay below the line, pushing your cutoff back toward early afternoon. The stronger the cup and the earlier your bedtime, the earlier you have to stop.
Rather than do this in your head every day, log your drinks and your bedtime in the caffeine calculator and let it sum the decay of every dose and report the residual at lights-out. It even searches for the time you drop under 50mg, so you get your cutoff handed to you. If you want to go further and line up your wake time with your sleep stages, pair it with the sleep cycle calculator to pick a bedtime that respects both your caffeine tail and your 90-minute cycles.
The bottom line
Caffeine does not disappear when the alertness fades. With a roughly 5-hour half-life, half your dose survives 5 hours and a quarter survives 10, so a mid-afternoon coffee is genuinely still working against you at bedtime. Keep your daily total under a sensible ceiling, learn your personal cutoff time, and move your last cup earlier rather than relying on it clearing "by itself." The numbers are simple, they are in your favor, and they buy you better sleep for free.
Made by Toolora · Updated 2026-06-13