Caffeine Calculator

Caffeine lingers for hours. Enter your drinks and times to see how much is still in your system when you go to bed.

  • Tested formula
  • Instant results
  • Updated October 7, 2026

Your details

mg
8 oz brewed coffee ≈ 95 mg
mg
mg
Espresso shot ≈ 63 mg; energy drink ≈ 80–300 mg

Results Updates as you type

How it is calculated

Caffeine left = Σ Dose × 0.5(Hours since drink ÷ Half-life)
Example: Two cups of coffee (95 mg each) at 8:00 AM and 2:00 PM, with a 5-hour half-life, leave about 42 mg in your body at 10:30 PM — more than a fifth of what you drank. The level fell below 50 mg at about 9:15 PM.

Sleeping better

  • Move your last caffeinated drink earlier in the day.
  • Watch for hidden caffeine in tea, chocolate, pre-workout and some pain relievers.
  • If you are sensitive, try the “slow” half-life setting.

Brewing at home? Get the ratio right with the coffee ratio calculator.

How to use the calculator

  1. Enter the caffeine content and time of up to three drinks today.
  2. Choose a half-life that fits you (5 hours is the typical adult average) and the time you plan to sleep.
  3. Read how much caffeine will still be in your body at bedtime and when it drops below common thresholds.

Caffeine in common drinks

DrinkCaffeine (mg)
Brewed coffee, 8 oz (240 ml)80–100 (≈95)
Espresso, 1 shot (30 ml)≈63
Instant coffee, 8 oz60–80
Decaf coffee, 8 oz2–15
Black tea, 8 oz40–50
Green tea, 8 oz25–30
Cola, 12 oz (355 ml)30–40
Energy drink, 8.4 oz (250 ml)≈80
Large energy drink, 16 oz150–300
Dark chocolate, 1 oz (28 g)≈12–25

Values are typical figures from USDA FoodData Central and manufacturers; coffee shop servings can contain much more — a large brewed coffee may exceed 300 mg.

What affects caffeine half-life?

For most healthy adults the half-life of caffeine is about 3–7 hours, averaging around 5. It varies with:

  • Smoking: roughly halves the half-life, so smokers clear caffeine much faster.
  • Pregnancy: extends it substantially, up to 15 hours or more in the third trimester.
  • Oral contraceptives: can roughly double it.
  • Genetics: variations in the CYP1A2 liver enzyme make some people fast and others slow metabolizers.
  • Liver disease and some medications (for example fluvoxamine and some antibiotics) slow clearance markedly.

How much is too much?

The U.S. Food and Drug Administration and the European Food Safety Authority consider up to 400 mg a day generally safe for healthy adults — about four cups of brewed coffee. EFSA suggests no more than about 200 mg in a single dose and no more than 200 mg a day during pregnancy. Children and teenagers should have much less.

Caffeine and sleep

Caffeine blocks adenosine, the brain chemical that builds sleep pressure during the day. A controlled study (Drake et al., 2013, Journal of Clinical Sleep Medicine) found that 400 mg taken even 6 hours before bed reduced total sleep by more than an hour, often without people noticing. A practical rule is to stop caffeine at least 8 hours before bedtime and to keep the amount remaining at bedtime low; the calculator shows when your level falls below 50 mg as a guide.

Frequently asked questions

What is the half-life of caffeine?
About 5 hours on average in healthy adults, but it ranges from roughly 2 to 10 hours. Smoking shortens it; pregnancy and oral contraceptives lengthen it.
How much caffeine is in coffee?
An 8-oz (240 ml) cup of brewed coffee has about 95 mg, a shot of espresso about 63 mg, black tea about 47 mg and a 12-oz cola about 35 mg. Energy drinks range from 80 to 300 mg.
How much caffeine is safe per day?
The U.S. FDA says up to 400 mg a day is generally not associated with negative effects in healthy adults. During pregnancy the usual advice is 200 mg or less.
When should I stop drinking coffee before bed?
A study in the Journal of Clinical Sleep Medicine found 400 mg taken even 6 hours before bed reduced sleep by over an hour. Many experts suggest a cutoff 8 hours before bedtime.
How long does caffeine stay in your system?
With a 5-hour half-life, half is gone after 5 hours, three-quarters after 10 hours and about 94% after 20 hours. Small amounts can linger into the next day.
Does coffee dehydrate you?
Not in normal amounts. Studies show moderate coffee intake hydrates about as well as water for habitual drinkers, although very high doses have a mild diuretic effect.

Last reviewed October 7, 2026. Results are estimates for informational purposes; see our disclaimer.