Caffeine fades slowly: on average, about half of it is still active five
hours later. Add what you drink today and we'll show how much is left at bedtime.
Caffeine half-life (varies by person)5 h
Check your inbox.
Your first email is on its way. It has the one change worth making this week.
Through the day your brain builds up adenosine, a chemical that makes you
feel sleepy. Caffeine works by blocking it, so you feel alert even though the sleep
pressure is still there. The catch is that caffeine leaves your body slowly.
Its half-life, the time it takes for half of it to clear, averages
around five hours in healthy adults. It varies a lot between people,
roughly two to ten hours. So a mid-afternoon coffee can still be working at bedtime.
What the research suggests
A 2023 review that pooled 24 studies (Gardiner et al., Sleep Medicine Reviews)
found caffeine shortened total sleep by about 45 minutes and reduced deep sleep. To avoid
losing sleep time, it suggested having a regular coffee (about 107 mg) at
least 8.8 hours before bed, and a typical pre-workout drink (about 217 mg)
at least 13.2 hours before.
You can fall asleep easily and still sleep more lightly after caffeine. Feeling fine at
bedtime doesn't mean it has worn off.
Easy ways to keep the benefit and lose the cost
Front-load it. Have your caffeine in the morning, when it does the most good.
Set a cut-off. For an 11 PM bedtime, the research above points to a last coffee around 2 PM.
Watch the hidden sources. Tea, cola, energy drinks, pre-workout and dark chocolate all count.
Decaf isn't zero, but at a few milligrams a cup it's a good afternoon swap.
Common questions
How long does caffeine last?
On average about half is gone after five hours and three-quarters after ten, but some people clear it much faster or slower.
Some people drink espresso after dinner and sleep fine. Why?
People process caffeine at different speeds, and tolerance changes how alert you feel. Even then, studies often show lighter sleep than without it.
How accurate is this calculator?
It uses typical caffeine amounts and an average half-life, so treat the result as an estimate. Check labels for exact amounts; energy drinks and pre-workouts vary a lot.
Educational use only. This tool gives general wellness information based on
averages. It is not a medical device, does not provide a diagnosis, and does not assess
or treat any sleep disorder. People vary. If poor sleep is persistent or affecting your
health, please consult a qualified healthcare professional.