10.7Caffeine and sleep
Is your 4pm coffee still there at bedtime? Probably more of it than you think. Your body clears caffeine at a steady fraction per hour, so every drink leaves a fading trace, and the traces stack. Build your day below, set your bedtime, and turn the one dial you cannot feel: how fast your body clears it.
General information, not medical advice. This page shows how a half-life works; it does not recommend an amount of caffeine or a time to stop. If you are pregnant, take medication or have a health condition, ask a doctor or pharmacist.
- 1Read
Caffeine is absorbed quickly and completely, then your liver clears it at a roughly constant fraction per hour. The time it takes to clear half of it is its half-life. In healthy adults that is usually somewhere between 2 and 8 hours. This page starts at 5 hours. Here is one cup of filter coffee (about 90 mg) at 4pm.
Show as a table
Caffeine in the body after one 90 mg coffee at 4pm, with a 5 hours half-life Time Caffeine in the body 6:00 am 0 mg 8:00 am 0 mg 10:00 am 0 mg noon 0 mg 2:00 pm 0 mg 4:00 pm 90 mg 6:00 pm 68 mg 8:00 pm 52 mg 10:00 pm 39 mg midnight 30 mg 2:00 am 23 mg 4:00 am 17 mg 6:00 am 13 mg - At 4pm
- 90 mg
- At 9pm
- 45 mg
- At 2am
- 23 mg
NoteHalf of your 4pm coffee is still in your body at 9pm (50%, 45 mg), and a quarter of it at 2am (25%, 23 mg). The coffee you have forgotten about is still there when you go to bed. It feels gone because the lift has faded, not because the caffeine has.
- 2Add
Now your day, from 6am to 6am. Pick a drink and tap the chart where you have it, or use the button and set its time with the slider. Each drink adds its own decaying curve, and the curves stack. The typical amounts come from the European Food Safety Authority (EFSA); change any of them to match what you drink.
Show as a table
Caffeine in the body across your day with 2 drinks Time Caffeine in the body 6:00 am 0 mg 8:00 am 90 mg 10:00 am 68 mg noon 52 mg 2:00 pm 39 mg 4:00 pm 120 mg 6:00 pm 91 mg 8:00 pm 69 mg 10:00 pm 52 mg midnight 39 mg 2:00 am 30 mg 4:00 am 23 mg 6:00 am 17 mg - Drinks
- 2
- Caffeine taken
- 180 mg
- Highest level
- 120 mg
- 3Set
Set your bedtime and read what is left. In a study by Christopher Drake and colleagues (2013), 12 healthy sleepers took 400 mg of caffeine as pills at bedtime, 3 hours before or 6 hours before. Even at 6 hours, a sleep monitor measured more than an hour less sleep than on a placebo night. The sleepers' own diaries showed 41 minutes less, a loss they underestimated. That dose is more than four cups of filter coffee at once, so it is a strong test, not a typical day.
- Left at 11:00 pm
- 45 mg
- In coffee
- about half a filter coffee
- 4Turn
The half-life is the dial that moves the answer most, and it is the one you cannot see. The buttons apply the average effects reported in a 2017 review to the 5-hour start. They are averages, not your number.
Show as a table
Caffeine across your day with a 5 hours half-life, against 5 hours Time Caffeine in the body 6:00 am 0 mg 8:00 am 90 mg 10:00 am 68 mg noon 52 mg 2:00 pm 39 mg 4:00 pm 120 mg 6:00 pm 91 mg 8:00 pm 69 mg 10:00 pm 52 mg midnight 39 mg 2:00 am 30 mg 4:00 am 23 mg 6:00 am 17 mg - Left at 11:00 pm
- 45 mg
- Over 2 to 8 hours
- 8 to 74 mg
NoteSame drinks, same bedtime. Across the 2 to 8 hours EFSA gives for healthy adults, what is left at 11:00 pm runs from 8 mg to 74 mg, 9 times as much. Two people drinking the same cups can go to bed with very different amounts in them, so a rule like “no coffee after 2pm” suits some people far better than others.
Things that change the half-life include genes (the liver enzyme that does most of the work, CYP1A2, varies a lot between people), smoking, pregnancy, oral contraceptives, liver disease, heavy drinking and some medicines. If one of those applies to you, ask a doctor or pharmacist rather than this page.
- 5Find
Pick a level you would like to be under at bedtime and a drink, and read the latest time you could have it. The page does not suggest a level: the dial starts at 60 mg only so it has somewhere to start. For scale, EFSA notes that a single 100 mg dose may affect sleep in some adults when taken close to bedtime.
Show as a table
Caffeine across your day against a bedtime level of 60 mg Time Caffeine in the body 6:00 am 0 mg 8:00 am 90 mg 10:00 am 68 mg noon 52 mg 2:00 pm 39 mg 4:00 pm 120 mg 6:00 pm 91 mg 8:00 pm 69 mg 10:00 pm 52 mg midnight 39 mg 2:00 am 30 mg 4:00 am 23 mg 6:00 am 17 mg - Latest filter coffee
- 9:54 am
- Now at 11:00 pm
- 45 mg
One more filter coffee (90 mg) at 9:54 am or earlier leaves at most 60 mg at 11:00 pm, counting the drinks already in your day.
- 6Go
The same arithmetic runs through medicines, radioactive decay and memory. Follow it further.
10.7.1How the model works
Each drink is a dose D taken at a time t₀. The amount of it still in your body at a later time t is D × 2−(t − t₀) / h, where h is the half-life, and the page adds up every drink to get the curve. The half-life starts at 5 hours, the middle of the 3 to 7 hours one review gives for adults; EFSA gives an average of about 4 hours, with healthy adults anywhere from 2 to 8. The last-call time solves the same sum backwards for the moment one more drink would bring bedtime up to your level.
It is a toy. It treats each drink as absorbed the moment you finish it; real caffeine peaks 15 to 120 minutes later, which shifts the curves by under an hour and barely changes what is left late at night. It counts milligrams in the body, not the concentration in your blood, which also depends on your size. It assumes one fixed half-life all day, and it says nothing about how sensitive you are to a given amount, which varies between people too. The drink amounts are EFSA's typical values; a coffee from a café can hold much more or less.
10.7.2Sources
- European Food Safety Authority (EFSA), Caffeine: EFSA explains risk assessment (2015). The half-life (about 4 hours on average, 2 to 8 hours in healthy adults), complete absorption, the note on 100 mg near bedtime, and the typical amount in each drink, read off its chart “How much caffeine is there in…”.
- Jennifer L. Temple and colleagues, The Safety of Ingested Caffeine: A Comprehensive Review, Frontiers in Psychiatry 8:80 (2017). The 3 to 7 hour adult half-life, absorption peaking 15 to 120 minutes after a drink, and the effects of pregnancy, oral contraceptives, smoking, alcohol, liver disease and the CYP1A2 gene.
- Christopher Drake, Timothy Roehrs, John Shambroom and Thomas Roth, Caffeine Effects on Sleep Taken 0, 3, or 6 Hours before Going to Bed, Journal of Clinical Sleep Medicine 9(11):1195 to 1200 (2013).
- Jan Grzegorzewski, Florian Bartsch, Adrian Köller and Matthias König, Pharmacokinetics of Caffeine: A Systematic Analysis of Reported Data, Frontiers in Pharmacology 12 (2022). Fluvoxamine and a few other medicines slow caffeine clearance, and so does liver cirrhosis.
- US Food and Drug Administration (FDA), Spilling the Beans: How Much Caffeine Is Too Much? (2024). Wide variation in how fast people clear caffeine, and the effect of some medications.