Free caffeine calculator
How much caffeine will be left at bedtime?
Add what you drink today and when. The calculator shows the caffeine left at bedtime and the latest time for one more cup.
A caffeine calculator estimates how much caffeine is still in your body at any hour, including bedtime. It adds every drink you log and halves each one every half-life. In healthy adults, that half-life averages about 5 hours.[1]
Caffeine at a glance
- Half-life: about 5 hours on average in healthy adults, with a range of 1.5 to 9.5 hours (Institute of Medicine, 2001).[1]
- Absorption: 99% of a dose is absorbed within 45 minutes, and blood levels peak 15 to 120 minutes after a drink.[1]
- Daily amount: the FDA cites 400 mg a day as an amount not generally linked to negative effects in most adults.[5]
- Sleep loss: in a 2023 meta-analysis of 24 studies, caffeine cut total sleep time by 45 minutes.[2]
- Cutoff: the same analysis advises finishing a 107 mg coffee at least 8.8 hours before bed.[2]
- Unnoticed loss: 400 mg taken 6 hours before bed cut measured sleep by more than an hour, yet the sleepers did not report it.[4]
How to use the caffeine calculator
- Add each drink. Pick it from the list, then set the servings and the time you drank it. If your drink is not listed, choose “Other drink” and type the milligrams from the label.
- Set your bedtime and wake-up time. Times before 4 AM count as after midnight.
- Open “About you” if it applies. Pregnancy, smoking and estrogen birth-control pills all change how fast caffeine leaves the body. Body weight adds a per-kilogram check.
- Read your results. You see the caffeine left at bedtime, the latest time for one more drink, what remains when you wake, and your total against the daily limit.
The plan saves in this browser. Use “Copy link to this plan” to open it on another device or share it.
How does caffeine half-life work?
Caffeine half-life is the time the body takes to clear half of the caffeine in the blood. The liver does this work, mainly through an enzyme called CYP1A2. In healthy adults, the average is about 5 hours.[1]
Each half-life removes half of what is left, not half of the first dose. So caffeine never drops off suddenly. It fades in steps. At a 5-hour half-life, about 13% of the caffeine in the body clears each hour.
Take 200 mg at noon. About 100 mg remains at 5 PM, 50 mg at 10 PM and 25 mg at 3 AM.
The calculator applies one formula to every drink, then adds the results:
caffeine left = dose × 0.5(hours since the drink ÷ half-life)
It also ramps each drink in over its first 45 minutes, since that is how long absorption takes.[1] The table below runs the same formula for common drinks.
| Drink at 2:00 PM | Caffeine | Left at 10:30 PM: fast (3 h) | Typical (5 h) | Slow (8 h) |
|---|---|---|---|---|
| Brewed coffee, 8 fl oz | 96 mg | 13 mg | 30 mg | 46 mg |
| Brewed coffee, 16 fl oz | 192 mg | 27 mg | 59 mg | 92 mg |
| Starbucks Pike Place, Grande, 16 fl oz | 315 to 390 mg (calculator uses 350) | 49 mg | 108 mg | 168 mg |
| Red Bull, 8.4 fl oz can | 80 mg | 11 mg | 25 mg | 38 mg |
| Black tea, 8 fl oz | 48 mg | 7 mg | 15 mg | 23 mg |
| Green tea, 8 fl oz | 29 mg | 4 mg | 9 mg | 14 mg |
| Pre-workout, 1 standard scoop | 218 mg | 31 mg | 67 mg | 104 mg |
What changes your caffeine half-life?
Smoking, estrogen birth-control pills and pregnancy change caffeine half-life the most among factors with measured numbers. Smoking shortens it. The pill and pregnancy lengthen it.
| Factor | Measured half-life | Setting in this calculator | Study |
|---|---|---|---|
| Healthy adults | About 5 hours on average; 1.5 to 9.5 hours across people | 5 hours (typical), 3 hours (fast), 8 hours (slow) | Institute of Medicine, 2001 [1] |
| Smoking | 3.5 hours in smokers vs 6.0 hours in nonsmokers | Half-life multiplied by 0.58 | Parsons and Neims, 1978, 26 adults [9] |
| Estrogen birth-control pill, used over 3 months | 7.88 hours vs 5.37 hours | Half-life multiplied by 1.47 | Abernethy and Todd, 1985, 18 women [10] |
| Late pregnancy | About 3 hours before pregnancy, 10.5 hours in the last 4 weeks | 10.5 hours for any stage of pregnancy (the cautious case) | Knutti, Rothweiler and Schlatter, 1982 [11] |
Quitting smoking returns caffeine clearance to nonsmoker levels.[1] The same coffee then lasts longer, so a smaller dose or an earlier cutoff keeps bedtime levels the same.
Newer birth-control pills have not been studied for this effect, the Institute of Medicine notes.[1] The 1.47 setting comes from low-dose estrogen pills used for more than 3 months.
Some medicines slow caffeine clearance as well. Mayo Clinic advises talking about your coffee and tea intake whenever a new prescription starts.[13] Much of the remaining spread between people is innate individual variation.[1] The “How does caffeine usually affect you?” setting is the practical stand-in for that.
When should you stop drinking caffeine before bed?
Stop a standard coffee at least 8.8 hours before bed. A 2023 meta-analysis of 24 studies set that cutoff for a 107 mg coffee. A 217.5 mg pre-workout dose needs 13.2 hours.[2]
That paper, by Gardiner and colleagues in Sleep Medicine Reviews, pooled studies that tracked sleep after caffeine. Caffeine cut total sleep time by 45 minutes and sleep efficiency by 7%. Deep sleep fell by 11.4 minutes. Each extra hour between caffeine and bed narrowed the loss in total sleep by 2.8 minutes. For a cup of black tea, the model found no cutoff time at all.[2]
A 2013 trial shows why the cutoff surprises people. Drake and colleagues gave 400 mg of caffeine at bedtime, 3 hours before, or 6 hours before.[3] Even at 6 hours, sleep measured by a home monitor fell by more than an hour. The sleepers’ own diaries did not show the loss.[4]
Why this calculator uses a 30 mg bedtime goal
Many caffeine calculators use a 50 mg “safe at bedtime” level. No study sets that number. The 30 mg default here comes from the 2023 meta-analysis instead.
Run the paper’s two cutoffs through a 5-hour half-life. A 107 mg coffee after 8.8 hours leaves about 32 mg. A 217.5 mg pre-workout after 13.2 hours leaves about 35 mg. Both land near 30 mg. This is a calculation on the paper’s own numbers, not a threshold the authors published. Light sleepers can choose 15 mg in the calculator.
| One drink | Caffeine | Hours needed before bed | Last call for a 10:30 PM bedtime |
|---|---|---|---|
| Brewed coffee, 8 fl oz | 96 mg | 8.4 hours | 2:05 PM |
| Brewed coffee, 16 fl oz | 192 mg | 13.4 hours | 9:05 AM |
| Starbucks Pike Place, Grande, 16 fl oz | 315 to 390 mg (calculator uses 350) | 17.7 hours | 4:45 AM |
| Espresso, single shot, 1 fl oz | 63 mg | 5.4 hours | 5:05 PM |
| Red Bull, 8.4 fl oz can | 80 mg | 7.1 hours | 3:25 PM |
| Celsius Original, 12 fl oz can | 200 mg | 13.7 hours | 8:45 AM |
| Black tea, 8 fl oz | 48 mg | 3.4 hours | 7:05 PM |
| Coca-Cola, 12 fl oz can | 34 mg | 0.9 hours | 9:35 PM |
| Pre-workout, 1 standard scoop | 218 mg | 14.3 hours | 8:10 AM |
| Green tea, 8 fl oz | 29 mg | None (already under 30 mg) | Any time |
How much caffeine is too much in a day?
400 mg a day is the amount the FDA cites for most healthy adults as not generally linked to negative effects. That is about four 8 oz cups of brewed coffee. Pregnancy, breastfeeding and age lower the limit.[5]
| Group | Daily amount | Single dose | Source |
|---|---|---|---|
| Healthy adults | 400 mg | Up to 200 mg at once (about 3 mg per kg) | FDA [5], EFSA [6] |
| Pregnant | Under 200 mg | Not set separately | ACOG [7], EFSA [6] |
| Breastfeeding | About 300 mg or less (EFSA: 200 mg) | Up to 200 mg (EFSA) | CDC [8], EFSA [6] |
| Children and teens | No FDA level; the American Academy of Pediatrics discourages caffeine | 3 mg per kg of body weight a day (EFSA) | FDA [5], EFSA [6] |
Body weight matters too. EFSA puts the safe single dose at about 3 mg per kg of body weight, and the daily amount at about 5.7 mg per kg for adults.[6] Add your weight in the calculator to see your own numbers.
Speed of intake matters as much as the amount. The FDA estimates that toxic effects, such as seizures, can appear with rapid intake of around 1,200 mg. Pure powdered caffeine is the main danger: one teaspoon can hold as much caffeine as 28 cups of coffee.[5]
The FDA lists these signs of too much caffeine: a fast heart rate, palpitations, sleep problems, anxiety, jitters, an upset stomach, nausea and headache. If they appear, cut back gradually. Caffeine withdrawal is not dangerous, but it can be unpleasant.[5]
How much caffeine is in coffee, tea, soda and energy drinks?
An 8 oz cup of brewed coffee has about 96 mg of caffeine, according to Mayo Clinic. Black tea has about 48 mg, green tea 29 mg, and a 12 oz Coca-Cola 34 mg. Coffee-shop sizes run far higher.[12]
| Drink | Serving | Caffeine | Source |
|---|---|---|---|
| Brewed coffee | 8 fl oz (237 mL) | 96 mg | Mayo Clinic [12] |
| Brewed coffee | 12 fl oz (355 mL) | 144 mg (scaled from 8 oz) | Mayo Clinic [12] |
| Brewed coffee | 16 fl oz (473 mL) | 192 mg (scaled from 8 oz) | Mayo Clinic [12] |
| Espresso, single shot | 1 fl oz (30 mL) | 63 mg | Mayo Clinic [12] |
| Espresso, double shot | 2 fl oz (60 mL) | 126 mg (two single shots) | Mayo Clinic [12] |
| Instant coffee | 8 fl oz (237 mL) | 62 mg | Mayo Clinic [12] |
| Decaf brewed coffee | 8 fl oz (237 mL) | 1 mg | Mayo Clinic [12] |
| Starbucks Pike Place, Grande | 16 fl oz (473 mL) | 315 to 390 mg | Starbucks [18] |
| Black tea | 8 fl oz (237 mL) | 48 mg | Mayo Clinic [12] |
| Green tea | 8 fl oz (237 mL) | 29 mg | Mayo Clinic [12] |
| Bottled black tea | 8 fl oz (237 mL) | 26 mg | Mayo Clinic [12] |
| Coca-Cola | 12 fl oz can (355 mL can) | 34 mg | Coca-Cola [15] |
| Diet Coke | 12 fl oz can (355 mL can) | 46 mg | Coca-Cola [15] |
| Red Bull | 8.4 fl oz can (250 mL can) | 80 mg | Red Bull [14] |
| Monster Energy | 16 fl oz can (473 mL can) | 160 mg | Company reports [17] |
| Celsius Original | 12 fl oz can (355 mL can) | 200 mg | Celsius [16] |
| Energy drink, typical | 8 fl oz (237 mL) | 79 mg | Mayo Clinic [12] |
| Energy shot | 2 fl oz (60 mL) | 200 mg | Mayo Clinic [12] |
| Pre-workout, 1 standard scoop | 1 serving | 218 mg | Gardiner 2023 [2] |
| Caffeine tablet, 200 mg | 1 serving | 200 mg | Tablet strength |
Treat these numbers as a guide. The FDA notes that caffeine in brewed coffee and tea varies with the beans or leaves and how the drink is made. Restaurants do not have to list caffeine, while many packaged drinks print it on the label.[5] Values were checked on November 2, 2026.
Lower-caffeine swaps for the afternoon
Swap the afternoon coffee for green tea, decaf or a caffeine-free herbal infusion. Green tea has about 29 mg per cup and brewed decaf about 1 mg.[12] Infusions such as chamomile contain no caffeine unless the blend adds tea leaves.
- Learn what a cup of green tea offers besides its lighter caffeine.
- Read the full guide to chamomile tea, a traditional evening drink.
- See which superfoods for better sleep fit an evening routine.
- Compare other wellness beverages for the hours after your cutoff.
In Ayurveda, light and restless sleep is a classic sign of raised Vata. The free dosha quiz shows which dosha leads for you and how to balance it.
What this caffeine calculator cannot know
The calculator cannot measure your genes, liver health or tolerance. It ramps every drink in over 45 minutes, while real peaks range from 15 to 120 minutes.[1] People who rarely have caffeine may react more strongly to the same dose.[13] And no study has set a bedtime caffeine level that is safe for every sleeper.
Use the result as a starting point. If sleep stays poor with little caffeine left at bedtime, the cause may lie elsewhere. Talk to a doctor about sleep problems that last.
More free tools for daily health decisions.
Caffeine calculator FAQ
How long does caffeine last in your body?
Caffeine stays measurable for many hours. With an average 5-hour half-life, half of a dose remains after 5 hours and a quarter after 10 hours (Institute of Medicine, 2001). Most people feel the lift for a few hours, but the remaining caffeine can still affect sleep that night.
What is the half-life of caffeine?
The mean half-life of caffeine in healthy adults is about 5 hours, with a range of 1.5 to 9.5 hours (Institute of Medicine, 2001). Smoking shortens it. Estrogen birth-control pills and pregnancy lengthen it.
How long before bed should I stop drinking coffee?
A 2023 meta-analysis of 24 studies advises finishing a standard 107 mg coffee at least 8.8 hours before bed (Gardiner et al., Sleep Medicine Reviews). Bigger drinks need longer. Enter your drinks and bedtime above for a personal cutoff.
When should I stop drinking caffeine if I go to bed at 10 PM?
For a 10 PM bedtime, the 2023 meta-analysis model put the last standard coffee before about 1:12 PM (Gardiner et al., 2023). A 16 oz coffee or energy drink needs an earlier cutoff. The calculator above works this out for any drink.
How much caffeine is too much in a day?
For most healthy adults, the FDA cites 400 mg a day as an amount not generally linked to negative effects. That is about four 8 oz cups of brewed coffee. The limit is lower in pregnancy (under 200 mg, ACOG) and while breastfeeding (about 300 mg, CDC).
How much caffeine is in a cup of coffee?
An 8 oz cup of brewed coffee has about 96 mg of caffeine, according to Mayo Clinic. A single shot of espresso has about 63 mg. Starbucks lists 315 to 390 mg for a Pike Place Grande.
Can caffeine affect sleep even if I fall asleep easily?
Yes. In a 2013 trial, 400 mg of caffeine taken 6 hours before bed cut objectively measured sleep by more than an hour, but participants did not report the loss in their sleep diaries (Drake et al., 2013).
Can I flush caffeine out of my body faster?
No method is proven to clear caffeine faster. The liver breaks caffeine down, and that metabolism sets the pace of clearance (Institute of Medicine, 2001). Time is what lowers the level, so the practical fix is an earlier cutoff or a smaller dose.
Does pregnancy change how long caffeine lasts?
Yes, a lot. One study measured an average half-life of about 3 hours before pregnancy and 10.5 hours in the last 4 weeks of pregnancy (Knutti et al., 1982). ACOG advises keeping caffeine under 200 mg a day during pregnancy.
How much caffeine is safe while breastfeeding?
The CDC says caffeine usually does not harm a breastfed baby when the mother has about 300 mg a day or less. EFSA uses a stricter 200 mg a day. Ask a doctor if the baby is a newborn or premature.
Does decaf coffee have caffeine?
Yes, a little. Mayo Clinic lists about 1 mg in an 8 oz cup of brewed decaf. The FDA notes that decaf coffees and teas still contain some caffeine, so very sensitive people may want to count it.
Is caffeine safe for teenagers?
The FDA has not set a caffeine level for children or teens, and the American Academy of Pediatrics discourages caffeine for them. EFSA treats up to 3 mg per kg of body weight a day as safe for children and adolescents.
What is a caffeine calculator by weight?
A caffeine calculator by weight compares caffeine to body size. EFSA puts the safe single dose at about 3 mg per kg and the daily amount at about 5.7 mg per kg for adults. Add your weight in the calculator above to see your numbers.
Does this caffeine calculator store my data?
No. The calculator runs in your browser. Your drinks are saved only in this browser so the plan is still there on your next visit. A copied link carries the plan inside the link itself.
Sources
- Institute of Medicine (2001). Caffeine for the Sustainment of Mental Task Performance, Chapter 2: Pharmacology of Caffeine. National Academies Press. ncbi.nlm.nih.gov/books/NBK223808
- Gardiner C, Weakley J, Burke LM, et al. (2023). The effect of caffeine on subsequent sleep: A systematic review and meta-analysis. Sleep Medicine Reviews, 69, 101764. doi.org/10.1016/j.smrv.2023.101764
- Drake C, Roehrs T, Shambroom J, Roth T (2013). Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed. Journal of Clinical Sleep Medicine, 9(11), 1195-1200. pmc.ncbi.nlm.nih.gov/articles/PMC3805807
- American Academy of Sleep Medicine (2013). Late afternoon and early evening caffeine can disrupt sleep at night. aasm.org/late-afternoon-and-early-evening-caffeine-can-disrupt-sleep-at-night
- U.S. Food and Drug Administration. Spilling the Beans: How Much Caffeine is Too Much? fda.gov/consumers/consumer-updates/spilling-beans-how-much-caffeine-too-much
- European Food Safety Authority (2015). Scientific Opinion on the safety of caffeine. EFSA Journal, 13(5), 4102. efsa.europa.eu/en/topics/topic/caffeine
- American College of Obstetricians and Gynecologists (2010). Committee Opinion No. 462: Moderate caffeine consumption during pregnancy. Obstetrics and Gynecology, 116(2), 467-468. pubmed.ncbi.nlm.nih.gov/20664420
- Centers for Disease Control and Prevention. Maternal Diet: diet considerations for breastfeeding mothers. cdc.gov/breastfeeding/breastfeeding-special-circumstances/diet-and-micronutrients/maternal-diet.html
- Parsons WD, Neims AH (1978). Effect of smoking on caffeine clearance. Clinical Pharmacology and Therapeutics, 24(1), 40-45. pubmed.ncbi.nlm.nih.gov/657717
- Abernethy DR, Todd EL (1985). Impairment of caffeine clearance by chronic use of low-dose oestrogen-containing oral contraceptives. European Journal of Clinical Pharmacology, 28(4), 425-428. pubmed.ncbi.nlm.nih.gov/4029248
- Knutti R, Rothweiler H, Schlatter C (1982). The effect of pregnancy on the pharmacokinetics of caffeine. Archives of Toxicology, Supplement 5. link.springer.com/doi/10.1007/978-3-642-68511-8_33
- Mayo Clinic Staff (2025). Caffeine content for coffee, tea, soda and more. mayoclinic.org/healthy-lifestyle/nutrition-and-healthy-eating/in-depth/caffeine/art-20049372
- Mayo Clinic Staff. Caffeine: How much is too much? mayoclinic.org/healthy-lifestyle/nutrition-and-healthy-eating/in-depth/caffeine/art-20045678
- Red Bull. How much caffeine is in a can of Red Bull? redbull.com/us-en/energydrink/how-much-caffeine-is-in-a-can-of-red-bull
- The Coca-Cola Company. What is caffeine? (FAQ) coca-colacompany.com/about-us/faq/what-is-caffeine
- CELSIUS. Essential Facts about CELSIUS energy drinks. celsius.com/?p=2839
- PubMed Central article PMC2735818, Table 1: top-selling energy drinks in the United States (Monster, 16 oz: 160 mg). pmc.ncbi.nlm.nih.gov/articles/PMC2735818
- Starbucks. Medium Roast – Pike Place Roast, Grande 16 fl oz: nutrition (caffeine 315 mg to 390 mg). Checked November 2, 2026. starbucks.com/menu/product/480/hot/nutrition
This calculator gives an estimate for education, based on published averages. It is not medical advice and cannot diagnose, treat or prevent any condition. Ask a doctor or pharmacist about caffeine if you are pregnant or breastfeeding, under 18, take medication, or have a heart, anxiety or sleep condition.



