Caffeine Calculator
Add up caffeine from coffee, tea, soda and energy drinks and see how much is left by bedtime.
Healthy adults can have up to 400 mg of caffeine a day (about four 8 oz cups of brewed coffee); pregnancy limit is 200 mg. Caffeine's half-life is about 5 hours, so 224 mg at noon leaves about 74 mg at 8 PM.
Free, runs in your browser. Nothing you enter is uploaded.
How to use it
- Add each drink and how many servings you had.
- Choose adult, pregnant or teen, and enter body weight.
- Enter hours until bedtime to see caffeine still in your body.
What you enter
- Drinks and servings
- Group
- Body weight
- Hours until bedtime
What you get
- Total caffeine
- Daily limit
- mg per kg
- Caffeine left at bedtime
Formula
Caffeine remaining = dose × 0.5^(hours ÷ 5)
Worked example
Input: Two 8 oz coffees and one cola, 8 hours to bedtime
Result: 224 mg today; about 74 mg left at bedtime
Well within the 400 mg limit, but enough remains to delay sleep for some people.
Questions
How much caffeine is safe per day?
Up to 400 mg for healthy adults (FDA), 200 mg in pregnancy (ACOG), and no more than 100 mg or 2.5 mg/kg for teens.
How long does caffeine stay in your system?
Half-life averages about 5 hours (range 2–10). It is longer in pregnancy, with oral contraceptives and with liver disease, and shorter in smokers.
How much caffeine is in a cup of coffee?
About 95 mg in 8 oz of brewed coffee, 63 mg in a shot of espresso, and 47 mg in 8 oz of black tea.
When should I stop drinking caffeine before bed?
At least 6 hours before bedtime. Even 400 mg six hours before bed measurably reduced sleep in a controlled study.
Limitations
- Caffeine content varies widely between brands and brew methods.
- Half-life differs a lot between people.
References
- US Food and Drug Administration (2024).
- Drake C et al. (2013) Journal of Clinical Sleep Medicine 9(11):1195-1200.
More Health & Wellness
- BMI Calculator & Medical Ideal Body Weight (IBW) Planner
- Body Fat Percentage Calculator & Lean Mass Index
- Body Surface Area (BSA) Calculator
- Calorie Deficit Calculator & Target Goal Date Planner
- Ovulation Calculator & Period Tracker
- One Rep Max Calculator (1RM)
- BMR Calculator (Basal Metabolic Rate)
- Blood Alcohol Calculator (BAC)
- Sleep Calculator (Bedtime and Wake-Up Times)
- Pace Calculator (Running Pace, Time and Distance)
- eGFR Calculator (CKD-EPI 2021)
- Protein Intake Calculator
All free tools · By Dr. Zubair Khalid, DVM, MS, PhD.