TrackCaffeine
English Français Deutsch Español Italiano Português
Get the CoffeeLog app
Metabolism & sleep

Caffeine calculator: how much is in your system right now

This calculator uses the same first-order elimination model as the CoffeeLog app: each dose decays on its own curve with a half-life you can set between 1 and 12 hours (the population average is about 5.7 hours). Add every drink with the time you had it, and it sums the curves to show your real total — not a single label number.

In your system now mg
At bedtime mg
Latest cup before bed
Caffeine remaining over time

Log it in one tap in CoffeeLog →

Estimates for general information, not medical advice.

How to use it

  1. 1Pick a drink or enter a custom mg amount, and the time you had it.
  2. 2Add more drinks for the day with the “add another drink” button.
  3. 3Set your personal half-life and your bedtime.
  4. 4Read how much caffeine is in your system now, at bedtime, and your latest safe cup.

The math behind the curve

Caffeine follows first-order elimination, meaning a fixed fraction leaves your body each hour rather than a fixed amount. The formula is simple: mg remaining = dose × 0.5^(minutes ÷ half-life). With the population-average half-life of 5.7 hours (342 minutes), a 200 mg dose falls to about 138 mg after 3 hours, 96 mg after 6 hours, and 46 mg after 12. The calculator runs this for every drink you add and sums the results at the moment you ask, which is why a coffee at 8 am and an energy drink at 2 pm produce a single, accurate total rather than two separate guesses.

Why your half-life is not average

The 5.7-hour figure is a population mean; your real value can sit anywhere from roughly 1.5 to over 10 hours. Smoking roughly halves it, so smokers clear caffeine fast. Pregnancy can double or triple it. Oral contraceptives, some antidepressants and liver-affecting medications slow it down, while a genetic variant in the CYP1A2 enzyme makes some people fast metabolizers and others slow. The slider lets you match your own experience: if coffee keeps you up far longer than friends, set a longer half-life and watch the bedtime number climb.

From numbers to better sleep

The most useful output is the latest-cup time. It solves the inverse problem — given your bedtime and the caffeine already in you, how late can one more standard cup go before it pushes you over the ~100 mg level that disturbs many people's sleep. Doing this by hand every day is tedious, so the CoffeeLog app keeps the same curve live on your phone and warns you as the cutoff approaches.

Frequently asked questions

How is caffeine in the body calculated?

Each dose follows first-order decay: mg remaining = dose × 0.5^(minutes ÷ half-life). The calculator adds up every dose at the time you ask, the same way the CoffeeLog app does.

What is the half-life of caffeine?

On average about 5.7 hours in healthy adults, meaning half the caffeine is gone after ~5.7 hours. It varies widely — smoking, some medications and genetics can move it from roughly 1.5 to 10+ hours.

How much caffeine is too much before bed?

Many people sleep poorly with more than about 100 mg still in their system at bedtime. The calculator marks the latest time you can have a standard cup and still stay under that line.

Is this medical advice?

No. It is an estimate for general information using population-average pharmacokinetics. Individual metabolism varies; talk to a professional for medical concerns.

CoffeeLog · iOS

Track this automatically with CoffeeLog

Log any drink in one tap, watch caffeine fade in real time on your home screen, and get a nudge before it touches your sleep — the same engine that powers this page.

Coming soon

Related

TrackCaffeine provides general reference information about caffeine. It is not medical advice. Caffeine values are public-source estimates, not exact measurements.

Get the CoffeeLog app