Health Calculators
Caffeine Cutoff Calculator
A half-life is the time it takes for half the caffeine in the body to be cleared. With a 5-hour half-life, half a dose is gone after 5 hours, three quarters after 10 and seven eighths after 15. Enter the dose, the time you took it and your half-life to see the level at bedtime.
Calculator
Formula
The whole page rests on one relation: level(t) = dose × 0.5^(t ÷ halfLife). Caffeine is cleared by first-order kinetics, which means the body removes a fixed share of whatever is present each hour rather than a fixed amount, so the same factor is applied again and again and the amount falls by half in every interval of one half-life. Here dose is the amount taken in mg, t the hours from the dose to bedtime and halfLife the elimination half-life in hours. The level at bedtime is that relation read at t, and the share of the dose it represents is the relation's own factor, 0.5^(t ÷ halfLife). The cutoff uses the same relation solved for time instead of for the level: at the moment the level equals your threshold, t is halfLife × log2(dose ÷ threshold) hours, so the latest time to take the dose is that many hours before bedtime, and the hour the level falls to the threshold is that many hours after the dose. A half-life of zero or less is refused rather than answered, because an eliminated substance's half-life is positive; so is a threshold of zero or less, because an exponential only reaches nothing after an infinite time. The dose is treated as present at the intake time, which overstates the level for the first hour or so, since absorption is not instantaneous.
About This Calculator
What It Does
This page reads one relation — level(t) = dose × 0.5^(t ÷ halfLife) — for the two questions a dose of caffeine raises in the evening. It gives the amount still present at bedtime and the share of the dose that represents, and it gives the cutoff: the latest time of day the dose can be taken and still leave your chosen level at bedtime. Beside those it prints the clock hour at which the level falls to that level, which is the same decay counted forward from the dose instead of backwards from bedtime.
Worked Example
The page opens with 100 mg taken at 14:00, a half-life of 5 hours, a bedtime of 22:00 and a threshold of 25 mg. Eight hours pass, which is 8 ÷ 5 = 1.6 half-lives, so the share left is 0.5^1.6 = 0.3299 and the level at bedtime is 100 × 0.3299 = 32.99 mg — 33.0 % of the dose. The level equals 25 mg after 5 × log2(100 ÷ 25) = 5 × 2 = 10 hours, so it falls to that level at 00:00, and the latest time to take the dose and still be at 25 mg at 22:00 is ten hours before bedtime, 12:00. Change the half-life to 3 hours and the same dose leaves 15.75 mg at bedtime, crosses 25 mg at 20:00 and has a cutoff of 16:00.
Real-World Usage
The page is for the evening question: whether the coffee you had after lunch is still working when you go to bed, and when you would have had to stop. It is also a way to see why the same dose behaves differently between people — moving the half-life from 5 hours to 3 turns 32.99 mg at bedtime into 15.75 mg — and a way to compare drinks, once the caffeine in each is known in milligrams. Shift workers and anyone whose bedtime moves can read it against the bedtime they actually have rather than a fixed hour.
Local Context
The elimination of caffeine is a property of the body and not of the country, so nothing here changes with your location and one page serves all nine countries with the same arithmetic. Two conventions are worth knowing. The decimal separator in the input fields is the point, as in 1.5 and 0.25, whatever separator your language uses in ordinary prose; every figure the page prints is formatted in your language's own convention, so the same level reads 32,99 in German and 32.99 in English, and the clock follows your locale's own 12- or 24-hour reading. And what is in a drink is not fixed by law: a coffee or a cola varies by brand and by how it is made, so the milligram figure you enter is the one figure the page cannot check for you.
Sources and Methodology
The relation, the first-order elimination it describes and the half-life figures the page quotes come from the Institute of Medicine's review chapter "Pharmacology of Caffeine" in Caffeine for the Sustainment of Mental Task Performance: Formulations for Military Operations (National Academy Press, 2001), read at the NCBI Bookshelf on 2026-10-15 — https://www.ncbi.nlm.nih.gov/books/NBK223808/ — which states that the mean half-life of caffeine in the plasma of healthy individuals is about 5 hours, that its elimination half-life may range between 1.5 and 9.5 hours, and that its elimination is by first-order kinetics. The same chapter names the factors that move the figure: pregnancy, obesity, oral contraceptives, smoking and altitude. The two-decimal display rule and the treatment of the dose as present at the intake time are this page's own, and are stated on it.
Last reviewed: November 2026.
This page models elimination; it does not measure a person. A half-life is a population average and yours may be much shorter or longer, and the intake is treated as immediate rather than absorbed over the first hour. It is not medical advice and it is not a reason to change how much caffeine you drink. If poor sleep persists, that is a clinical question — see when sleep restriction may not be appropriate.
Frequently Asked Questions
How long does caffeine stay in your body?
It depends on the dose and on your half-life, and it never quite reaches zero. With a 5-hour half-life, 200 mg is down to 100 mg after 5 hours, 50 mg after 10, 25 mg after 15 and about 6 mg after 25 — a little under 3 % of what you took. A longer half-life moves every one of those hours later, and a shorter one moves them earlier.
What should I put for the half-life?
Five hours is the quoted mean for healthy adults, and the range usually given is 1.5 to 9.5 hours, so it is worth trying both ends of that range as well as the mean. Smoking roughly halves it; pregnancy, oral contraceptives and some medicines lengthen it. The field is yours to set, and the figures here are only as good as the half-life you enter.
Why does the page ask for a level rather than a time before bed?
Because a fixed hour before bed is not the same rule for everyone. What matters is how much is left when you go to bed, and that depends on the dose: 400 mg taken 6 hours before bed leaves more than 96 mg, while 50 mg taken at the same hour leaves about 12 mg. Setting the level you want makes the page answer for your own dose.
Does the page work for tea, cola and energy drinks?
Yes, if you know the amount in milligrams. A mug of filter coffee is often around 100 to 140 mg, a shot of espresso around 45 mg, a cup of tea around 40 to 50 mg and a can of cola around 40 mg, but the figures vary by brand and by how the drink is made, so a label or a published table is a better input than a guess.
Related Tools and Guides
Half-Life Calculator
Find how much of a quantity is left after a time, how long it takes to fall to a target, or the half-life itself between two readings — the decay relation, stated and derived.
Sleep Calculator
Find the best time to wake up or go to bed using sleep cycle science.
Sleep Debt Calculator
Calculate your total sleep debt and find out how long recovery takes.
When Sleep Restriction May Not Be Appropriate
Medical and safety considerations before trying sleep restriction therapy: bipolar disorder, seizure risk, sleep apnea, and other contraindications.