BYTETOOLS

Caffeine Half-Life Calculator

See how much caffeine is still in your system at bedtime by modelling each coffee, tea and energy drink with an editable half-life and a decay curve.

Caffeine through the day

At bedtime

52 mg

still circulating at 11:00 PM, from 270 mg consumed across the day with a 5.0 hour half-life.

remaining = dose × 0.5^(hours ÷ 5.0), summed over every intake

270 mg
Total consumed
186 mg
Peak in the body
52 mg
Left at bedtime
11:20 PM
Below 50 mg at

Counting from your last intake, it takes about 7 h 50 min to fall below 50 mg — around 11:20 PM. Caffeine needs roughly five half-lives (25 h) to clear almost completely.

Caffeine in your body, hour by hour

7:00 AM
0 mg
8:00 AM
89 mg
9:00 AM
77 mg
10:00 AM
67 mg
11:00 AM
186 mg
12:00 PM
162 mg
1:00 PM
141 mg
2:00 PM
123 mg
3:00 PM
107 mg
4:00 PM
137 mg
5:00 PM
119 mg
6:00 PM
104 mg
7:00 PM
90 mg
8:00 PM
79 mg
9:00 PM
69 mg
10:00 PM
60 mg
11:00 PM
52 mg
12:00 AM
45 mg
1:00 AM
39 mg
2:00 AM
34 mg
3:00 AM
30 mg
4:00 AM
26 mg
5:00 AM
23 mg
6:00 AM
20 mg
7:00 AM
17 mg

A single-compartment first-order decay model: each dose is assumed to be absorbed instantly and then halve every 5.0 hours, and the doses simply add up. Real absorption takes 30–60 minutes, so the true curve rises more gently than this one and peaks slightly lower.

Estimates only — informational, not medical advice, and nothing here diagnoses anything. Caffeine half-life varies enormously: published adult values run from about 1.5 to 9.5 hours, and are shifted by CYP1A2 genetics, smoking, oral contraceptives, pregnancy, liver disease and drugs such as fluvoxamine and ciprofloxacin. Caffeine amounts in coffee shop drinks vary by a factor of three between outlets of the same chain. The EFSA considers up to 400 mg a day, and 200 mg in one sitting, safe for most healthy adults, with 200 mg a day the advice in pregnancy — check with a clinician if any of that applies to you.

What is the Caffeine Half-Life Calculator?

Caffeine follows first-order decay: the amount remaining equals the dose multiplied by 0.5 raised to the power of hours elapsed divided by the half-life. With a typical five-hour half-life, 200 mg falls to 100 mg after five hours and 50 mg after ten.

  • First-order decay model summing every intake across the day
  • Half-life presets for smokers, fast and slow metabolisers, contraceptive users and pregnancy, plus a free value
  • Caffeine table for seventeen common drinks, supplements and chocolate
  • Milligrams at bedtime, peak body load, and the clock time you drop below your chosen threshold
  • Hour-by-hour bar chart with the bedtime row highlighted
  • Handles a bedtime after midnight, and runs entirely offline in your browser

How to use the Caffeine Half-Life Calculator

  1. 1

    Pick a half-life preset that matches your situation, or type your own value into the half-life field.

  2. 2

    Set your bedtime and the sleep threshold you care about — 50 mg is a common benchmark.

  3. 3

    Add each drink or supplement, choosing it from the list to fill in the milligrams, then set the time you had it.

  4. 4

    Use Add caffeine for anything else in the day, and the bin icon to remove a row.

  5. 5

    Read the milligrams remaining at bedtime, the peak level, and the hour-by-hour chart with your bedtime highlighted.

About the Caffeine Half-Life Calculator

The ByteTools Caffeine Half-Life Calculator shows what is still circulating when you go to bed. List every coffee, tea, cola, energy drink or supplement with its time and milligram dose, set your bedtime, and it superimposes the decay curves to give the total left at lights out — plus the time it takes to fall below a threshold you choose.

The half-life is a dropdown of published values rather than a single hardcoded number, because it varies enormously. A typical adult sits near five hours, regular smokers nearer three, and people taking oral contraceptives or in late pregnancy can be at ten to fifteen. You can also type any value you like, and a table of seventeen common drinks fills the milligram figures for you.

Everything is calculated in your browser and nothing is uploaded. These are estimates only, not medical advice, and they diagnose nothing. Real absorption takes 30 to 60 minutes rather than the instant jump this model assumes, and caffeine content in coffee shop drinks varies by a factor of three between outlets of the same chain.

Frequently asked questions

What is the half-life of caffeine?

About five hours in a typical healthy adult, meaning half the dose is gone after five hours and a quarter after ten. Published values in adults range from roughly 1.5 to 9.5 hours, and smoking roughly halves it while oral contraceptives and late pregnancy can double or triple it.

How long before bed should I stop drinking coffee?

A widely cited trial found 400 mg of caffeine six hours before bed still cost about an hour of sleep. With a five-hour half-life, a 200 mg coffee at 3 pm leaves roughly 66 mg at 11 pm — enough to matter for many people. Enter your own drinks above and see where you land against the 50 mg threshold.

How do you calculate caffeine remaining in the body?

Multiply the dose by 0.5 raised to the power of the hours elapsed divided by the half-life, then add the results for every drink. A 95 mg coffee taken eight hours ago with a five-hour half-life leaves 95 × 0.5^(8/5), or about 31 mg.

How long does caffeine take to fully leave your system?

Roughly five half-lives, so about 25 hours for a typical adult, at which point around 3% of the dose remains. That is why a heavy afternoon habit can still be measurable the following morning, and why the effects accumulate day to day.

How much caffeine a day is safe?

The EFSA considers up to 400 mg a day, and 200 mg in a single sitting, safe for most healthy adults, with 200 mg a day advised in pregnancy. Those are population guidelines, not personal ones — sensitivity varies a lot, and anyone with a heart condition, anxiety disorder or on interacting medication should ask a clinician.

Does this tool send my data anywhere?

No. It is plain JavaScript running in your browser, so your drinks, times and bedtime are never uploaded or stored, and the page keeps working offline.

Related tools