Skip to content

Caffeine Half-Life and Bedtime Cutoff Calculator

Add up every caffeine dose, see how much is left at bedtime for a published half-life, and find the latest time for one more dose under your target.
Caffeine Half-Life and Bedtime Cutoff Calculator: A(t) = D × 0.5^((t − t0) / t½)

Caffeine leaves the body at a steady fraction per hour, so a coffee at 3 pm is still partly there at 11 pm. This calculator adds up every dose you list and shows what remains at bedtime, plus the latest time you could take one more.

In short: Caffeine is cleared at a steady fraction per hour, so the amount left is the dose times 0.5 raised to the hours since intake divided by the half-life. With a 5.5 h half-life, 200 mg at 08:00 leaves about 30.2 mg at 23:00. The calculator adds every dose you list and can give the latest time for one more.

How does the calculator work?

Caffeine elimination is modelled as first order: each hour the body clears the same fraction of whatever is left. The amount remaining from one dose is:

A(t) = D × 0.5(t − t₀) / t½

  • D is the dose in mg.
  • t₀ is the clock time you took it and t is the time you want the estimate for.
  • t½ is the elimination half-life in hours.

With several doses the remaining amounts simply add. The model treats absorption as instant, so it overstates the first hour after a dose. It estimates the amount in the body, not a blood level.

The latest intake time for one more dose P, given a bedtime target T and an amount R already left from earlier doses, comes from solving the same equation for time:

gap (h) = t½ × log₂( P / (T − R) ), and the latest time is bedtime minus that gap.

If T − R is zero or negative, no intake time keeps the total under your target. If P is no bigger than T − R, no cutoff is needed.

The tool does not give an intake time for a dose above the EFSA 2015 reference amounts. If the dose you are considering is above 200 mg, or would take the listed doses above 400 mg in the day (200 mg with the late-pregnancy profile), you see the reference amount instead of a time.

You choose the half-life profile and, if you want a latest intake time, the bedtime target. Nothing is filled in for you. Each dose is 1 to 1000 mg, up to 12 doses, and a custom half-life is 1 to 30 h, with a warning outside the 2.27 to 16 h reported in the studies below.

Half-life presets and where they come from

  • Typical non-smoking adult, 5.5 h. Non-smoking controls averaged 5.37 h (Abernethy 1985) and 6.0 h (Parsons 1978). I rounded the midpoint.
  • Smoker, 3.5 h. Parsons 1978 measured 3.5 h in smokers against 6.0 h in non-smokers.
  • Oral contraceptive user, 7.9 h. Abernethy 1985 measured 7.88 h against 5.37 h in matched controls.
  • Late pregnancy, 11 h. Ortweiler 1987 measured 11.0 h in healthy women at weeks 30 to 38. Knutti 1981 reported a mean of 8.3 h (range 3 to 16 h) across pregnancy.
  • Fast end, 2.3 h and slow end, 9.9 h. Blanchard 1983 found individual half-lives from 2.27 to 9.87 h in healthy men. These are range ends, not genotype calls.

Worked example

You drink 200 mg at 08:00 and go to bed at 23:00 with a 5.5 h half-life. That is 15 h, or 15 / 5.5 = 2.727 half-lives. 0.52.727 = 0.151, so 200 × 0.151 = 30.2 mg remains.

The same dose with other presets leaves 10.3 mg at 3.5 h (smoker) and 53.6 mg at 7.9 h (oral contraceptive user). That spread is the point: the preset matters as much as the clock.

Now say you want 100 mg more and your bedtime target is 50 mg. Room left: 50 − 30.2 = 19.8 mg. Gap = 5.5 × log₂(100 / 19.8) = 5.5 × 2.34 = 12.9 h. Bed at 23:00 puts the latest time at about 10:08; the tool rounds it down to the minute, never up. Take it later and the total at bedtime goes above 50 mg.

The bedtime target is yours

Drake 2013 tested one dose, 400 mg, and found it reduced sleep when taken 0, 3 or 6 h before bed. It did not test a 100 mg or 40 mg level, so I do not use one. If you want a starting point, about 35 mg is what the typical 5.5 h half-life leaves from the 107 mg, 8.8 h coffee gap in Gardiner 2023 (107 × 0.58.8/5.5 = 35.3 mg). That number comes from my arithmetic, not from a published threshold, so the tool leaves the field empty and you set it.

How should you use the result?

  1. Evening sessions. If you train at 18:00 and take a pre-workout, enter it with your bedtime. Gardiner 2023 pooled data pointed to at least 13.2 h between a 217.5 mg pre-workout serving and bed to avoid a drop in total sleep time. For a 22:30 bedtime that means before about 09:18. If the session is later, the table shows what is left and you can decide on a smaller dose or none.
  2. Race day and long rides. Coffee at breakfast, a caffeinated gel at hour three, a cola at the finish. List all of them. The leftovers add up, and the total at bedtime is what the calculator reports. Count that before a stage race or a two-day event where sleep carries over.
  3. A two-week test. Move your last dose earlier by the cutoff the tool gives you, then watch your own numbers. Log sleep onset and wake time in the sleep efficiency calculator and compare the nights. One person's curve is not the curve in a paper.

Related: sleep cycle calculator for bed and wake times, sleep debt calculator for the week as a whole.

What are the limitations?

  • Half-lives are population means. Individual values spanned 2.27 to 9.87 h in one study of healthy men (Blanchard 1983), a four-fold range.
  • Absorption is instant in the model. Real peak levels arrive after a delay, and the first hour after a dose is overstated.
  • The tool starts at zero caffeine. Anything left from yesterday, or a dose you did not log, is missing.
  • Drake 2013 tested 400 mg in a home setting with a portable monitor. Gardiner 2023 pooled 24 studies with mixed designs and doses, so its 8.8 h and 13.2 h figures are summaries, not individual rules. The pooled effect was 45 min less total sleep time and 7% lower sleep efficiency.
  • Medicines, liver conditions and pregnancy change clearance. A late-pregnancy half-life of 11 h is one study's mean, and Knutti 1981 found a range from 3 to 16 h.
  • The 200 mg single dose, 400 mg per day and 200 mg per day in pregnancy figures come from EFSA 2015, which described them as amounts not raising safety concerns. They are not individual limits.
  • Sleep depends on more than caffeine. Alcohol, late light, stress and training load all move it.

⚠️ HEALTH & TRAINING GUIDANCE

Caffeine clearance differs between people and changes with pregnancy, some medicines and liver conditions. Talk to a doctor or pharmacist before changing your intake because of these estimates.

ℹ️ IMPORTANT DISCLAIMER

This calculator is for educational purposes only and does NOT constitute medical advice. Consult qualified professionals before making changes. Individual physiology varies. You assume all risk. Must be 18+.

Frequently asked questions

How long does caffeine stay in your body?

It depends on your half-life. Non-smoking adults averaged 5.37 h and 6.0 h in two studies, smokers 3.5 h, oral contraceptive users 7.88 h, and healthy women late in pregnancy 11.0 h. Individual half-lives ranged from 2.27 to 9.87 h in one study of healthy men, so the preset matters as much as the clock.

How much caffeine is left at bedtime?

Each dose decays on its own and the amounts add. 200 mg at 08:00 with a 5.5 h half-life leaves 30.2 mg at 23:00. The same dose leaves 10.3 mg with a 3.5 h half-life and 53.6 mg with 7.9 h. The model treats absorption as instant and estimates the amount in the body, not a blood level.

How long before bed should I stop caffeine?

Gardiner 2023 pooled 24 studies. Its figures point to a gap of 8.8 h between a 107 mg coffee and bed, and at least 13.2 h for a 217.5 mg pre-workout serving, to avoid a drop in total sleep time. The pooled effect was 45 min less total sleep time. These are summaries, not individual rules.

Why does the calculator give no intake time for a large dose?

If the dose you are considering is above 200 mg, or would take the listed doses above 400 mg in the day (200 mg with the late-pregnancy profile), you see the EFSA 2015 reference amount instead of a time. EFSA described these as amounts not raising safety concerns. They are not individual limits.

What bedtime target should I use?

You set it. Drake 2013 tested one dose, 400 mg, taken 0, 3 or 6 h before bed, so it gives no lower level. About 35 mg is what the typical 5.5 h half-life leaves from the 107 mg, 8.8 h coffee gap in Gardiner 2023, but that is arithmetic, not a published threshold, so the field starts empty.

Related calculators

References

  1. Drake C, Roehrs T, Shambroom J, Roth T · 2013 · J Clin Sleep Med · PMID 24235903 · doi
  2. Gardiner C, Weakley J, Burke LM, et al. · 2023 · Sleep Med Rev · PMID 36870101 · doi
  3. Parsons WD, Neims AH · 1978 · Clin Pharmacol Ther · PMID 657717 · doi
  4. Abernethy DR, Todd EL · 1985 · Eur J Clin Pharmacol · PMID 4029248 · doi
  5. Blanchard J, Sawers SJ · 1983 · J Pharmacokinet Biopharm · PMID 6886969 · doi
  6. Knutti R, Rothweiler H, Schlatter C · 1981 · Eur J Clin Pharmacol · PMID 7341280 · doi
  7. Ortweiler W, Peiker G, Siegert C, et al. · 1987 · Pharmazie · PMID 3671445
  8. EFSA Panel on Dietetic Products, Nutrition and Allergies · 2015 · EFSA Journal (Scientific Opinion on the safety of caffeine) · not indexed in PubMed · doi