Health & Wellness

Caffeine calculator: caffeine in your system and last coffee before bed

Your coffees, teas and sodas → caffeine left hour by hour, coffee cut-off time and EFSA safe levels.

  • Instant
  • Free
  • Private (processed locally)
  • No sign-up
Body weight

What you drank today

Average EFSA values; edit the mg if you know the exact amount (label, brand).

Estimated amount (mg) from midnight to noon tomorrow.

EFSA safe levels

EFSA, Scientific Opinion on the safety of caffeine (2015).

Hour by hour

ℹ️ Educational estimate based on average kinetics: the real half-life ranges from 2 to over 10 hours between people. Not medical advice. 100% local: nothing leaves your browser.

How much caffeine is still in your system?

A coffee in the morning, an espresso after lunch, a soda in the afternoon: caffeine adds up and leaves your body slowly. This caffeine calculator rebuilds your day, estimates the amount of caffeine in your body at any time, when you drop below a sleep friendly threshold and the latest time for your next cup. It also checks your intake against the official EFSA safe levels (European Food Safety Authority).

  1. Pick your profile

    Adult, pregnant or breastfeeding, or teenager: the daily reference changes. Enter your weight in kg or lb to get the dose per kilogram.

  2. Set the half-life

    Typical (5 h), smoker (3 h), oral contraceptive (8 h), late pregnancy (15 h) or a custom value if you know you clear caffeine faster or slower.

  3. Log your drinks

    For each intake, choose the drink, the quantity and the time. Caffeine amounts come from EFSA and can be edited (energy drink label, caffeine pill, coffee shop brew).

  4. Read the results

    Caffeine now and at bedtime, when you go below the threshold, the cut-off time for the drink you are planning, a 36 hour curve and an hour by hour table. Copy summary puts it all on your clipboard.

How caffeine is absorbed and cleared

Caffeine reaches the blood within 30 to 60 minutes, then the liver clears it at a rate proportional to the amount present: first order kinetics, described by the half-life. The tool uses the Bateman model (exponential absorption and elimination) and adds up every intake:

  • amount(t) = dose × ka ÷ (ka − ke) × (e−ke·t − e−ka·t), with ke = ln 2 ÷ half-life and ka = 5 h⁻¹, which puts the blood peak about 45 minutes after intake.
  • For 200 mg with a 5 hour half-life: a 181 mg peak after 44 minutes, then 103 mg at 5 h, 51 mg at 10 h, 26 mg at 15 h and 13 mg at 20 h.
  • The cut-off is the latest time (in 5 minute steps) that keeps caffeine under the threshold for the 8 hours after bedtime, because a drink taken right before bed keeps being absorbed during the night.
5 h
average adult half-life
400 mg
per day at most for adults (EFSA, FDA)
200 mg
per single dose, or per day when pregnant
3 mg/kg
per day for children and teenagers

Caffeine content of common drinks

Drink or foodServingCaffeine (average)
Espresso60 ml (2 oz)80 mg
Filter coffee200 ml (7 oz)90 mg
Instant coffee200 ml (7 oz)60 mg
Decaf coffee200 ml (7 oz)about 3 mg
Black tea220 ml (7.5 oz)50 mg
Green tea220 ml (7.5 oz)30 mg
Cola12 oz can (355 ml)40 mg
Energy drink250 ml (8.4 oz)80 mg
Dark chocolate50 g25 mg
Milk chocolate50 g10 mg

Average values from EFSA (2015) and USDA, used as defaults in the tool.

Coffee cut-off time by half-life

For a single drink in the day, an 11 pm bedtime and a 50 mg threshold, the tool gives these cut-off times. Cola (40 mg) and black tea (50 mg) stay under that threshold whatever the time.

DrinkHalf-life 3 hHalf-life 5 hHalf-life 8 hHalf-life 15 h
Espresso (80 mg)8:45 pm7:20 pm5:20 pm12:35 pm
Filter coffee (90 mg)8:15 pm6:30 pm4:00 pm10:00 am
Energy drink 500 ml (160 mg)5:45 pm2:20 pm9:20 amnone

Drinks add up: with a filter coffee at 8 am and an espresso at 1 pm (170 mg), caffeine peaks at 114 mg around 1:40 pm and 32 mg are still there at 11 pm with a 5 hour half-life. With an 8 hour half-life, 59 mg remain and you only drop below 50 mg at 12:57 am.

Caffeine and sleep: what to know

  • A landmark study (Drake et al., 2013) found that 400 mg taken 6 hours before bed still cut total sleep by about an hour: caffeine works long after you stop feeling it.
  • The 50 mg threshold is a practical rule of thumb, not a standard: sensitive people may lower it to 20 or 30 mg.
  • To time your bedtime or wake-up between sleep cycles, try our sleep cycle calculator.
  • Coffee does not sober you up: it masks drowsiness without speeding up alcohol elimination, as our blood alcohol estimator explains.

This tool gives an average estimate and is not medical advice. Talk to a health professional if you are pregnant or have heart problems, anxiety, reflux or take medication (some antidepressants and antibiotics greatly slow down caffeine clearance).

Frequently asked questions

How long does caffeine stay in your system?

Its half-life is about 5 hours in healthy adults: every 5 hours, the amount left is cut in half. After a 200 mg dose, about 103 mg remain after 5 h, 51 mg after 10 h and 13 mg after 20 h, so it takes almost a full day to clear nearly all of it.

How much caffeine per day is safe?

According to EFSA, up to 400 mg a day (about four 200 ml cups of filter coffee) and up to 200 mg in a single dose raise no safety concerns for healthy adults. During pregnancy and breastfeeding the reference is 200 mg a day. For children and teenagers it is 3 mg per kilogram of body weight per day. The FDA also cites 400 mg a day for healthy adults.

When should I stop drinking coffee before bed?

With a 5 hour half-life, an 11 pm bedtime and a 50 mg threshold, a single 200 ml filter coffee (90 mg) should be finished by 6:30 pm, an espresso (80 mg) by 7:20 pm and a large 500 ml energy drink (160 mg) by 2:20 pm. If you already had a filter coffee at 8 am and an espresso at 1 pm, a third filter coffee must come before 11:05 am, so a 3 pm cup is already too late.

Why does caffeine half-life vary between people?

The liver breaks caffeine down, mainly through the CYP1A2 enzyme. Smoking speeds it up (half-life around 3 h), oral contraceptives slow it down (around 8 h) and late pregnancy even more (up to 15 h). Genetics, some medicines and liver disease also matter. Pick the profile that fits you or enter your own half-life.

How much caffeine is in coffee, tea and soda?

EFSA averages: 80 mg in a 60 ml espresso, 90 mg in a 200 ml filter coffee, 50 mg in a 220 ml black tea, 40 mg in a 12 oz (355 ml) can of cola, 80 mg in a 250 ml energy drink and 25 mg in 50 g of dark chocolate. Real values vary widely with the bean, the roast and the brewing method, and a large coffee shop drip coffee can exceed 300 mg: edit the mg in the tool when you know the exact figure.