Short answer: caffeine's half-life in healthy adults is roughly four to six hours, but individual variation is wide. Measured values span about two to ten hours, and longer in pregnancy. Half-life is not duration: it is how long until half the dose is gone. On a five-hour half-life, a 200 mg coffee at 4pm still leaves about 100 mg in you at 9pm and 50 mg at 2am.
That distinction is the whole article, and it is the one nearly every "how long does caffeine last" page gets wrong by omission.
Half-life is not duration
Your body clears caffeine through the liver, primarily via the CYP1A2 enzyme. The process is roughly exponential: a fixed proportion leaves per unit time, not a fixed amount.
Assume a five-hour half-life. A reasonable midpoint, though yours may differ substantially. A single 200 mg dose at 4pm then decays like this:
| Time | Caffeine remaining | Comparable to |
|---|---|---|
| 4:00 pm | 200 mg | Two espressos |
| 9:00 pm | 100 mg | One large coffee |
| 2:00 am | 50 mg | A cup of black tea |
| 7:00 am | 25 mg | A cup of green tea |
| 12:00 pm next day | 12 mg | A square of dark chocolate |
You feel the peak 30 to 60 minutes after drinking, and the obvious alertness fades within a few hours. But the pharmacology continues long after the subjective effect ends, and sleep responds to the pharmacology, not to whether you feel wired.
This is why "coffee doesn't affect my sleep, I fall asleep fine" is not the evidence people think it is. Falling asleep is one measure. Sleep architecture is another, and it can be disrupted while sleep onset is untouched.
Why yours may be different
The four-to-six-hour range is a population average, and individual variation is large enough that the average may not describe you at all.
Genetics. Variants in the CYP1A2 gene split people roughly into fast and slow metabolisers. Slow metabolisers clear caffeine considerably more slowly and are more likely to experience jitteriness and disrupted sleep from the same dose. This is largely why "caffeine doesn't affect me" and "one coffee ruins my night" are both honest reports from different people.
Smoking roughly halves caffeine's half-life by inducing CYP1A2. A relevant and under-appreciated consequence: people who quit smoking often find their usual coffee intake suddenly feels like too much, because it now lasts twice as long.
Pregnancy increases it substantially. Knutti and colleagues (1981) measured a mean half-life of 3.4 hours (range 2–5) in non-pregnant adults against 8.3 hours (range 3–16) in pregnant women, so for some individuals, more than a full day to clear a single dose. Oral contraceptives containing oestrogen also impair caffeine clearance.
Liver function, age, and some medications, including certain antibiotics and antidepressants, extend it further.
Regular consumption changes tolerance, not clearance. You stop noticing the alertness because receptors adapt. The caffeine is still there, and it is still doing things to your sleep. This is the trap: the people most confident that caffeine does not affect them are often those whose tolerance has hidden the effect rather than removed it.
Caffeine and sleep
The most useful study here is small but pointed. Drake and colleagues (2013) gave participants 400 mg of caffeine, roughly two strong coffees, at three points before bed: immediately, three hours before, and six hours before.
All three conditions measurably disrupted sleep. The six-hour condition reduced total sleep time by more than an hour, as measured objectively.
Two details make this finding land harder than most. First, six hours before bed is not what anyone would consider a late coffee. For a midnight sleeper, that is a 6pm cup. Second, participants did not accurately perceive the disruption. Their self-reported sleep quality did not match what the measurements showed.
This is where the topic connects to everything else on this site. Caffeine is one of the clearest cases where subjective experience and measurement disagree, and where the sensible response is to trust the measurement.
If you use a sleep tracker, this is one of the few genuinely worthwhile experiments you can run on yourself: hold everything else constant, move your caffeine cutoff two hours earlier for a fortnight, and compare the fortnights. It is a large enough effect to show up above the noise.
Caffeine taken six hours before bed reduced objectively measured sleep by more than an hour, and participants did not notice.
Drake, Roehrs, Shambroom & Roth, Journal of Clinical Sleep Medicine, 2013
How much is actually in things
Values vary widely by preparation and brand. These are typical:
| Item | Caffeine |
|---|---|
| Filter coffee, 240 ml | 95 mg |
| Espresso, single shot | 63 mg |
| Instant coffee, 240 ml | 62 mg |
| Black tea, 240 ml | 47 mg |
| Energy drink, 250 ml | 80 mg |
| Green tea, 240 ml | 28 mg |
| Cola, 330 ml | 34 mg |
| Dark chocolate, 30 g | 12 mg |
| Decaf coffee, 240 ml | 2 mg |
Two things worth noting. A café latte contains the caffeine of its espresso shots, not of its volume. A large milky drink can contain less caffeine than a small black coffee. And decaf is not caffeine-free; several cups in the evening are not nothing if you are sensitive.
Health authorities generally consider up to 400 mg per day safe for most healthy adults, with lower limits during pregnancy, around 200 mg.
Withdrawal
Stopping abruptly after regular use produces a genuine withdrawal syndrome. Headache is the most common symptom, alongside fatigue, low mood, irritability and difficulty concentrating.
Juliano and Griffiths' review of the evidence puts onset at 12 to 24 hours after the last dose, peak intensity at 20 to 51 hours, and duration at two to nine days. Headache occurs in about half of cases, and around 13% of people experience impairment significant enough to affect normal functioning, and it can happen at habitual doses as low as 100 mg a day, roughly one cup. The headache mechanism is straightforward: caffeine constricts cerebral blood vessels, and removing it allows dilation.
If you want to reduce intake without the headache, taper. Cut by around 25% every few days, or replace one coffee at a time with tea. A week of gradual reduction typically avoids symptoms almost entirely, where an abrupt stop reliably produces them.
What to actually do with this
Set a time, not a quantity. Most people manage caffeine by counting cups. Time of last dose matters more. If you sleep at 11pm, a cutoff around 2pm gives you roughly two half-lives of margin before bed.
Front-load the day. Same total intake, moved earlier, costs you nothing in alertness when you need it and returns the evening.
Recalculate after a change. Quitting smoking, starting or stopping the pill, pregnancy. Each one meaningfully changes your clearance rate. The dose that used to suit you may not.
Test it rather than believe it. Two weeks with your normal schedule, two weeks with a cutoff four hours earlier. If nothing changes, you have learned something real about yourself. If it does, you have learned something more useful.
Questions people ask
How long does caffeine stay in your system? Traces persist for around 24 hours after a normal dose. The meaningful figure is the half-life, five to six hours on average, since that is what determines how much is still active at bedtime.
How long do the effects of caffeine last? Noticeable alertness peaks at 30 to 60 minutes and fades over three to five hours. Effects on sleep persist considerably longer than the effects you can feel.
Does caffeine affect sleep even if I fall asleep fine? Yes. Sleep onset and sleep quality are separate measures, and caffeine can disrupt the second while leaving the first intact.
How long does caffeine withdrawal last? Symptoms typically begin 12 to 24 hours after the last dose, peak within about two days, and resolve within two to nine days. Tapering largely prevents them.
Does decaf have caffeine? Yes, roughly 2 mg per cup versus 95 mg for regular. Negligible for most people, not necessarily for the highly sensitive.
This article covers caffeine pharmacology for general information and is not medical advice. If you are pregnant, taking medication, or have a cardiac or anxiety condition, discuss caffeine intake with your clinician.
References
- Nehlig, A. (2018). Interindividual Differences in Caffeine Metabolism and Factors Driving Caffeine Consumption. Pharmacological Reviews, 70(2), 384–411. doi:10.1124/pr.117.014407
- Drake, C., Roehrs, T., Shambroom, J., & Roth, T. (2013). Caffeine Effects on Sleep Taken 0, 3, or 6 Hours before Going to Bed. Journal of Clinical Sleep Medicine, 9(11), 1195–1200. doi:10.5664/jcsm.3170
- Juliano, L.M., & Griffiths, R.R. (2004). A critical review of caffeine withdrawal: empirical validation of symptoms and signs, incidence, severity, and associated features. Psychopharmacology, 176(1), 1–29. doi:10.1007/s00213-004-2000-x
- Knutti, R., Rothweiler, H., & Schlatter, Ch. (1981). Effect of pregnancy on the pharmacokinetics of caffeine. European Journal of Clinical Pharmacology, 21(2), 121–126. doi:10.1007/BF00637512
- Sachse, C., Brockmöller, J., Bauer, S., & Roots, I. (1999). Functional significance of a C→A polymorphism in intron 1 of the cytochrome P450 CYP1A2 gene tested with caffeine. British Journal of Clinical Pharmacology, 47(4), 445–449. PMC2014233
- Parsons, W.D., & Neims, A.H. (1978). Effect of smoking on caffeine clearance. Clinical Pharmacology & Therapeutics, 24(1), 40–45. doi:10.1002/cpt197824140
- U.S. Food and Drug Administration. Spilling the Beans: How Much Caffeine is Too Much? fda.gov
- EFSA Panel on Dietetic Products, Nutrition and Allergies (2015). Scientific Opinion on the safety of caffeine. EFSA Journal, 13(5), 4102. doi:10.2903/j.efsa.2015.4102
The weekly readout
One email each Thursday: what we tested, which claim collapsed under a closer look, and the one number worth paying attention to.