Caffeine calculator: what is in the drink, and what is still in you

Caffeine calculator: what is in the drink, and what is still in you

A caffeine calculator answers two different questions, and they need two different bits of math. "How much caffeine is in this versus that" is a lookup and a division by serving size. "How much is still in me right now" is exponential decay: caffeine leaves the body by first-order elimination, so a fixed fraction goes per hour rather than a fixed number of milligrams. The half-life that drives the second calculation is 3 to 7 hours in adults, per a 2017 review in Frontiers in Psychiatry, and about 5 hours for the average adult per StatPearls. Barista Life runs both calculators free, with no signup.

The two free caffeine calculators

Compare any two drinks per serving and per fluid ounce, or plot what is still in you at bedtime.

Compare two drinksDraw my day curve

The decay formula, written out

The whole thing is one line:

remaining = dose x 0.5 ^ (hours / half_life)

One half-life removes half of what is there. Two half-lives leave a quarter, three leave an eighth. Multiple drinks add together: the second cup lands on top of whatever is left of the first, so the calculator sums each drink's own curve rather than resetting the clock.

Worked example: 200mg at 8am

Take a single 200mg dose at 8am and run it out across the day at the three half-lives the day curve lets you set. Every figure below is that formula and nothing else, rounded to the nearest milligram.

Time Hours after Half-life 3h (fast) Half-life 5h (average) Half-life 7h (slow)
8:00am 0 200mg 200mg 200mg
11:00am 3 100mg 132mg 149mg
2:00pm 6 50mg 87mg 110mg
5:00pm 9 25mg 57mg 82mg
8:00pm 12 12mg 38mg 61mg
11:00pm 15 6mg 25mg 45mg

Arithmetic from the formula above, using the 3 to 7 hour adult half-life range reported in the Frontiers in Psychiatry review and the roughly 5 hour average from StatPearls.

Why the spread between those columns is the real answer

At bedtime the fast column and the slow column differ by more than seven times. That is not a rounding problem, it is the point. StatPearls lists what moves your own number: smoking cuts the half-life by up to 50 percent, late pregnancy can stretch it to around 15 hours, liver disease and drugs that inhibit the same liver enzymes stretch it, and newborns are in a different range entirely. Unless you know which end of the band you sit at, read the band rather than the line.

The model is also optimistic in one direction. It treats each drink as arriving in your bloodstream the instant you swallow it, whereas serum caffeine peaks about two hours after ingestion according to the same Frontiers review, so the first hour or two of every step is drawn higher and earlier than reality.

The comparison side: per serving is not per ounce

The other calculator does the lookup job, and it prints two numbers on purpose. Per serving tells you what one can or cup delivers. Per fluid ounce tells you how concentrated it is, which is the only fair way to compare a 2 oz shot with a 16 oz can. A drink can win on one and lose badly on the other, and most arguments about which drink is "stronger" are two people quoting different columns.

For context, the FDA cites 400mg of caffeine a day as an amount not generally associated with negative effects for most healthy adults, which it describes as about two to three 12 fl oz cups of coffee, while noting wide variation in both sensitivity and clearance speed (FDA). This page is information, not advice.

Related reading

As an Amazon Associate, Barista Life earns from qualifying purchases.

Gear from this guide

FAQ

How does a caffeine calculator work? It multiplies your dose by 0.5 raised to the power of hours divided by half-life. One half-life leaves 50 percent, two leave 25 percent, three leave 12.5 percent, and multiple drinks add together.

What half-life should I use? Adults fall in a 3 to 7 hour range, with about 5 hours as the average adult figure. Smoking shortens it and late pregnancy, liver disease and some medications lengthen it, so run the fast and slow ends rather than trusting one line.

Is there a daily caffeine limit? The FDA cites 400mg a day as an amount not generally associated with negative effects for most healthy adults, and notes wide variation between people. This is information, not advice.

Sources: the 3 to 7 hour adult caffeine half-life and the roughly 2 hour serum peak are stated in the 2017 review "The Safety of Ingested Caffeine: A Comprehensive Review" in Frontiers in Psychiatry. The approximately 5 hour average adult half-life, the up to 50 percent reduction in smokers and the up to 15 hour figure in late pregnancy come from the StatPearls caffeine chapter at NCBI Bookshelf. The 400mg daily context figure and the note on variation come from the FDA consumer update Spilling the Beans: How Much Caffeine is Too Much. All three were fetched and cached on 2026-08-18. Every milligram figure in the table is arithmetic from the stated formula, not a measurement.

Barista Life runs on coffee people. Browse the Barista Life shop to support the site.

Get the good coffee stuff

One email a week: what we verified, what is worth buying, and what is not. No spam, unsubscribe any time.

Back to blog