Caffeine half-life calculator

Enter the caffeine you had, how many hours ago, and a half-life. The calculator estimates how much is left now and how long until it drops to a level you pick, for example before bedtime. It is an estimate for planning, not a medical measurement.

mg
h
h
mg
Caffeine left66 mg
Share of the dose left
33 %
Already eliminated
134 mg
Hours until it falls to that level
10 h
Hours until a quarter is left
10 h

Runs in your browser: nothing you enter is sent anywhere.

How to use it

  1. Enter the caffeine in milligrams: check the label, or use the caffeine intake calculator for typical drinks.
  2. Enter the hours since you had it.
  3. Keep the 5-hour half-life or set your own.
  4. Optionally set a level, such as the amount you want left at bedtime.

The formula

Caffeine is cleared roughly exponentially:

left = dose × 0.5^(hours ÷ half-life)

and the time to reach a level is half-life × log₂(dose ÷ level). After one half-life half is left, after two a quarter, after three an eighth.

Worked example

200 mg of caffeine, 8 hours ago, half-life 5 hours:

  • 8 ÷ 5 = 1.6 half-lives; 0.5^1.6 = 0.33;
  • left: 200 × 0.33 = 66 mg (33 % of the dose), 134 mg already eliminated;
  • to reach 50 mg: 5 × log₂(200 ÷ 50) = 5 × 2 = 10 hours after the drink.

Limits

  • The model assumes all the caffeine has been absorbed; in reality absorption takes up to about an hour after drinking.
  • Sensitivity differs as much as the half-life: the same amount keeps some people awake and not others.
  • This is not medical advice. If you are pregnant, take medication or have a heart condition, ask a doctor about caffeine.

Frequently asked questions

What is the half-life of caffeine?

It is the time the body takes to clear half of the caffeine. In healthy adults it is typically somewhere around 3 to 7 hours, with 5 hours a common middle value, which is the default here. It varies a lot from person to person.

What makes the half-life longer or shorter?

Smoking tends to shorten it. Pregnancy, some oral contraceptives, some medicines and liver disease can lengthen it considerably, and genetics plays a part. If you know your caffeine lasts long, try 7 or 8 hours; if it wears off fast, try 3 or 4.

How much caffeine is left after 8 hours?

With a 5-hour half-life, 8 hours is 1.6 half-lives, and 0.5^1.6 = 0.33. A 200 mg coffee leaves about 66 mg, a third of the dose. With a 7-hour half-life it would be about 91 mg.

When should I stop drinking coffee before bed?

Use the level field: enter the amount you are comfortable with at bedtime and read the hours it takes to get there. From 200 mg to 50 mg takes two half-lives, 10 hours at a 5-hour half-life, so a 200 mg coffee at 2 pm is down to about 50 mg near midnight.

Can I add several drinks?

Each drink decays on its own, so you can work them out one by one and add what is left. For example, 100 mg 6 hours ago and 100 mg 2 hours ago at a 5-hour half-life leave about 44 + 76 = 120 mg.

More in Health

All tools in this category: Health ·Updated November 4, 2026

Privacy choices

Google Analytics shows us which tools are used and whether they work. It may set cookies. Your choice is kept in this browser.