Dose Log and Daily Total
Remaining at Bedtime Estimate
Informational estimate only, not medical advice.
Medical Disclaimer: This calculator provides a general estimate based on established research and is for educational purposes only, not a substitute for medical advice. Individual results can vary based on health conditions, so consult a qualified healthcare professional or registered dietitian before making significant changes to your diet, exercise, or health routine. Read our full Medical Disclaimer.
How Caffeine Clearance Is Calculated
Caffeine does not simply switch off when you finish your cup. It lingers in the bloodstream for hours, continuing to block the adenosine receptors that regulate sleepiness well after the alertness effect fades. This calculator tracks two things most caffeine tools ignore: the running total against daily safety limits, and how much caffeine is still active in your system at any given hour, including when your head hits the pillow.
What This Calculator Measures
This gives you two numbers, not one: where your logged intake stands against the daily safety reference, and an estimate of how much caffeine is still active in your system at a chosen bedtime. The second number is what actually predicts sleep disruption, not the raw daily total.
The Formula
Each drink or dose you log is added to a running daily total, compared against the reference limits used in clinical guidance. The U.S. FDA puts the general population threshold at 400 mg per day for healthy adults, roughly four standard 8 oz cups of brewed coffee. A separate, lower limit of 200 mg per day applies during pregnancy, since caffeine crosses the placenta and the developing fetus cannot metabolize it¹,².
Body weight is optional. If entered, the calculator can express intake as mg per kilogram of body weight alongside the flat limit, which is how most clinical pharmacokinetics research frames dose exposure. The flat 400 mg figure remains the primary reference regardless.
Caffeine clears the body through first-order pharmacokinetics, a fixed proportion of what remains is eliminated per unit time, not a fixed absolute amount, producing an exponential decay curve rather than a straight-line drop³:
Remaining (mg) = Dose (mg) × 0.5 ^ (hours elapsed ÷ half-life)
The default half-life used is 5 hours, the average across healthy, non-pregnant, non-smoking adults in the pharmacokinetics literature.
How This Calculator Computes Your Result
Each dose you log decays on its own curve from the time it was consumed. The calculator sums these individual decay curves to produce a single estimate of total active caffeine at any given hour, the metric that actually determines sleep impact, not the raw daily total³.
From this combined curve, the calculator derives a “last-safe caffeine” time: the point at which another standard dose (95 mg, one cup of brewed coffee) would still clear enough by your target bedtime to keep estimated remaining levels below about 50 mg of active caffeine at bedtime. That 50 mg line is this calculator's own cautious cut-off, not a clinical limit. In a 2025 trial in 23 young men, 100 mg taken 4 hours before bed, which leaves about 57 mg at bedtime at a 5-hour half-life, did not measurably change sleep, while 400 mg disrupted sleep when taken within 12 hours of bedtime⁶.
Caffeine Sources and Typical Values
Default mg values in the dropdown are drawn from published nutrition databases and product data. They reflect typical servings, actual caffeine varies by brewing method, grind, steep time, brand, and serving size.
Source | Typical Serving | Caffeine (mg) |
Brewed drip coffee | 8 oz (240 ml) | ~95 |
Espresso shot | 1 oz (30 ml) | ~63 |
Cold brew coffee | 8 oz (240 ml) | ~100–200 |
Instant coffee | 8 oz (240 ml) | ~60–80 |
Black tea | 8 oz (240 ml) | ~47 |
Green tea | 8 oz (240 ml) | ~28 |
Matcha (1 tsp powder) | 8 oz (240 ml) | ~70 |
Energy drink (standard can) | 8.4 oz (250 ml) | ~80 |
Energy drink (large) | 16 oz (473 ml) | ~160 |
Cola (regular or diet) | 12 oz (355 ml) | ~34–46 |
Dark chocolate | 1 oz (28 g) | ~20–25 |
Pre-workout supplement | 1 serving | ~150–300 |
Custom entry: if your drink is not listed, enter the mg amount directly. Check the nutrition label or the manufacturer’s website, caffeine content is required on the label for supplements and often available for branded beverages.
How Long Caffeine Stays in Your System
Estimated caffeine still active after one drink, hour by hour, at the default 5-hour half-life.
- One cup of brewed coffee (95 mg)
- Large energy drink (160 mg)
- 50 mg bedtime threshold
Show data table
| Hours after drinking | One cup of brewed coffee (95 mg) (mg) | Large energy drink (160 mg) (mg) | 50 mg bedtime threshold (mg) |
|---|---|---|---|
| 0 | 95 | 160 | 50 |
| 1 | 83 | 139 | 50 |
| 2 | 72 | 121 | 50 |
| 3 | 63 | 106 | 50 |
| 4 | 55 | 92 | 50 |
| 5 | 48 | 80 | 50 |
| 6 | 41 | 70 | 50 |
| 7 | 36 | 61 | 50 |
| 8 | 31 | 53 | 50 |
| 9 | 27 | 46 | 50 |
| 10 | 24 | 40 | 50 |
| 11 | 21 | 35 | 50 |
| 12 | 18 | 30 | 50 |
| 13 | 16 | 26 | 50 |
| 14 | 14 | 23 | 50 |
| 15 | 12 | 20 | 50 |
| 16 | 10 | 17 | 50 |
Caffeine in Common Drinks
Typical caffeine per serving, highest first. Where the amount varies, the lighter part shows the range.
- Typical amount
- Upper end of range
Show data table
| Source | Typical amount | Upper end of range |
|---|---|---|
| Pre-workout supplement (1 serving) | about 150 mg at the low end | 150 to 300 mg |
| Cold brew coffee (8 oz) | about 100 mg at the low end | 100 to 200 mg |
| Energy drink, large (16 oz) | about 160 mg | – |
| Brewed drip coffee (8 oz) | about 95 mg | – |
| Instant coffee (8 oz) | about 60 mg at the low end | 60 to 80 mg |
| Energy drink, standard can (8.4 oz) | about 80 mg | – |
| Matcha, 1 tsp powder (8 oz) | about 70 mg | – |
| Espresso shot (1 oz) | about 63 mg | – |
| Black tea (8 oz) | about 47 mg | – |
| Cola, regular or diet (12 oz) | about 34 mg at the low end | 34 to 46 mg |
| Green tea (8 oz) | about 28 mg | – |
| Dark chocolate (1 oz) | about 20 mg at the low end | 20 to 25 mg |
A Note on Accuracy
The decay curve is a population average, not a personalized pharmacokinetic model. Genetics (CYP1A2 variants), smoking, hormonal contraceptives, and pregnancy all shift real half-life meaningfully in either direction. This tool cannot determine your individual genotype, it provides a calibrated average-case estimate, not a medical diagnosis.
Frequently Asked Questions
How many hours before bed should I stop drinking caffeine?
It depends on the dose. A crossover study found that 400 mg of caffeine taken 6 hours before bedtime still cut measured total sleep time by over an hour, even though participants did not notice the disruption themselves⁴. A 2025 trial found that 100 mg taken 4 hours before bed did not measurably change sleep, but 400 mg disrupted sleep when taken within 12 hours of bedtime⁶. For a single cup of drip coffee (around 95 mg), a 5 to 6 hour buffer is generally adequate for a normal metabolizer. Larger doses, slow metabolizers, and people on hormonal contraceptives should use a longer buffer.
Is 400 mg of caffeine a day safe for everyone?
No. The 400 mg figure is the FDA's reference for healthy, non-pregnant adults with no relevant medical conditions or medications. Pregnant people have a lower 200 mg/day limit, and adolescents, people with certain cardiovascular conditions, and slow metabolizers may have a lower safe threshold at the same intake level¹,²,⁵.
Does caffeine affect everyone's sleep the same way?
No, the sleep-disrupting effect of caffeine varies with dose, timing, metabolizer status, and tolerance. Slow metabolizers and people on hormonal contraceptives have caffeine active in their system for far longer at the same dose, so the same afternoon coffee disrupts sleep more for them than for a fast metabolizer³,⁵.
Can I speed up caffeine clearance by drinking water or exercising?
No. Caffeine is cleared by liver enzymes, primarily CYP1A2, not by filtration through the kidneys or by sweating. Hydration and exercise do not meaningfully accelerate this enzymatic process, half-life is determined by genetics, hormonal status, and smoking habits, not fluid intake or activity level.
Sources
Spilling the Beans: How Much Caffeine Is Too Much?, U.S. Food and Drug Administration, 2024
Scientific Opinion on the safety of caffeine, European Food Safety Authority (EFSA), 2015
Pharmacokinetics and metabolism of natural methylxanthines in animal and man, Arnaud MJ, Handbook of Experimental Pharmacology, 2011
Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed, Drake C, Roehrs T, Shambroom J, Roth T, Journal of Clinical Sleep Medicine, 2013
CYP1A2 Genetic Variation, Coffee Intake, and Kidney Dysfunction, Mahdavi S, Palatini P, El-Sohemy A, JAMA Network Open, 2023
Dose and timing effects of caffeine on subsequent sleep: a randomized clinical crossover trial, Gardiner CL, Weakley J, Burke LM, et al., Sleep, 2024