Free tool
How much caffeine is still in you at bedtime?
Caffeine leaves the body slowly and on a predictable curve. Put in what you drink and when, and see what is left when your head hits the pillow.
This calculator needs JavaScript. The method and the numbers behind it are written out below, so you can work it through by hand if you prefer.
How this is worked out
- Caffeine clearance is modelled as simple exponential decay: the amount halves every half-life. That is the standard first-order model and it fits ordinary doses well.
- The half-life default of 5.5 hours sits inside the range usually cited for healthy adults. It is an input because it varies enormously β oral contraceptives and pregnancy can roughly double it, heavy smoking can halve it, and genetics matter. If caffeine hits you harder than other people, raise it.
- Only the LAST serving is tracked to bedtime. Earlier servings have decayed further, so this is the dominant one, but your true bedtime level will be a little higher than shown.
- The target is a personal threshold, not a medical number. There is no official safe bedtime level; use it to compare one habit against another rather than as a clinical limit.
- This is a timing model, not medical advice. If sleep is a persistent problem, caffeine is only one of the things worth looking at.
Does cutting caffeine earlier actually help sleep?
The arithmetic is not in doubt β stop earlier and less is present at bedtime. Whether that changes YOUR sleep depends on how sensitive you are, which is exactly why the half-life and the target here are yours to set rather than fixed.
