Caffeine Calculator

List today's drinks and see how much caffeine is left at bedtime.

Before you rely on this result. This tool is for education only and is not medical advice. Clinical decisions must be made by a qualified health professional using the full clinical picture. Sources used on this page.

How it's worked out

Your liver clears caffeine at a steady proportional rate. The time it takes to clear half of what is in your body is the half-life. After one half-life, half of a drink is left. After two, a quarter is left. The tool adds up what is left from every drink you list.

left\displaystyle \text{left}=dose×0.5t/h\displaystyle {}= \text{dose} \times 0.5^{\,t \,/\, h}

Here t is the hours since the drink and h is the half-life in hours. A brewed coffee has about 95 mg. With a 5-hour half-life, about 48 mg is left 5 hours later and 24 mg after 10 hours.

Adults clear half their caffeine in 3 to 7 hours, according to a 2017 review by Temple and colleagues. The tool starts at 5 hours, and you can change it. Smoking roughly halves the half-life. The contraceptive pill tends to double it. In pregnancy it is about 8 hours longer on average and can be up to 16 hours longer, past the 12 hours this tool models.

The model treats each drink as taken in all at once. In real life caffeine takes 30 to 60 minutes to reach its peak, so the true peak comes a little later and a little lower than the chart shows. The amounts in each drink are typical values; a coffee shop cup can hold twice as much.

Worked examples

Dana's office day

Dana has a brewed coffee at 7:30, a double espresso at 10:30 and a cola at 3 p.m. That is 255 mg for the day, well under 400 mg. By her 10:30 p.m. bedtime about 48 mg is left, roughly 0.5 of a cup of coffee, and about 16 mg remains when she wakes 8 hours later. Open this example in the tool

A large energy drink at 4 p.m.

Sam drinks a 16 fl oz energy drink, about 160 mg, at 4 p.m. and goes to bed at 11. Seven hours later about 61 mg is still there, and it only drops under 50 mg at 12:30 a.m.. To be under 50 mg at 11 p.m., the same can would need to come by 2:37 p.m.. Open this example in the tool

Slower clearance in pregnancy

Priya, who is pregnant, has a coffee at 8 a.m. and a black tea at 1 p.m. Her total of 142 mg is under the 200 mg ACOG advises. With a 10-hour half-life, 61 mg is left at 10 p.m. With the typical 5 hours it would be 27 mg, so the same two drinks keep more caffeine in her body at night. Open this example in the tool

Reading your result

The big number is the caffeine still in your body at bedtime. There is no agreed safe level for sleep. In a 2013 study by Drake and colleagues, 400 mg taken 6 hours before bed cut total sleep by more than an hour, and people did not always notice. So the lower the bedtime number, the better. The tool marks when you drop under a low level you choose: 25, 50 or 100 mg.

The daily total is a separate question. The FDA cites 400 mg a day, about four cups of brewed coffee, as an amount not generally linked to harmful effects in healthy adults. ACOG advises under 200 mg a day in pregnancy. The European Food Safety Authority found single doses up to 200 mg raise no safety concern for healthy adults. The FDA notes that about 1,200 mg, less than half a teaspoon of pure caffeine, can cause seizures.

The half-life table shows how much your own clearance rate matters. If you sleep badly even with a low number here, your half-life may be longer than 5 hours. Try 7 or 10 and see how the curve changes.

Common mistakes

  • Counting a large coffee as one cup. The drink list uses an 8 fl oz cup. A 16 fl oz coffee-shop cup is two servings or more, so set the servings to 2.
  • Forgetting hidden caffeine. Cola, iced tea, dark chocolate, pre-workout powder and some pain relievers all add caffeine. A label in mg can go in with Other.
  • Treating decaf as zero. Decaf still has a few milligrams a cup. It matters only if you drink several or are very sensitive.
  • Assuming the total is what keeps you awake. Two coffees before 9 a.m. can leave less at bedtime than one at 4 p.m. The timing decides the bedtime number.

Questions people ask

Sources

Maintained by Updated October 28, 2026Checked against 14 reference values