Caffeine calculator
Our caffeine calculator shows how the caffeine in your coffee, tea, energy drinks and anything else you drink adds up throughout the day. It estimates how much may still be in your body at bedtime, so you can compare what happens when you have less caffeine or drink it earlier.
What's still in you at bedtime?
The amounts are typical figures for each drink. If your can, cup or tub says something different, tap the drink and change it.
Set your bedtime, then add what you drink and when.
Clock
Add a drink
Not on the shelf?
The caffeine in your body, hour by hour
Caffeine in youIf your body clears it faster or slower
Unlikely to cost you sleepCutting it closeMay cost you sleep
The colors are about what's still in you when you go to bed: green up to about 30 mg, yellow up to about 60, red above that. Each drink is colored by what it leaves on its own, the verdict below by all of them together.
Why those numbers: in a review of 24 sleep studies, a coffee within about 9 hours of bed or a pre-workout scoop within about 13 shortened sleep on average, and both leave a little over 30 mg by bedtime. Up to 60, the studies disagree; 400 mg twelve hours before bed, about 75 left, delayed sleep.
Bodies clear caffeine at different speeds. For most adults, half of it is gone in 4 to 6 hours, but some clear it in under 3 and others take up to 10.
Smoking speeds it up, hormonal birth control and pregnancy slow it down, and genes play a big part, so there's no easy way to know your own speed. The big number assumes half is gone every 5 hours; the range uses 3 and 8.
Today, in total
What your result means
The bedtime number is an estimate for a typical body, not a measurement of yours. Bodies clear caffeine at different speeds, which is what the range under it shows.
The colors are our own rough guide, not a promise about your night. Why caffeine can cut into your sleep even on nights that feel fine is explained in why energy drinks make you tired.
Tap a drink under the chart and its line shows, in the same colors, what that drink alone would leave at bedtime if you had it earlier or later.
For most healthy adults, the guidance is up to about 200 mg at a time and 400 mg in a day (200 mg a day in pregnancy), so read the line under your day’s total as a ceiling, not a target.
This page is general information from coaches, not medical advice. If you have a medical condition or an injury, or take medication, talk to your doctor before you change your training or diet.
Sources
Gardiner C, Weakley J, Burke LM, Roach GD, Sargent C, Maniar N, et al. The effect of caffeine on subsequent sleep: a systematic review and meta-analysis. Sleep Medicine Reviews, 2023;69:101764. DOI.
Gardiner CL, Weakley J, Burke LM, Fernandez F, Johnston RD, Leota J, et al. Dose and timing effects of caffeine on subsequent sleep: a randomized clinical crossover trial. Sleep, 2025;48(4):zsae230. DOI.
Guest NS, VanDusseldorp TA, Nelson MT, Grgic J, Schoenfeld BJ, Jenkins NDM, et al. International Society of Sports Nutrition position stand: caffeine and exercise performance. Journal of the International Society of Sports Nutrition, 2021;18(1):1. DOI.
EFSA Panel on Dietetic Products, Nutrition and Allergies. Scientific opinion on the safety of caffeine. EFSA Journal, 2015;13(5):4102. DOI.
Blanchard J, Sawers SJ. The absolute bioavailability of caffeine in man. European Journal of Clinical Pharmacology, 1983;24(1):93-98. DOI.
Desbrow B, Hall S, O’Connor H, Slater G, Barnes K, Grant G. Caffeine content of pre-workout supplements commonly used by Australian consumers. Drug Testing and Analysis, 2019;11(3):523-529. DOI.
US Food and Drug Administration. Spilling the beans: how much caffeine is too much? Consumer update. fda.gov.
US Department of Agriculture, FoodData Central (SR Legacy): brewed coffee, espresso, instant coffee, black tea and cola. fdc.nal.usda.gov.