Sleep Map · Reviewed 14 October 2026
Caffeine and sleep

You may feel that an afternoon coffee makes no difference, because you still drop off when the light goes out. Sleep can still be shorter or lighter than it would have been, and you'd be unlikely to notice.
What caffeine does to the drive to sleep
From the moment you wake, a chemical called adenosine builds up in the brain. The longer you're awake, the more there is, and as it binds to its receptors (the docking points on nerve cells that read the signal) the pull towards sleep grows. Sleep scientists call this sleep pressure, and it's only cleared by sleeping.
Caffeine is close enough in shape to adenosine to sit in those receptors and block them. The adenosine is still there and still accumulating; you simply feel less of it. Caffeine that's still circulating at bedtime therefore stands between you and sleep your body has built up a need for, and the lighter, shorter sleep that follows clears less of the pressure, which in turn makes the next afternoon's coffee feel more necessary.
How long a drink lasts
The liver breaks caffeine down, and it does so slowly. In a small study of ten healthy young men, Blanchard and Sawers (1983) found caffeine reached its peak in the blood about half an hour after drinking, while the time taken to clear half of it ranged from 2.7 to 9.9 hours from one man to the next. In the average adult, around half of a drink's caffeine is still circulating five hours later, and in slower clearers a good deal longer than that.
Several things slow clearance further. In a small study, women who'd taken a low-dose oestrogen contraceptive pill for more than three months took about 7.9 hours to clear half their caffeine, against about 5.4 hours in matched women not taking it (Abernethy & Todd, 1985). Pregnancy and liver conditions slow it too (Ludwig et al., 2014), and the NHS advises no more than 200 mg of caffeine a day in pregnancy.
The dose itself varies a lot. The NHS puts a cup of instant coffee at around 100 mg. When Ludwig and colleagues (2014) measured 104 espressos bought from coffee shops in Scotland, Italy and Spain, caffeine ranged from 48 to 317 mg a serving, so the name on the menu tells you little about the amount in the cup.
What the research found
Gardiner and colleagues (2023) pooled 24 studies. On average, caffeine cut total sleep by about 45 minutes, added around 12 minutes awake in the night and reduced deep sleep. From those studies they estimated that a coffee of about 107 mg needed to be drunk at least 8.8 hours before bed to avoid losing sleep, and a typical pre-workout serving (about 217 mg) at least 13.2 hours before.
The same group then ran a controlled trial in 23 young men who normally drank a moderate amount of caffeine (Gardiner et al., 2025). They took 100 mg or 400 mg at 12, 8 or 4 hours before bed, or a placebo (a dummy dose with no caffeine), and their sleep was recorded at home. The 100 mg dose made no measurable difference, even 4 hours before bed. The 400 mg dose delayed sleep when taken up to 12 hours before bed, and broke sleep up more within 8 hours. Yet the men only rated their sleep as worse after 400 mg at 4 hours, though the recordings showed disruption from much earlier doses, so caffeine can cost sleep you don't notice losing.
The mechanism isn't in doubt, and nor is the finding that larger doses later in the day cost sleep. What we can't give you is an exact cut-off: these are averages, the trial was in young men only, and clearance varies several-fold between people.
Turning that into your plan
We work to about 6 hours before bed for a cup of tea (the NHS puts a cup at about 75 mg), 8 to 9 hours for a typical coffee (about 100 mg for a cup of instant), and 12 hours for high-dose drinks such as a double shot, a large coffee-shop drink or a pre-workout serving. Treat the drink names as rough guides, because strength varies so much between brands and cafés. If something slows your clearance, such as the contraceptive pill, we work to the next longer gap.
Your diary notes your last caffeinated drink alongside how long it took to fall asleep and how long you were awake in the night. It can't measure how fast you clear caffeine, but over a couple of weeks it will show whether bringing that last drink earlier changes your nights. We move it in small steps, and you don't have to give caffeine up.
If you find you're relying on caffeine to get through the day because you're persistently sleepy, despite giving yourself enough time in bed, mention it to your GP. If you're pregnant, your midwife or GP can advise on caffeine.
Where this comes from
- Abernethy, D. R., & Todd, E. L. (1985). Impairment of caffeine clearance by chronic use of low-dose oestrogen-containing oral contraceptives. European Journal of Clinical Pharmacology, 28(4), 425–428. https://doi.org/10.1007/BF00544361
- Blanchard, J., & Sawers, S. J. (1983). The absolute bioavailability of caffeine in man. European Journal of Clinical Pharmacology, 24(1), 93–98. https://doi.org/10.1007/BF00613933
- Gardiner, C., Weakley, J., Burke, L. M., Roach, G. D., Sargent, C., Maniar, N., Townshend, A., & Halson, S. L. (2023). The effect of caffeine on subsequent sleep: A systematic review and meta-analysis. Sleep Medicine Reviews, 69, 101764. https://doi.org/10.1016/j.smrv.2023.101764
- Gardiner, C. L., Weakley, J., Burke, L. M., Fernandez, F., Johnston, R. D., Leota, J., Russell, S., Munteanu, G., Townshend, A., & Halson, S. L. (2025). Dose and timing effects of caffeine on subsequent sleep: A randomized clinical crossover trial. Sleep, 48(4), zsae230. https://doi.org/10.1093/sleep/zsae230
- Ludwig, I. A., Mena, P., Calani, L., Cid, C., Del Rio, D., Lean, M. E. J., & Crozier, A. (2014). Variations in caffeine and chlorogenic acid contents of coffees: What are we drinking? Food & Function, 5(8), 1718–1726. https://doi.org/10.1039/c4fo00290c
- NHS. (n.d.). Foods to avoid in pregnancy. Retrieved 13 October 2026, from https://www.nhs.uk/pregnancy/keeping-well/foods-to-avoid/
More from the Sleep Map