Caffeine's half-life is why your afternoon coffee is still working at bedtime

Falling asleep fine after a late coffee does not mean it had no effect.

5 min read

How long does caffeine stay in your system?

Caffeine has an average half-life of roughly five hours in healthy adults, meaning half is cleared in that time and half of the remainder in the next five. A 200 mg coffee at 3pm leaves about 100 mg at 8pm, 50 mg at 1am and 25 mg at 6am. Individual half-life varies considerably — genetics, pregnancy, liver function, smoking and certain medications can move it from around two hours to over ten.

Halving, not draining

Caffeine clears exponentially rather than linearly. Each half-life removes half of what remains, not a fixed amount.

That matters because it means the tail is long. After one half-life you have 50% left, after two 25%, after three 12.5%. Getting down to a genuinely negligible amount takes five or six half-lives — around a day at an average clearance rate.

This is why a single late coffee can still be measurably present the following morning, and why a habit of afternoon coffee produces a steady baseline that never fully clears.

Our calculator plots the decay curve so you can see where a given dose sits at bedtime.

Individual variation is enormous

The five-hour figure is an average across a very wide distribution.

A common genetic variation in the liver enzyme that metabolises caffeine divides people into fast and slow metabolisers, and the difference is substantial. Pregnancy slows clearance dramatically, particularly in the third trimester. Some oral contraceptives roughly double the half-life. Smoking accelerates it, which is why people who quit often find their usual coffee suddenly feels like too much.

So two people drinking identical coffee at identical times can have very different amounts on board at midnight.

If caffeine affects your sleep more than it seems to affect others', you may simply be a slow metaboliser.

Sleep quality suffers before sleep onset does

This is the finding that changes behaviour once people hear it.

Caffeine can reduce slow-wave sleep — the deep restorative stage — without necessarily stopping you falling asleep. So you go to bed at the usual time, drop off without difficulty, and still wake unrefreshed.

Because the disruption is invisible from the inside, people conclude caffeine does not affect their sleep and keep the habit. The absence of difficulty falling asleep is not evidence of undisturbed sleep.

The practical test is not whether you fall asleep, but how you feel after a week of moving your last coffee earlier.

Where the caffeine actually is

Dose estimates are much rougher than people assume.

Brewed coffee varies enormously with bean, roast, grind and brew method — the same cup size can differ several-fold between preparations. Espresso is more concentrated per millilitre but a single shot is small, so a large brewed coffee frequently contains more total caffeine than a double espresso.

Energy drinks and pre-workout supplements are the ones that catch people out, because the dose is often high and the labelling is sometimes per serving rather than per container.

Tea, chocolate and some soft drinks and medications all contribute as well.

Health Canada publishes daily intake guidance, with substantially lower limits for children and for people who are pregnant.

Common questions

How long does caffeine stay in your system?

The average half-life is around five hours, so a 200 mg coffee at 3pm leaves roughly 100 mg at 8pm and 50 mg at 1am. Reaching a negligible amount takes five or six half-lives — about a day at an average clearance rate.

Why does caffeine affect me more than other people?

Individual half-life varies widely. A common genetic variation divides people into fast and slow metabolisers, and pregnancy, some oral contraceptives, liver function and smoking all shift clearance substantially.

I fall asleep fine after coffee — is it still affecting me?

Possibly. Caffeine can reduce deep slow-wave sleep without preventing sleep onset, so you fall asleep normally and still wake unrefreshed. Not struggling to fall asleep is not evidence of undisturbed sleep.

Does espresso have more caffeine than brewed coffee?

More per millilitre, but a single shot is small. A large brewed coffee often contains more total caffeine than a double espresso. Brewed coffee also varies several-fold with bean, roast and method.

When should I stop drinking coffee before bed?

Work back from your bedtime using the half-life. If you want most of a dose cleared, that is roughly two to three half-lives — around ten to fifteen hours at an average rate, and longer if you metabolise slowly.

Where these numbers come from