How it works
Caffeine (Caffeine) decays exponentially: every half-life (Half-Life), about five hours for most adults, the amount in your blood halves. Enter the dose, when you drank it, your bedtime and your half-life. The remaining milligrams at bedtime is the number that predicts trouble falling asleep; many sleep researchers suggest keeping it small.
Formula
Example
Example in plain words. A 200 mg coffee at 15:00, bedtime 23:00, half-life 5 hours.
Eight hours later, 65.98 mg is still active, about a third of the cup.
That is a weak espresso s worth, sitting in your system at lights-out.
Frequently asked questions
Is my half-life really 5 hours?
It varies widely: pregnancy, some medications and genetics stretch it toward 10 hours; smokers metabolize faster. If coffee after lunch ruins your sleep, try 6 or 7 in the calculator.
What counts as a dose?
A shot of espresso is roughly 63 mg, a large filter coffee 150-250 mg, black tea about 47 mg, a cola about 34 mg. Add doses by running the calculator per drink and summing what remains.