Ness

Caffeine Half-Life Calculator

When to have your last coffee, and how much caffeine is left at bedtime.

Blank uses 5, the average. It ranges from 1.5 to 9.5.

2:12PM

Last coffee · Add a drink

Bedtime 11:00 PMmg left
  • Coffee7:30 AM–
  • Espresso12:30 PM–
  • Energy drink4:00 PM–
  • Today– / 400
Track it in Ness

How this caffeine calculator works

Your body clears caffeine at a steady rate: every half-life, half of what's left is gone. In healthy adults the half-life averages about 5 hours, but it ranges from 1.5 to 9.5 hours from person to person. The calculator uses 5 hours unless you enter your own.

  • Last coffee: the latest time for a cup of coffee before your bedtime. It starts from a 2023 meta-analysis of 24 studies, which found that coffee should be drunk at least 8.8 hours before bed to avoid losing sleep. That gap reflects average caffeine clearance, so the calculator stretches or shrinks it with your half-life.
  • Left at bedtime: how much of each drink is still in your body when you go to bed, added up.
  • Today: your total for the day, next to the 400 mg a day that the FDA and EFSA consider safe for most healthy adults.

Caffeine left = dose × 0.5^(hours since the drink ÷ half-life)

Each drink counts from the time you enter. Caffeine is absorbed fast, 99% within 45 minutes, so this is close. The result turns coral when more caffeine is left at bedtime than a cup of coffee drunk at the cutoff would leave.

How long does caffeine last?

Half of it is gone after one half-life, about 5 hours on average, and three quarters after two. With the average half-life:

Hours laterShare leftFrom a 95 mg coffeeFrom 200 mg
187%83 mg174 mg
276%72 mg152 mg
366%63 mg132 mg
457%55 mg115 mg
550%48 mg100 mg
644%41 mg87 mg
833%31 mg66 mg
1025%24 mg50 mg
1219%18 mg38 mg
1513%12 mg25 mg
206%6 mg13 mg
244%3 mg7 mg

So a 95 mg coffee at 8 AM still leaves about 12 mg at 11 PM. It takes about 33 hours to fall under 1 mg.

You feel it quickly. Blood levels peak 15 to 120 minutes after a drink, depending on how fast your stomach empties and what else you ate.

What is the half-life of caffeine?

About 5 hours on average in healthy adults, according to a review by the Institute of Medicine. It ranges from 1.5 to 9.5 hours. In one study of adult men, a dose of about 2 to 3 cups of coffee had a half-life of 2.5 to 4.5 hours, and age didn't change it.

Your liver does the work, and several things change its pace:

  • Smoking speeds caffeine up. Quitting brings it back to the rate of a non-smoker.
  • Oral contraceptives can double the half-life.
  • Pregnancy, obesity, and altitude change it too.

Some medications and health conditions can also make you more sensitive to caffeine. Regular caffeine use doesn't change how you absorb or break it down. If you know your half-life is shorter or longer than average, enter it above.

When to stop drinking coffee before bed

The 2023 meta-analysis put the cutoff at 8.8 hours before bed for a 107 mg cup of coffee, and 13.2 hours for a typical pre-workout supplement with 217.5 mg. The latest coffee for common bedtimes:

BedtimeHalf-life 3 hoursHalf-life 5 hours (average)Half-life 7 hours
9:00 PM3:43 PM12:12 PM8:41 AM
9:30 PM4:13 PM12:42 PM9:11 AM
10:00 PM4:43 PM1:12 PM9:41 AM
10:30 PM5:13 PM1:42 PM10:11 AM
11:00 PM5:43 PM2:12 PM10:41 AM
11:30 PM6:13 PM2:42 PM11:11 AM
12:00 AM6:43 PM3:12 PM11:41 AM
12:30 AM7:13 PM3:42 PM12:11 PM
1:00 AM7:43 PM4:12 PM12:41 PM

Bigger doses need more time, and so do slow metabolizers. Recommendations elsewhere range from 4 to 11 hours before bed. For an 11 PM bedtime and an average half-life, the last coffee is at 2:12 PM.

How caffeine affects sleep

Across the 24 studies in the meta-analysis, caffeine:

  • Cut total sleep by 45 minutes.
  • Lowered sleep efficiency by 7%, the share of time in bed spent asleep.
  • Added 9 minutes to the time to fall asleep and 12 more minutes awake after falling asleep.
  • Shortened deep sleep by 11.4 minutes and added light sleep.

In a 2013 study of 12 healthy sleepers, 400 mg of caffeine 6 hours before bed cut sleep by more than an hour, measured at home with a sleep monitor. Their own sleep diaries didn't show a significant difference. The researchers suggest that's one reason people keep drinking caffeine late: they don't notice what it costs.

The European Food Safety Authority (EFSA) says even 100 mg can affect sleep in some adults, especially close to bedtime.

How much caffeine is in coffee, tea, and energy drinks?

Typical amounts from USDA FoodData Central, which the calculator uses when you add a drink:

DrinkServingCaffeine
Coffee8 fl oz cup, brewed95 mg
Espresso1 fl oz shot63 mg
Black tea8 fl oz cup, brewed47 mg
Green tea8 fl oz cup, brewed29 mg
Cola12 fl oz can33 mg
Energy drink16 fl oz can143 mg

Real drinks vary a lot. The FDA lists 113 to 247 mg in a 12-ounce cup of regular brewed coffee, and 54 to 328 mg in 16 ounces of energy drink. Check the label or ask, and change the mg on a drink to match.

Decaf isn't caffeine-free: an 8-ounce cup typically has 2 to 15 mg.

How much caffeine is too much?

For most healthy adults, up to 400 mg a day isn't linked to negative effects, according to both the FDA and EFSA. That's about two to three 12-ounce cups of coffee. EFSA also considers single doses up to 200 mg safe for healthy adults.

During pregnancy, EFSA's limit is 200 mg a day. If you're pregnant, trying to become pregnant, or breastfeeding, or take medications, the FDA recommends asking your health care provider about caffeine.

Signs of too much include a racing heart, jitters, anxiety, an upset stomach, headache, and trouble sleeping. The FDA estimates that toxic effects like seizures can come from consuming about 1,200 mg quickly, less than half a teaspoon of pure caffeine.

Track your sleep with Ness

The meta-analysis and the 2013 study agree: late caffeine costs sleep you may not notice. Ness shows it, from your Apple Watch sleep data in Apple Health:

  • Sleep score: out of 100, from how long you slept, your deep and REM sleep, how often you woke up, how much of your time in bed you spent asleep, and how far your heart rate dropped.
  • Bedtime consistency: how far last night's bedtime drifted from your usual one.
  • Recovery score: your overnight HRV and sleeping heart rate against your own 14-night baseline, so a rough night shows up the next morning.

Try a week with an earlier last coffee and compare your scores. Ness is an AI health coach for iPhone and Apple Watch. It also scores your strain and stress every day, logs meals from a photo, and answers questions about your own data.

FAQ

How long does caffeine last? Blood levels peak 15 to 120 minutes after a drink, but caffeine stays in your body much longer. With the average half-life of 5 hours, half a dose is left after 5 hours and a quarter after 10. A 95 mg coffee takes about 33 hours to fall under 1 mg.

What is the half-life of caffeine? About 5 hours on average in healthy adults, with a range of 1.5 to 9.5 hours. Smoking shortens it, and oral contraceptives can double it. Pregnancy, obesity, and altitude change it too.

How long does it take 200 mg of caffeine to wear off? With the average half-life, 200 mg falls to 100 mg after 5 hours, 50 mg after 10, and 25 mg after 15. It takes about 38 hours to fall under 1 mg. A shorter or longer half-life changes every one of those times.

How much caffeine is left after 12 hours? About 19% of the dose, with the average half-life of 5 hours. From a 95 mg coffee, that's about 18 mg. From 200 mg, about 38 mg.

How many hours before bed should you stop caffeine? For a cup of coffee, at least 8.8 hours, according to a 2023 meta-analysis of 24 studies. Bigger doses need longer: 13.2 hours for a typical pre-workout supplement. For an 11 PM bedtime, that puts your last coffee at about 2:12 PM.

Is 4pm too late for coffee? For most bedtimes, yes. A 95 mg coffee at 4 PM still leaves about 36 mg at 11 PM with the average half-life. The meta-analysis found coffee should be drunk at least 8.8 hours before bed, so a 4 PM coffee fits a bedtime of 12:48 AM or later.

Can you sleep after 100 mg of caffeine? Many people can fall asleep, but sleep may suffer. EFSA says 100 mg can affect sleep in some adults, especially close to bedtime. In a 2013 study, caffeine taken 6 hours before bed cut sleep by more than an hour, and people didn't notice it in their sleep diaries.

Is 700 mg of caffeine too much for one day? It's well over the 400 mg a day that the FDA and EFSA consider safe for most healthy adults. Too much can cause a racing heart, jitters, anxiety, nausea, and trouble sleeping. The FDA estimates toxic effects can come from consuming about 1,200 mg quickly.

Does decaf coffee have caffeine? A little. The FDA says an 8-ounce cup of decaf typically has 2 to 15 mg, compared with about 95 mg in regular brewed coffee.

Does this calculator save my data? It runs in your browser and sends nothing anywhere. It remembers your bedtime and drinks on this device so you can check again later. Clear them anytime.

Related reading

Sources

  1. Institute of Medicine. Caffeine for the Sustainment of Mental Task Performance, chapter 2: Pharmacology of Caffeine. National Academies Press, 2001.
  2. Gardiner C, et al. The effect of caffeine on subsequent sleep: A systematic review and meta-analysis. Sleep Medicine Reviews, 2023.
  3. Drake C, et al. Caffeine Effects on Sleep Taken 0, 3, or 6 Hours before Going to Bed. Journal of Clinical Sleep Medicine, 2013.
  4. EFSA Panel on Dietetic Products, Nutrition and Allergies. Scientific Opinion on the safety of caffeine. EFSA Journal, 2015.
  5. U.S. Food and Drug Administration. Spilling the Beans: How Much Caffeine is Too Much?
  6. U.S. Department of Agriculture. FoodData Central, SR Legacy.

This calculator is for general wellness and education. It isn't medical advice. If you're pregnant or breastfeeding, take medications, or have a heart condition or trouble sleeping, talk to your doctor about caffeine.

More tools