Caffeine cut-off calculator
Find out how much caffeine will still be in your system when you go to bed, and the latest time you can have your next coffee without it keeping you up.
5 h is a typical adult average. Many people fall between 3 and 7 h.
At bedtime (11:00 PM) you'll still have about
28 mg
of caffeine in your system.
That's under your 50 mg target. Nice.
Latest time for your next drink (Filter coffee): 12:30 PM
How the caffeine calculator works
Caffeine blocks adenosine, the chemical that builds up while you're awake and makes you feel sleepy. Your body clears caffeine gradually, and the usual way to describe that is its half-life: the time it takes for half of it to be gone.
In healthy adults the half-life averages about five hours, but it ranges widely, from roughly 2 to 10 hours. Pregnancy, some medications and liver conditions slow it down a lot, while smoking speeds it up. That's why the slider lets you choose anything between 3 and 7 hours.
The calculator adds up every drink you enter, halves each one for every half-life that passes, and shows the total at your bedtime. For your next drink, it works backwards to the latest time you could have it and still stay under your target.
Worked example
Say you have a filter coffee (95 mg) at 8:00 a.m. and an espresso (63 mg) at 1:00 p.m., and you go to bed at 11:00 p.m.
With a 5-hour half-life, the morning coffee has had 15 hours (three half-lives) to wear off, leaving about 12 mg. The espresso has had 10 hours (two half-lives), leaving about 16 mg. That's around 28 mg at bedtime, comfortably under a 50 mg target.
How late could you have had another filter coffee? You have about 22 mg of room left, and 95 mg needs roughly 10.5 hours to fall to that level, so the latest time would have been around 12:30 p.m., before the espresso you already had. If you want an afternoon pick-me-up, green tea or a short walk outside is the better bet.
Assumptions and limits
- The model assumes each drink is absorbed instantly. In reality caffeine peaks 30–60 minutes after you drink it, so the chart slightly overstates levels right after a drink. By bedtime the difference is small.
- Caffeine amounts are typical values. Real drinks vary a lot by brand, size and brewing method, so edit the mg if you know the exact amount.
- A half-life of about 5 hours is an average for healthy adults. If you're pregnant, take medication such as some antidepressants, oral contraceptives or antibiotics, or have a liver condition, caffeine can stay in your body much longer. Ask your doctor or pharmacist.
- Sensitivity varies too: some people sleep fine with caffeine on board, others are affected by small amounts. This tool is general information, not medical advice.
Build a wind-down that starts before your last coffee
OwlRoutine is a sleep-cycle smart alarm with a guided wind-down routine and bedtime reminders, so it's easier to stick to the cut-off that works for you. Free on iPhone and Android.
Frequently asked questions
How long before bed should I stop drinking coffee?
A common rule of thumb is at least 6–8 hours. In a well-known sleep study, 400 mg of caffeine taken 6 hours before bed still cut total sleep by about an hour. If you're sensitive, stopping around midday is safer.
What is the half-life of caffeine?
About 5 hours on average for healthy adults, with a wide range of roughly 2 to 10 hours. Pregnancy, some medications and liver disease make it longer, while smoking makes it shorter.
How much caffeine is in a cup of coffee?
A 240 ml cup of filter coffee has about 95 mg on average, a single espresso about 63 mg, black tea about 47 mg and a 330 ml cola about 34 mg. Coffee-shop sizes can contain two or three times as much.
How much caffeine is too much at bedtime?
There's no exact cut-off, but the less the better. This calculator uses 50 mg as a default target, about half an espresso. Many people notice lighter, more broken sleep with more than that in their system.
Can caffeine affect my sleep even if I fall asleep fine?
Yes. Caffeine late in the day can reduce deep sleep and make sleep lighter even if you don't notice trouble falling asleep. You may simply feel less rested the next morning.
Does decaf have caffeine?
A little: usually around 2–15 mg per cup. For most people that's too small to matter, but it adds up if you drink several cups in the evening.
Is caffeine safe during pregnancy?
Health authorities generally advise limiting caffeine to about 200 mg a day during pregnancy, and caffeine is cleared much more slowly then. Talk to your doctor or midwife about what's right for you.





