A coffee at 2pm rarely feels like a problem. It is the 11pm version of you, lying in the dark, that pays for it, and by then the cup is eight hours gone and you have forgotten it existed. The caffeine has not forgotten, and that gap between “I feel fine” and “I cannot sleep” is why this calculator exists.
Give it the time you want to be asleep and how sensitive you are to caffeine, and it works backwards to a clock time when you should stop. It takes about four seconds and needs no account.
Honest detail up front: the cutoffs it prints are strict. With a normal sensitivity and an 11pm bedtime, it tells you no caffeine after 8am, which surprises most people the first time. That is not a bug, it is three half-lives of margin.
Figure out when to stop drinking caffeine so it doesn’t mess with your sleep. Caffeine has a half-life of about 5 hours, so timing matters.
Where the number comes from
Caffeine has a half-life of roughly five hours, which means five hours after your last sip, about half of it is still in you. The tool uses five hours flat, and then it waits for three half-lives before letting you near a pillow:
Cutoff = bedtime − (5 hours × 3 × sensitivity multiplier)
Three half-lives is 15 hours and leaves around 12.5% of the original dose still circulating. Not zero, which is worth knowing, because the result screen says “enough time to clear your system” and the more accurate version of that sentence is “down to about an eighth”.
The sensitivity dropdown is the multiplier. Low is 0.75, so 11.25 hours, rounded up to 12. Normal is 1.0, which is the full 15. High is 1.5, which is 22.5, rounded up to 23. The rounding is always upwards, so the tool never hands you a cutoff that is slightly too late.
Three cutoffs, same bedtime
Bedtime at 11:00pm, three sensitivity settings, three different mornings:
| Sensitivity | Hours before bed | Cutoff |
|---|---|---|
| Low | 12 | 11:00 AM |
| Normal | 15 | 8:00 AM |
| High | 23 | 12:00 AM (that morning) |
The high-sensitivity row is the one to read carefully. Twenty-three hours before an 11pm bedtime lands at midnight on the same calendar day, so the cup you had with breakfast was already past the line. If you push bedtime to 10:30pm the cutoff comes back as 11:30pm — which is the night before, and the tool does not print a date next to it. When a cutoff looks absurdly early, it is probably yesterday evening.
What the cutoff actually protects: 95mg from an 8oz brewed coffee at 2pm is down to about 48mg by 7pm and roughly 27mg by an 11pm bedtime. Twenty-seven milligrams is about a third of a shot of espresso, still enough for a lot of people to notice. That is the arithmetic the 8am rule is trying to get ahead of.
The parts it cannot know
It never asks how much you had. A 95mg drip coffee and a 300mg pre-workout get the identical cutoff, which is the single biggest thing this tool gets wrong about your particular afternoon. If you are dosing high, move the cutoff earlier yourself or shift the bedtime you enter.
Five hours is an average, not your liver. The commonly quoted range is four to six hours, and it moves with genetics, smoking, oral contraceptives, some medications, and whether you ate. Pregnant people and anyone with an anxiety disorder or insomnia are advised to sit well under the general ceiling, and Health Canada, the FDA and the CDC all publish guidance on that — for healthy adults the usual figure is about 400mg a day. This page is a scheduling aid, not medical advice, and a doctor beats a calculator if sleep is a persistent problem.
Also count the caffeine you did not think of. Black tea, cola, energy drinks, pre-workout powder, iced coffee, dark chocolate and a surprising number of pain relievers carry it. A label beats any estimate either of us can make, so read the can rather than the front of it.
Other tools
- cooking temperature converter — the other everyday conversion where being an hour out matters
- cooking temperature chart — safe internal temperatures, printed small enough to keep on the fridge
- fridge expiry tracker — because the leftovers you are washing down with coffee have a clock too
Frequently asked questions
Is five hours the right half-life for me?
It is the average figure, and the honest range is four to six hours. Younger adults and frequent drinkers tend to clear it faster, pregnancy and some medications slow it down. If you know you are slow, pick high sensitivity rather than pretending the average applies.
Why is my cutoff so early in the day?
Because three half-lives is 15 hours, and 15 hours before an 11pm bedtime is 8am. The rule is built for people who want caffeine essentially gone by lights out, not for people who want a tolerable amount left. Switch to low sensitivity if you clear it faster than most.
Does the calculator account for how much coffee I drink?
No. Dose is not an input, only bedtime and sensitivity. Two drinks of very different strength get the same answer, so treat the printed time as a latest-possible time and move it earlier after a heavy one.
What counts as caffeine?
Coffee, espresso drinks, black and green tea, cola, energy drinks, pre-workout, some sodas, dark chocolate, and caffeine added to some pain relief. Decaf still has a little, usually 2 to 15mg a cup, so a large decaf at 9pm is not completely free.
Should I just quit caffeine before an exam?
No sudden quit if you are used to it. Pulling it abruptly can bring on a headache on exactly the day you cannot afford one. Keep your usual morning amount and enforce the cutoff instead, which is what this page is for.
