Caffeine can remain long after the feeling of a boost has faded.
Start with the amount
Check the actual drink label when possible. A small coffee and a large cold brew are not interchangeable units of caffeine. Include tea, energy drinks, and other sources when thinking about your total intake.
What a recent trial found
A randomized crossover trial published in 2025 compared 100 mg and 400 mg doses taken 4, 8, or 12 hours before bed in 23 men with moderate habitual caffeine intake. The lower dose did not show a statistically significant sleep effect in this sample; the higher dose did. This is not proof that 100 mg close to bedtime is harmless for everyone. The sample was small and narrow. Read the trial.
Explore, don’t diagnose
Our caffeine explorer uses exponential decay: amount remaining equals the initial dose multiplied by one-half raised to elapsed time divided by half-life. Five hours is an illustrative population average; clearance varies substantially. Pharmacology background.
The model starts with a single dose and simplifies absorption. It cannot predict whether you will sleep well, account for all medicines, or establish a safe threshold.
A practical experiment
If you suspect a late drink affects you, try moving it earlier or choosing a lower-caffeine option, then note your experience. People reducing substantial regular intake may want to do so gradually because withdrawal can be unpleasant. Seek individual advice if pregnancy, medicines, or a health condition complicate the decision.
PUT IT INTO PRACTICE
One change. A few observations.
Use a simple notebook to notice what helps, without grading your nights.
Open your seven-night notebook →Sources are linked beside the relevant claims. This guide is educational and has not been individually reviewed by a clinician. Our editorial approach.