What this calculator does
Caffeine does not vanish when the cup is empty; it leaves the body exponentially, which is why a late afternoon coffee can still be measurable at midnight. This calculator models that decay with the half-life you choose, shows how much caffeine remains at two-hour intervals, and estimates how long it takes to fall below a threshold you set. The defaults - a 200 mg dose, a 5-hour half-life, and a 20 mg threshold - are common planning values for a healthy adult, not recommendations for you. Half-life varies widely with genetics, pregnancy, oral contraceptives, liver conditions, smoking, and medicines, and a real drink peaks about 30 to 60 minutes after you finish it. Use this to picture the curve, not to dose yourself, decide whether you are safe to drive, or replace medical advice.
How to use it
- Add up the caffeine in the serving you actually had, in milligrams - check labels rather than guessing when you can.
- Set the half-life; leave 5 hours for a general adult estimate, raise it for pregnancy or certain medicines after asking a clinician.
- Set the threshold you want to fall below, such as 20 mg, and treat it as a planning value, not a safety line.
- Read the time until below the threshold and the share of the dose remaining at 4 hours.
- Use the two-hour table to see the shape of the curve instead of a single endpoint.
- Change one input at a time: doubling the half-life doubles the time to the threshold, while doubling the dose adds one half-life.
How it works
Example calculations
Example 1: A 200 mg coffee
A 200 mg dose with a 5-hour half-life leaves about 152 mg at 2 hours, 115 mg at 4 hours (57.4%), 87 mg at 6 hours, and 66 mg at 8 hours. It falls below 20 mg after about 16.6 hours - most of a waking day.
Example 2: A smaller dose
A 100 mg tea or small coffee with the same 5-hour half-life drops below 20 mg after about 11.6 hours, and about 57 mg is left at 4 hours. Halving the dose does not halve the time to the threshold; it removes exactly one half-life, about 5 hours.
Example 3: A long half-life
A 400 mg dose with a 6-hour half-life leaves about 159 mg at 8 hours and takes about 25.9 hours to fall below 20 mg. The same 300 mg with a 4-hour half-life falls below 20 mg in about 15.6 hours and is down to about 75 mg at 8 hours. The half-life matters as much as the dose.
What the result means
The curve is exponential, so most of the drop happens early and the tail is long. That is why the 2-hour table is more useful than a single number: it shows the shape of the afternoon and evening rather than one endpoint. The half-life is the single most uncertain input. Published estimates for caffeine cluster around 4 to 5 hours in healthy adults, but ranges from roughly 1.5 to 9 hours are reported depending on genetics, pregnancy, oral contraceptives, liver disease, smoking, and medicines. A threshold is not a safety limit; it is a level you chose so the calculator has a finish line. And the model is smooth, while real absorption peaks after the drink and then declines, so the first hour is approximate. If you are pregnant, breastfeeding, taking medicines, or managing a heart, sleep, or anxiety condition, talk to a clinician or pharmacist about your own caffeine rather than tuning this calculator.
Common mistakes
- Treating the threshold as a medical safety limit rather than a planning value you chose.
- Using a 5-hour half-life for everyone, when pregnancy, some medicines, smoking, and genetics change it substantially.
- Forgetting that absorption peaks about 30 to 60 minutes after the drink, so the first hour is not pure decay.
- Adding up only coffee and ignoring tea, cola, energy drinks, chocolate, supplements, and some medicines.
- Using the model to decide whether it is safe to drive or to skip a medical question; it cannot do either.
Assumptions and limits
- Caffeine is eliminated with first-order kinetics and a constant half-life you choose.
- The whole dose is absorbed quickly; real absorption peaks about 30 to 60 minutes after consumption.
- The threshold is a personal planning value, not a medical or legal safety limit.
- No new caffeine is consumed during the modeled window; a second drink starts a new curve.
- The default half-life of 5 hours is a general adult estimate, not a personalized prediction.
Frequently asked questions
What is the half-life of caffeine?
About 4 to 5 hours in most healthy adults, but published estimates range from roughly 1.5 to 9 hours. Pregnancy, oral contraceptives, liver conditions, smoking, and some medicines change it. The calculator lets you set it so you can see how much the answer depends on that one input.
How long does caffeine stay in your system?
It depends on dose, half-life, and the threshold you care about. With a 200 mg dose and a 5-hour half-life, it takes about 16.6 hours to fall below 20 mg. For most adults, a meaningful amount is still present many hours after the last drink, which is why timing matters for sleep.
Is 400 mg of caffeine a day safe?
The FDA cites 400 mg a day as an amount not generally associated with negative effects in most healthy adults, and EFSA uses the same daily figure with up to 200 mg in a single dose as reference points. Those are general reference values, not personal limits. Pregnancy, breastfeeding, heart conditions, anxiety, sleep problems, and medicines can change the advice, so ask a clinician.
Why does the calculator show values every two hours?
Because the curve is easiest to understand as a shape. Two-hour points cover the usual afternoon and evening window without a wall of numbers, and the share-remaining column shows how quickly the first half of the caffeine disappears compared with the long tail.
Does the threshold mean I am safe below it?
No. It is a planning value you choose, not a medical safety line. The calculator cannot tell you whether you are safe to drive, whether caffeine will affect your sleep, or how your body will respond. Those questions need a clinician who knows your health and medicines.
Why is there no single answer for my body?
Because caffeine metabolism is personal. The model uses one constant half-life and immediate absorption, while real bodies absorb, distribute, and clear caffeine at different rates. That is why the calculator shows a range-friendly curve and a visible half-life input instead of a single definitive number.
Sources
2026 update
How to use the professional output
This page is not just a formula box. The result is designed to be checked, compared, and taken away.
- Professional worksheet. The result includes the inputs used, the method and scope, and a one-variable sensitivity check for finance calculators.
- A/B scenarios. Save two input sets in the browser and compare the primary, secondary, and breakdown figures side by side.
- Print / PDF and CSV. Print a branded worksheet, or export the year-by-year table when the calculator produces one.
The formulas and assumptions above still govern the number. The worksheet makes the estimate auditable; it does not make it a lender quote, tax return, or personalized advice.
FROM THE EXPERIMENT TO THE REAL ANSWER
If you need the real number
The Lab is for playing. These calculators are built for decisions that matter.