The formula
remaining = dose × 0.5^(hours / half-life)
Where it comes from
Caffeine clears by exponential decay: every half-life, half of what was left disappears. With a five-hour half-life, 200 milligrams becomes 100 after five hours, 50 after ten and 25 after fifteen. That carry-over is why a five o'clock coffee is still working at midnight, even though whoever drank it no longer feels a thing: the effect on sleep architecture does not require feeling it.
How to work it out by hand
- Note the milligrams of caffeine you took
- Count the hours since
- Divide those hours by the half-life
- Multiply the dose by one half raised to that number
What is worth knowing
Half-life varies enormously, which is why it is a field rather than a constant: pregnancy can triple it, oral contraceptives lengthen it and smoking nearly halves it, on top of genetic variation in the enzyme that metabolises it. For reference, an espresso is around 60 to 80 milligrams, a large filter coffee about 150, a can of cola about 35 and an energy drink about 80. The daily amount considered safe in a healthy adult is 400 milligrams.