Caffeine Calculator
How much caffeine is still in your body at bedtime, hour by hour.
Good to know. Half of the afternoon coffee is usually still there at bedtime. Sleep notices, even when you don’t.
Not medical advice. A general estimate for healthy adults.
How it works
In plain words
Caffeine leaves the body at a steady rate: half of it every half-life, about 5 hours for most adults. After two half-lives a quarter is left, after three an eighth. A second drink adds its own amount, which halves the same way.
The formula
left = amount × 0.5^(hours since ÷ half-life) several drinks: add each one’s amount left
Worked example
200 mg of caffeine at 08:00, with a half-life of 5 hours, is 100 mg at 13:00, 50 mg at 18:00 and 25 mg at 23:00: three half-lives later, an eighth is left at bedtime.
Sources
- US Food and Drug Administration, Spilling the Beans: How Much Caffeine is Too Much? About 400 mg a day is an amount not generally associated with negative effects in healthy adults.
- StatPearls (NCBI Bookshelf), Caffeine Toxicity Caffeine’s half-life averages about 5 hours, from 1.5 to 9.5 hours between people.
Sources checked October 3, 2026. 4 automated tests check its answers on every change.
About the caffeine calculator
Caffeine is absorbed within an hour and then cleared slowly by the liver. The time it takes to clear half of it, the half-life, averages about 5 hours in adults, but ranges from under two hours to more than nine. Smoking roughly halves it; pregnancy, some oral contraceptives and some medicines make it much longer.
That is why an afternoon coffee can matter at night. 200 mg at 3 p.m. is still about 75 mg at 10 p.m., as much as a small coffee. Many people fall asleep anyway, but studies find caffeine taken even six hours before bed shortens and lightens sleep. A common rule is no caffeine after early afternoon.
For healthy adults, up to about 400 mg a day, around four cups of filter coffee, is generally not linked with harm. Less is advised in pregnancy (often 200 mg a day), for teenagers and for people with heart problems, anxiety or sensitivity to it. The amount in drinks varies a lot: a large café coffee can hold more than 300 mg.
The figures here are estimates for an average adult, not medical advice. For sleep timing, use the sleep calculator.
Questions people ask
How long does caffeine stay in your body?
Its half-life is about 5 hours on average, so half is gone after 5 hours and about 90% after 16 hours. It varies a lot from person to person.
How much caffeine is too much?
For healthy adults, the US FDA puts about 400 mg a day as an amount not generally linked with harm. Less in pregnancy and for teenagers.
When should I stop drinking coffee before bed?
Often about 8–10 hours before, so most of it is gone. Some people are more sensitive and need longer.