Helix

How long caffeine actually affects your sleep

Caffeine has a half-life of roughly five to six hours, which means a 2pm coffee still has a quarter of its dose working at midnight. The arithmetic, the wide genetic variation, and how to test your own cutoff properly.

Updated August 8, 20269 min readWritten by Reviewed by Yuki Tanabe

Caffeine is the most widely used stimulant on earth and the arithmetic of how long it lasts is simple enough to do in your head, which makes it worth doing once properly.

The half-life maths

A half-life of five to six hours means the dose halves in that window, then halves again, and so on. For a 200mg dose, roughly a large coffee, taken at 2pm:

8pm: about 100mg remaining, comparable to a fresh espresso.

2am: about 50mg remaining, comparable to a cup of tea, circulating while you are meant to be in your deepest sleep.

8am: about 25mg, which is why habitual drinkers never quite start from zero.

Written out like that, the standard advice to stop by early afternoon stops sounding puritanical and starts sounding like arithmetic.

The part people get wrong

The most common objection is “caffeine does not affect me, I can drink an espresso and fall straight asleep.” That may well be true, and it is not the relevant test.

Caffeine works by blocking adenosine receptors. Adenosine accumulates through your waking hours and is the substance that produces sleep pressure. Blocking it does not just make it harder to fall asleep, it reduces the depth and restorative quality of the sleep you do get.

The measurable consequence is reduced deep sleep and reduced total sleep time, in people who report no difficulty at all with sleep onset. Sleep onset is the one part of the picture that is most obvious to you and least representative of the whole.

Why your cutoff is not the same as anyone else’s

Caffeine is metabolised primarily by the CYP1A2 enzyme, and genetic variation in it means clearance rates differ substantially between people. Fast metabolisers genuinely can drink coffee at 6pm without much consequence. Slow metabolisers genuinely cannot drink it at lunchtime.

Other things that shift the rate: some oral contraceptives and other medications slow it considerably, pregnancy slows it a great deal, smoking speeds it up, and habitual heavy intake produces tolerance to the alerting effect without removing the effect on sleep architecture.

Which means the honest advice is not a number. It is a method.

How to find your own cutoff

Pick a candidate cutoff, say 2pm, and hold it for two weeks. Then move it two hours later and hold that for two weeks. Compare your sleep duration, interruptions and overnight physiology between the blocks rather than between individual nights.

Two weeks per condition is not arbitrary. Single nights are far too noisy for a change this size to be visible, and anything shorter will mostly measure whatever else happened that week.

Keep the dose and the timing of everything else as stable as you can, and in particular do not run this test across a period where you are also drinking more than usual, since alcohol will swamp it entirely.

For the substance with the larger and more reliable overnight effect, see how long alcohol affects your HRV and sleep.

Frequently asked questions

How long does caffeine stay in your system?

Caffeine has a half-life of roughly five to six hours in most adults, meaning half the dose is gone in that time and half remains. A 200mg coffee at 2pm leaves about 100mg at 8pm and about 50mg at 2am. Full clearance takes well over 12 hours.

When should I stop drinking coffee before bed?

A common recommendation is eight to ten hours before bedtime, which for an 11pm bedtime means finishing by early afternoon. That is a population guideline. Individual metabolism varies several-fold, so testing your own cutoff against your own sleep data is far more informative.

Does caffeine affect sleep even if I fall asleep fine?

Yes, and this is the key point. Caffeine reduces deep sleep and total sleep time even in people who report no difficulty falling asleep. Being able to sleep after coffee is not evidence that the coffee did not affect your sleep quality.

Why does caffeine affect some people more than others?

Largely genetics. Variation in the CYP1A2 enzyme, which metabolises caffeine, means some people clear it substantially faster than others. Habitual intake, some medications and pregnancy also shift the rate considerably. This is why blanket cutoff advice fits some people badly.

Does caffeine affect HRV?

It raises heart rate and can suppress HRV, though the effect is smaller and less consistent than alcohol's. Its main route to damaging your recovery numbers is indirect: by reducing sleep quality and duration, which then suppresses overnight HRV on its own.

Free to use while you decide

Keep reading

All posts →