Caffeine Half-Life Calculator

How long has it been since your last coffee? Adjust the half-life to match your own body and see how much caffeine is still in your system now and at bedtime. This is a general estimate, not medical advice.

How the calculation works

In healthy adults, the amount of caffeine in the body is often described as halving roughly every 5 hours. The calculator uses simple exponential decay: remaining = dose Γ— 0.5(hours elapsed Γ· half-life). With a 5-hour half-life, 50% is left after 5 hours, 25% after 10 hours and 12.5% after 15 hours. Change the half-life to something like 3 or 7 hours and the answer changes with it; the table under the result shows the whole timeline.

This is a deliberately simple model. It describes the decline after absorption has finished. In real life, blood levels keep rising for roughly the first 30 to 60 minutes after you drink something, so numbers right after a cup will not match the curve exactly.

Share remaining after each half-life (calculated at build time)

The share left depends only on how many half-lives have passed, not on the dose. The right-hand columns convert half-lives into hours for three assumed half-lives.

Half-livesRemaining (%)Cleared (%)3 h half-life5 h half-life7 h half-life
0.570.729.31.5 h2.5 h3.5 h
150.050.03 h5 h7 h
225.075.06 h10 h14 h
312.587.59 h15 h21 h
46.393.812 h20 h28 h
53.196.915 h25 h35 h
61.698.418 h30 h42 h

A 200 mg dose at different half-lives (calculated at build time)

After3 h half-life5 h half-life7 h half-life
4 h79.4 mg114.9 mg134.6 mg
8 h31.5 mg66.0 mg90.6 mg
12 h12.5 mg37.9 mg61.0 mg
16 h5.0 mg21.8 mg41.0 mg

Eight hours after the same 200 mg, the amount left ranges from 31.5 mg to 90.6 mg depending on the half-life. That spread is exactly why one average cannot describe everybody.

Worked examples

Example 1: 150 mg at 3 p.m., bedtime at 11 p.m. (5-hour half-life)

Eight hours is 1.6 half-lives, so 150 Γ— 0.51.6 β‰ˆ 49.5 mg remains, about a third of the dose. Someone with a 7-hour half-life would still hold noticeably more at the same time.

Example 2: two separate drinks

100 mg at 8 a.m. and 100 mg at 1 p.m., checked at 11 p.m. with a 5-hour half-life: the morning dose has had 15 hours and leaves 12.5 mg; the afternoon dose has had 10 hours and leaves 25 mg. The total is 37.5 mg. The calculator handles one dose at a time, so for several drinks calculate each separately and add the results.

Working backwards to a last-drink time

If you decide how much you are comfortable having left at bedtime, you can solve for the cut-off:hours needed = half-life Γ— log2(dose Γ· target amount). The 25 mg target below is just an illustrative number, not a safety threshold.

Bigger doses and longer half-lives push the cut-off much earlier. If the answer is unrealistically early, a smaller serving or a decaf swap is the practical fix.

Half-life differs from person to person

Genetics, liver function, pregnancy, smoking and medications can all change how quickly caffeine is cleared. The usual direction of each factor is below.

The 5-hour figure is a typical value for healthy adults. If you know you are sensitive, set a longer half-life to stay on the cautious side.

Daily intake guidance

The U.S. FDA cites about 400 mg per day, roughly four or five cups of coffee, as an amount not generally associated with negative effects in healthy adults. That is a general reference rather than a guarantee, and some people feel jitters, anxiety or sleeplessness on far less. If you are pregnant, nursing or have a heart condition, talk with a clinician. Caffeine content varies by product, so check labels, and add up your whole day with theCaffeine Calculator.

Caffeine and sleep

When one half-life has passed, half of the caffeine is still there. That is why a late-afternoon coffee can still matter at night. A common rule of thumb is to finish caffeine at least six hours before bed, but sensitive people may need an earlier cut-off. Caffeine is also thought to affect the depth of sleep, not only how quickly you fall asleep. To plan your bedtime around sleep cycles, try the Sleep Cycle Calculator.

Common misunderstandings

When not to rely on this calculator

Using the result

Frequently Asked Questions

How long until caffeine is completely gone?

Roughly four to five half-lives (about 20 to 25 hours with a 5-hour half-life) clear most of it, around 94 to 97%. A pure halving model never reaches exactly zero; it only gets closer.

Is the result medically accurate?

No. It applies an average half-life to give a reference estimate, and your actual metabolism may differ. It does not replace diagnosis or advice.

What half-life should I choose?

If you do not know, keep the average of 5 hours. If afternoon coffee clearly affects your sleep, try 6 to 7 hours to be cautious. During pregnancy the half-life may be longer.

How much coffee per day is too much?

The FDA cites about 400 mg a day for healthy adults, and ACOG advises under 200 mg during pregnancy. Your own sensitivity may mean less is right for you.

What leftover amount is safe for sleep?

There is no fixed number. Some people sleep fine with a sizeable amount left and others do not. Use the figure for comparison and find your own cut-off from notes on how you slept.

Do I still feel alert after the half-life has passed?

Remaining caffeine can still have an effect. How alert you feel also depends on dose, tolerance and how rested you are, so the remaining amount alone cannot predict it.