Caffeine calculator: how much caffeine is left at bedtime?
By Kevin Buhl Jakobsen ยท Everything is worked out in your browser; nothing is saved or sent ยท Updated 7. Nov 2026
Your drinks today
How the calculator works
Caffeine is absorbed from the stomach over about 30โ60 minutes, and then the liver slowly breaks it down. In healthy adults it takes on average about five hours to get rid of half of it. That's called the half-life. It varies a lot from person to person: for some it is two or three hours, for others close to ten. It tends to be longer during pregnancy and for people taking certain medicines, such as hormonal contraceptives, and shorter in smokers.
The calculator lets each drink be absorbed over 45 minutes and then halves it every time the half-life passes. All the drinks are added together for the curve. The amounts are the typical figures used by the European Food Safety Authority (EFSA), but the real content varies a lot by brand and by cup. Big coffee-shop drinks can contain two or three times as much as a home-made cup.
The 6-hour rule
In a 2013 sleep study, people were given 400 mg of caffeine at bedtime, three hours before or six hours before. Even six hours before bed, it cut their sleep by more than an hour, and many of them didn't notice. So the calculator shows your latest cup six hours before your bedtime, and eight hours before if you clear caffeine slowly. For night owls, that means a late-afternoon coffee can be perfectly fine when you don't sleep until 2 a.m.
How much is too much?
EFSA's assessment is that single doses of up to 200 mg and up to 400 mg a day don't raise safety concerns for healthy adults. For pregnant and breastfeeding women the figure is 200 mg a day, and children and teenagers should have much less. Read the full background in our article Caffeine after dark.
General information, not medical advice. If you're pregnant, have a heart condition or take medication, ask a doctor or pharmacist about caffeine.
Sources and further reading
- European Food Safety Authority (2015). Scientific Opinion on the safety of caffeine. EFSA Journal 13(5):4102.
- Drake C, Roehrs T, Shambroom J, Roth T (2013). Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed. Journal of Clinical Sleep Medicine 9(11):1195โ1200.