How is caffeine processed in the body?
You drink the cup, feel its effect within a short time, and then the effect fades after a few hours. But what happens inside the body lasts longer than that. According to the MedlinePlus encyclopedia, caffeine is absorbed quickly and reaches the brain, is not stored in the body, and leaves in the urine many hours after it is taken.
The liver does most of the work; a scientific review published in 2018 explains that a single enzyme called CYP1A2 converts about 95% of caffeine. The official caffeine citrate leaflet states that only about 1% of it leaves in urine unchanged in adults, meaning the kidneys mainly clear its breakdown products, not caffeine itself.
Caffeine in your body, hour by hour
Assuming an average half-life of five hours in a healthy adult, the amount falls roughly as follows:
- Shortly after drinkingReaching the brain
Caffeine is absorbed quickly and the feeling of alertness begins.
- After about 5 hoursHalf the amount
About half of what you drank remains in the blood.
- After about 10 hoursA quarter of the amount
About a quarter is still in your body, which may be enough to spoil sleep in sensitive people.
- After about a dayMostly gone
After about five half-lives, the body has cleared most of it.

These are rough calculations based on an average half-life; the actual figure varies from person to person.
A practical example: the afternoon cup and bedtime
| Time | Approximate amount remaining |
|---|---|
| 4 pm | About 90 mg |
| 9 pm | About 45 mg |
| 2 am | About 22 mg |
| 7 am | About 11 mg |
That is why a person may sleep “normally” in their own view and yet sleep lighter and shorter; a pooled analysis of 24 studies found that caffeine reduces deep sleep and total sleep time. The 90 mg figure is an estimate according to EFSA.
Why does how long caffeine stays differ from person to person?
The US Food and Drug Administration says people differ greatly in how fast they clear caffeine, and a 2018 review lists the factors that affect this:
- Genetics: genetic variations in the CYP1A2 enzyme make some people “slow metabolizers.”
- Age, sex, and hormones: the rate of clearance changes with age and hormonal changes, including pregnancy.
- Smoking: it changes the activity of the enzyme responsible for converting caffeine.
- Liver disease and obesity: they may slow its clearance.
- Medications: caffeine interacts with many medications, so ask your doctor or pharmacist.
Infants and newborns
According to the official caffeine citrate leaflet, the half-life of caffeine in newborns is about 3 to 4 days because liver and kidney function is not yet mature, and their clearance rate does not approach that of adults until about nine months of age. This is one more reason for pregnant and breastfeeding women to stick to the 200 mg daily limit that EFSA recommends.
When should you have your last cup of coffee to sleep well?
The pooled analysis published in 2023 in the journal Sleep Medicine Reviews concluded that a standard cup of coffee should be drunk at least about 8.8 hours before bedtime to avoid a loss of sleep time, and that a standard serving of pre-workout supplements needs 13.2 hours. EFSA notes that just 100 mg close to bedtime may affect sleep in some adults. So if you go to bed at midnight, the last cup would be around 3 pm.
Does caffeine show up on a drug test?
The usual drug tests do not look for caffeine; it is a legal substance that is not part of their panels. But it can be measured in blood or saliva when there is a medical or research need; the randomized trial on caffeine reduction used a measurement of its level in saliva to confirm participants' adherence. It is also measured in blood when poisoning is suspected. You can find an explanation of what tests actually look for in drug testing.
Common myths about clearing caffeine
| The myth | The truth |
|---|---|
| Coffee sobers you up | MedlinePlus states that caffeine does not reduce the effects of alcohol, even though many people believe it does. |
| Drinking a lot of water flushes out caffeine quickly | The liver converts most of it, and only about 1% leaves in urine unchanged. |
| As long as I fall asleep quickly, coffee doesn't affect me | Caffeine can reduce deep sleep and sleep time even if sleep seems normal. |
| When the buzz is gone, the caffeine has left | Half of it may remain in the blood for hours after you stop feeling its effect. |
How long caffeine's effect lasts compared with how long it stays
Most people feel the stimulant effect shortly after drinking, and the feeling fades within hours, but the substance itself stays longer. So the question that matters to you is “how much of it is left when I go to sleep?” more than “when do I feel the coffee?” If you notice that you cannot do without the late cup despite its effect on your sleep, look into the symptoms of coffee addiction, and the cutting-down plan in caffeine withdrawal symptoms.