How long does caffeine stay in your system?
How long does caffeine last? Learn caffeine's half-life, why an afternoon coffee still disturbs your sleep, and what makes it clear faster or slower.
Caffeine has a half-life of roughly 4 to 6 hours in a typical adult, so about half of what you drink is still circulating five hours later, and a quarter is still there after ten. That is why an afternoon coffee can quietly follow you to bed. Most of a dose is cleared within about 10 to 12 hours, but “most” is not “all,” and the tail end lands right around bedtime for anyone who drinks caffeine in the afternoon.
The single number that explains this is half-life, and it varies more between people than almost anything else about caffeine. Here is how it works and what it means for your sleep.
Half-life and quarter-life, plainly
Half-life is the time your body takes to clear half of a dose. Say you drink a coffee with about 100 mg of caffeine at 3pm and your half-life is 5 hours:
| Time | Caffeine still active |
|---|---|
| 3pm (drink it) | 100 mg |
| 8pm | 50 mg |
| 1am | 25 mg |
| 6am | 12 mg |
After one half-life, half is gone. After two half-lives, the “quarter-life,” a quarter is still working. Notice that even by 1am there is still roughly a quarter of the original dose active, which for many people is enough to lighten their sleep. This is the core reason the timing of your last drink matters more than the size of it. A big coffee at breakfast clears long before bed; a smaller one at 4pm does not.
Why it still hurts a night’s sleep
There are two separate problems. The first is falling asleep: residual caffeine blocks the brain signals that make you feel sleepy, so you lie there wired. The second is sneakier. Caffeine can reduce the amount of deep, restorative sleep you get even when it does not stop you dropping off. You sleep the hours, feel like you slept, and still wake groggy, then reach for more caffeine to compensate. That is how a coffee habit and poor sleep quietly reinforce each other.
Our companion guide, caffeine and sleep: when to have your last coffee, goes deeper on finding your personal cutoff and the hidden sources that catch people out, from tea and cola to pre-workout and chocolate.
What changes your personal clearance rate
The 4 to 6 hour figure is an average. Your own half-life could be much shorter or much longer, and the biggest driver is genetics. Variation in the CYP1A2 liver enzyme means some people are fast metabolizers who clear caffeine in a few hours, while others are slow metabolizers who hold onto it for far longer. This is largely why one friend can drink espresso after dinner and sleep fine while another is wired by a lunchtime cup.
Other factors push your clearance up or down:
- Pregnancy slows caffeine clearance considerably, and the half-life can lengthen a lot, particularly in later pregnancy.
- Certain medications, including some hormonal ones, slow metabolism so caffeine lingers longer.
- Smoking tends to speed clearance, which is one reason people who quit sometimes feel more jittery on their usual coffee.
- Age and liver health affect the pace as well, since the liver does the clearing.
Because of all this, there is no universal “safe” time that works for everyone. The reliable move is to learn your own response rather than copy someone else’s tolerance.
How long until it is really gone
As a rough guide, expect the bulk of a dose to clear in about 10 to 12 hours for a typical adult, longer if you are a slow metabolizer or in one of the categories above. That is why a common rule of thumb is to stop caffeine by early afternoon, roughly 8 hours before bed, so most of it has cleared by the time you want to sleep. Sensitive people and slow metabolizers should cut off earlier still.
You cannot rush the process. Despite the myths, water, a cold shower, food, or a walk will not meaningfully speed your liver up. The only dependable lever is when you drink it. The caffeine calculator does the arithmetic for you: enter your drink and the time you had it, and it estimates how much is still active at your bedtime and the latest time to have your last one. It is the fastest way to see whether that 3pm cold brew is the reason you are staring at the ceiling.
Tie it back to your sleep
Cutting caffeine off earlier is one of the highest-return sleep habits, but it works best when you can actually see its effect on your nights. Our better sleep planner lets you log whether you had caffeine late alongside each night’s sleep quality, then shows how those nights compare with your caffeine-free ones, so the connection stops being a hunch. It runs entirely on your device, with no account and nothing sent anywhere.
If your late coffee is a patch over short nights, it is worth reading about sleep debt and confirming how much sleep you actually need, so you are fixing the cause rather than caffeinating the symptom.
When to check with a clinician
This is general education, not medical advice. If caffeine makes your heart race, spikes anxiety, or triggers other symptoms, or if you are pregnant, taking regular medication, or managing a heart condition, talk to your own clinician about what is appropriate for you rather than relying on a general rule. Persistent insomnia that continues even after you clean up your caffeine timing is also worth a professional look.
Your next step: note the time of your last caffeine today, then run it through the caffeine calculator to see how much is still with you at lights-out. If the number surprises you, move that last cup earlier tomorrow.
Frequently asked questions
How long does caffeine last in your body?
Caffeine's half-life is roughly 4 to 6 hours in a typical adult, so about half of a dose is gone in that time and a quarter remains after two half-lives. Most of it is cleared within about 10 to 12 hours, but a meaningful amount can still be active at bedtime if you drank it in the afternoon.
What is caffeine's half-life?
Half-life is the time it takes your body to clear half of a dose. For caffeine it averages around 5 hours but ranges widely, roughly 1.5 to 9.5 hours, depending mostly on genetics, plus age, pregnancy, medications, and smoking. That single number explains why the same coffee affects two people very differently.
Why does afternoon coffee affect my sleep?
Because caffeine clears slowly, a coffee at 3pm can still have a quarter of its dose active near midnight. Caffeine can also reduce deep sleep even when it does not stop you falling asleep, so you get the hours but wake unrefreshed. That is why timing your last coffee matters more than the amount.
Does caffeine stay in your system longer during pregnancy?
Yes. During pregnancy the body clears caffeine much more slowly, and the half-life can lengthen substantially, especially later in pregnancy. Some medications and other individual factors slow it down too. If this applies to you, talk to your own clinician about what is appropriate for your situation.
How can I get caffeine out of my system faster?
There is no reliable quick fix; your liver clears caffeine at its own pace. Water, a walk, or food will not meaningfully speed it up. The only dependable lever is timing: have your last caffeine early enough that most of it has cleared by bedtime.
Ecuato builds interactive dashboard planners as single offline HTML apps. Browse all planners or visit the Etsy shop.