For most people, caffeine is too late once you are within about eight to nine hours of bed. A strong dose still disturbed sleep when taken six hours before bedtime, and a 2023 meta-analysis suggests finishing a standard coffee at least 8.8 hours before bed. For an 11pm bedtime, that puts your last coffee at around 2pm.
This guide explains why caffeine lingers for so long, what the key studies actually measured, how much caffeine is in everyday UK drinks, and how to find the cut-off that suits your own body.
Key takeaways
- Caffeine keeps you alert by blocking adenosine, the chemical that builds up sleep pressure while you are awake.
- How fast you clear caffeine varies a lot from person to person. The Sleep Foundation puts caffeine's half-life anywhere between 2 and 12 hours.
- In a home study, 400mg of caffeine taken 0, 3 or 6 hours before bed disturbed sleep every time compared with a placebo.
- A 2023 meta-analysis of 24 studies found caffeine cut total sleep by 45 minutes and deep sleep by about 11 minutes. It suggests a standard coffee at least 8.8 hours before bed, and a pre-workout at least 13.2 hours before.
- Test your own cut-off over two weeks, changing one thing at a time.
How does caffeine affect sleep?
From the moment you wake up, your brain builds up a chemical called adenosine. The longer you are awake, the more it accumulates and the sleepier you feel. This is part of what sleep scientists call sleep pressure.
Caffeine works by blocking adenosine receptors, as the Sleep Foundation's guide to caffeine and sleep explains. The adenosine is still there, but your brain cannot "hear" it as clearly. That is why a coffee makes you feel more awake, and it is also why caffeine in your system at bedtime can make it harder to fall asleep and stay asleep.
Caffeine does not only affect whether you drop off. Research also shows it changes the structure of the night, with more light sleep and less deep sleep. If you want the background on those stages, our guide to light, deep and REM sleep covers what each one does.
How long does caffeine stay in your system?
The key number is caffeine's half-life: the time your body takes to clear half of it. According to the Sleep Foundation, the half-life of caffeine ranges anywhere between 2 and 12 hours. That range is the reason one person can drink an espresso after dinner and sleep well while another lies awake after a 3pm tea.
Several things change how quickly you clear it. The Sleep Foundation notes that genetics play a part, that people who use nicotine clear caffeine faster, and that pregnancy slows it down considerably.
Here is a worked example to show why the afternoon matters. It assumes a half-life of 5 hours, which sits inside that range. It is an illustration, not a measurement of you.
| Time | Caffeine left from a 200mg coffee at 2pm (assuming a 5-hour half-life) |
|---|---|
| 2pm | 200mg |
| 7pm | 100mg |
| Midnight | 50mg |
| 5am | 25mg |
If your half-life is longer, those numbers stay higher for longer. That matters because the European Food Safety Authority noted that single doses of around 100mg can affect sleep in some people, particularly when taken close to bedtime, as summarised by EUFIC's overview of the EFSA caffeine opinion.
What does the research say about caffeine timing?
The Drake study: 0, 3 or 6 hours before bed
The study most often quoted on this question is Drake and colleagues, published in the Journal of Clinical Sleep Medicine in 2013. Participants took a fixed 400mg dose of caffeine either at bedtime, 3 hours before bedtime or 6 hours before bedtime, and a placebo on another night. They slept at home, recorded their sleep in a diary, and wore a portable sleep monitor that measured sleep objectively.
Caffeine disturbed sleep compared with placebo at all three timings, including 6 hours before bed. The authors concluded that caffeine taken 6 hours before bedtime has important disruptive effects on sleep, and that their results support avoiding substantial caffeine for a minimum of 6 hours before bed.
Keep the dose in mind. 400mg is a lot to take in one go. Using NHS figures of about 100mg in a cup of instant coffee, it is roughly four cups at once. The study tells you a big afternoon dose can still reach your night. It does not tell you exactly where a single small tea sits.
The 2023 meta-analysis: 24 studies combined
A broader answer comes from a 2023 systematic review and meta-analysis by Gardiner and colleagues in Sleep Medicine Reviews, which pooled 24 studies. Compared with no caffeine, caffeine:
- reduced total sleep time by 45 minutes
- reduced sleep efficiency by 7%
- added 9 minutes to the time taken to fall asleep
- added 12 minutes of time awake after first falling asleep
- increased light N1 sleep by about 6 minutes and reduced deep sleep by about 11 minutes
The authors then estimated how far before bed caffeine needs to be taken to avoid losing sleep. For a coffee containing 107mg per 250ml, the answer was at least 8.8 hours. For a standard serve of pre-workout supplement, 217.5mg of caffeine, it was at least 13.2 hours.
What the NHS advises
The NHS advice on insomnia is simpler: do not drink tea or coffee for at least 6 hours before going to bed. That lines up with the Drake study. The meta-analysis suggests a longer gap if you want to protect every minute of sleep, especially with stronger drinks.
So how late is too late for caffeine?
Work backwards from the time you usually go to sleep. The table uses the two cut-offs from the 2023 meta-analysis, rounded to the nearest 10 minutes.
| Your usual bedtime | Last standard coffee (8.8 hours before) | Last pre-workout (13.2 hours before) |
|---|---|---|
| 10pm | about 1.10pm | about 8.50am |
| 11pm | about 2.10pm | about 9.50am |
| Midnight | about 3.10pm | about 10.50am |
Treat these as a starting point. If you are sensitive to caffeine, pregnant, or already sleeping badly, move the cut-off earlier. If you train in the evening, the pre-workout column is the one that catches people out: a scoop at 6pm is still very much in your system at midnight.
How much caffeine is in your drinks?
Caffeine adds up across the day, and it is not only in coffee. These are the NHS estimates.
| Drink or food | Approximate caffeine |
|---|---|
| Cup of instant coffee | 100mg (filter and coffee-shop coffee can contain more) |
| Cup of tea, black or green | 75mg |
| 250ml can of energy drink | 80mg |
| Can of cola | 40mg |
| 50g bar of plain dark chocolate | less than 25mg |
| 50g bar of plain milk chocolate | less than 10mg |
Source: NHS, foods to avoid in pregnancy. Tea is easy to forget. Two afternoon cups of tea add up to 150mg, more than one cup of instant coffee.
How much caffeine is safe in a day?
Safety and sleep are two separate questions. In its 2015 scientific opinion on the safety of caffeine, EFSA concluded that for healthy non-pregnant adults, habitual intakes up to 400mg a day and single doses up to 200mg do not raise safety concerns. For pregnant women, up to 200mg a day does not raise safety concerns for the unborn baby, and the NHS also advises staying under 200mg a day in pregnancy.
Those limits are about overall safety, not sleep. You can stay well within 400mg a day and still sleep worse if a chunk of it comes late in the afternoon. Timing matters as much as the total.
How to find your own caffeine cut-off
Because people clear caffeine at such different speeds, the best cut-off is the one you test yourself. A simple approach:
- Pick a starting cut-off from the table above, based on your usual bedtime.
- Keep everything else as steady as you can: bedtime, wake time, alcohol and evening training.
- Hold the new cut-off for two weeks. Single nights vary too much to judge.
- Note how long you take to fall asleep, how often you wake, and how you feel mid-morning.
- If nothing changes, try moving it an hour or two earlier. If you sleep well, you have found your window.
Change one habit at a time. If you cut caffeine, drink less alcohol and start going to bed earlier in the same week, you will not know which one helped. Our guide on how to get more deep sleep covers the other habits worth testing next.
A wearable makes this experiment easier to read. PulseRing Pro tracks your sleep stages, heart rate, HRV and blood oxygen every night and builds a personal baseline over roughly two weeks of wear, so you can compare nights with and without that late coffee. Each morning you get one readiness score and one plain sentence: push, maintain or rest. No subscription, and every metric is included in the one-off price of £89.
Ways to cut back without an afternoon slump
- Move your biggest coffee to the morning, when it does the most good and has the longest time to clear.
- Switch afternoon drinks to decaf or caffeine-free options rather than stopping all at once.
- Check labels on energy drinks and pre-workouts, which can carry far more caffeine than a coffee.
- Watch for "hidden" afternoon caffeine: a cola with lunch, a tea at 4pm, dark chocolate after dinner.
- If you rely on caffeine to get through the afternoon every day, look at your sleep first. Caffeine can cover up tiredness, but it cannot replace sleep.
Frequently asked questions
Is 2pm too late for coffee?
It depends on your bedtime. A 2023 meta-analysis suggests finishing a standard coffee at least 8.8 hours before bed, so 2pm works for a bedtime of around 11pm or later. If you go to bed at 10pm, aim for about 1pm. People sensitive to caffeine, or who already sleep badly, may need an earlier cut-off still.
Does tea affect sleep as much as coffee?
Tea contains less caffeine per cup than coffee, but it still counts. The NHS estimates about 75mg in a cup of black or green tea, against about 100mg in a cup of instant coffee. Two afternoon cups of tea can add up to more caffeine than one coffee, so apply the same cut-off to tea as you do to coffee.
Why can some people drink coffee at night and still sleep?
People clear caffeine at very different speeds. The Sleep Foundation puts caffeine's half-life anywhere between 2 and 12 hours, shaped by genetics, smoking and pregnancy among other factors. Feeling fine is not the same as sleeping well either: caffeine can shorten sleep and reduce deep sleep, and a sleep tracker or diary is a better guide than how you feel.
Does caffeine reduce deep sleep?
Yes, on average. A 2023 meta-analysis of 24 studies found caffeine reduced deep sleep by about 11 minutes and increased light N1 sleep by about 6 minutes, while cutting total sleep time by 45 minutes. Deep sleep is concentrated early in the night, so caffeine still in your system at bedtime is well placed to interfere with it.
How much caffeine is safe per day in the UK?
For healthy adults who are not pregnant, the European Food Safety Authority found intakes up to 400mg a day and single doses up to 200mg do not raise safety concerns. The NHS advises no more than 200mg a day in pregnancy. These limits are about safety, not sleep, and late caffeine can still disturb your night well within them.
Sources
- Drake C, Roehrs T, Shambroom J, Roth T. Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed, Journal of Clinical Sleep Medicine, 2013
- Gardiner C et al. The effect of caffeine on subsequent sleep: A systematic review and meta-analysis, Sleep Medicine Reviews, 2023
- EFSA Panel on Dietetic Products, Nutrition and Allergies. Scientific Opinion on the safety of caffeine, EFSA Journal, 2015
- EFSA opinion on the safety of caffeine, EUFIC, 2015
- Caffeine and Sleep Problems, Sleep Foundation, 2025
- Insomnia, NHS, 2024
- Foods to avoid in pregnancy, NHS, 2026
This article is for general information and is not medical advice. PulseRing Pro is a wellness device, not a medical device, and does not diagnose or treat any condition. If you are worried about your health, speak to your GP or a qualified clinician.























