How to use the caffeine half life calculator
Pick a drink, type how much you had today (cups or ml) and the last time you had it; press Add drink for each more. Add your bedtime to see how much is still in your body then. Choose a half-life: typical (5 hours), smoker (3.2 hours) or your own.
Open Go advanced to set the most caffeine you are comfortable with at bedtime and get the clock time to stop by.
The formula
With a 5-hour half-life: 95 mg at 8:00 am is 13 mg at 10:30 pm; add a second cup at 2:00 pm and the total at 10:30 pm is 42 mg.
Which drinks?
Each drink in the list carries a typical caffeine amount per serving, and “My own amount” takes the mg from a label. The full list with serving sizes is on the caffeine calculator.
How long caffeine lasts
Half-life is the time to remove half. A 1984 study measured 5.1 hours in non-smokers, 5.3 in non-users, 4.1 in heavy users and 3.2 in smokers. After one half-life half is left, after two a quarter, after three an eighth: a 95 mg cup leaves 48, 24, 12 and 6 mg after 5, 10, 15 and 20 hours at 5 hours.
Caffeine and sleep
In a 2013 study 400 mg of caffeine taken at bedtime, 3 hours before or 6 hours before bed each disturbed sleep compared with placebo. The curve marks the 6-hour point before your bedtime. With a 5-hour half-life 400 mg six hours before bed would leave about 174 mg at bedtime — model arithmetic, not a safe line: half-lives vary a lot.
For the whole-day total against the daily limit, see the caffeine calculator.
Sources
- “Cardiovascular effects of coffee and caffeine”, Am J Cardiol 1984 (abstract read via Europe PMC, 2026-11-06): caffeine half-life 5.1 hours in non-smokers and 5.3 hours in non-users, against 3.2 hours in smokers and 4.1 hours in heavy caffeine users.
- Drake C, Roehrs T, Shambroom J, Roth T, Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed, J Clin Sleep Med 2013;9:1195–1200 (read 2026-11-06): 400 mg of caffeine taken at bedtime, 3 hours before or 6 hours before bed each disturbed sleep compared with placebo; the authors point to the high variability of caffeine’s half-life.
- Caffeine clearance test in patients with liver cirrhosis, Zhonghua Yi Xue Za Zhi (Taipei) 1996 (abstract read via Europe PMC): the elimination half-life was significantly longer in the patient group than in the comparison group.
- Drink amounts: USDA FoodData Central (SR Legacy, public API, read 2026-11-06) gives the caffeine per 100 g of each drink; we multiply by a typical serving. Check the label for energy drinks and anything not listed.
For information only, not medical advice. The curve is a simple model: it treats each drink as absorbed at once and removed at a steady half-life. Real people differ a lot.
Common questions
What is the half-life of caffeine?
It is the time it takes your body to remove half of the caffeine. A 1984 study found 5.1 hours in non-smokers and 5.3 hours in non-users of caffeine, against 3.2 hours in smokers and 4.1 hours in heavy caffeine users. The calculator uses 5 hours as typical, 3.2 hours for a smoker, or any value from 1 to 24 hours you enter under “My own”.
How long does caffeine stay in your system?
With a 5-hour half-life, a 95 mg cup is down to 48 mg after 5 hours, 24 mg after 10, 12 mg after 15 and 6 mg after 20 hours. A cup at 8:00 am still leaves 13 mg at 10:30 pm. The calculator draws this for all your drinks added together.
When should I stop drinking coffee before bed?
There is no single answer. In a 2013 sleep study 400 mg of caffeine taken even 6 hours before bedtime disturbed sleep compared with placebo, and the authors note how much the half-life varies between people. The “Finish a drink by” table shows the clock time that leaves half, a quarter or an eighth of a drink at bedtime: for bedtime at 10:30 pm and a 5-hour half-life that is 5:30 pm, 12:30 pm and 7:30 am.
How much caffeine is left after 6 hours?
The model says half of it after one half-life, so with 5 hours a 400 mg dose leaves about 174 mg 6 hours later (400 × 0.5 to the power of 6 ÷ 5). That is arithmetic on a typical half-life, not a measurement of you.
Does smoking change how fast I clear caffeine?
In the 1984 study smokers had a half-life of 3.2 hours against 5.1 in non-smokers. Choose “Smoker” to use 3.2 hours, or enter your own.
What can make caffeine stay longer?
Half-lives differ a lot between people, as the sleep study’s authors note. In one study of patients with liver cirrhosis the half-life was significantly longer than in the comparison group. If you know yours or a clinician has told you it is longer, enter it under “My own”.
How accurate is the curve?
It is a simple model: each drink is treated as absorbed all at once at the time you enter, and the amount then halves every half-life. That slightly overstates the first hour and ignores everything that makes people different, so treat it as a guide. Your own half-life is the biggest unknown.
How much caffeine is in my drinks?
The drinks are USDA averages per serving (a cup of brewed coffee is about 95 mg), or type the mg from the label. The caffeine calculator adds up a whole day against the daily limit.