When should you stop drinking coffee before bed?
On average, coffee taken less than 8.8 hours before bedtime shortens sleep. For an 11 pm bedtime, that puts the last coffee at around 2 pm.
The figure comes from the reference meta-analysis on the subject (Gardiner et al., Sleep Medicine Reviews, 2023, 24 studies), for a 250 ml cup containing 107 mg of caffeine. It is an average, not a rule: sensitivity to caffeine varies widely from one person to another.
Updated 12 November 2026
Last coffee by bedtime
| Bedtime | Last coffee before |
|---|---|
| 10:00 pm | 1:12 pm |
| 11:00 pm | 2:12 pm |
| 12:00 am | 3:12 pm |
Time falling 8.8 hours before bedtime, the average gap found by the meta-analysis for a 107 mg coffee.
What is left of an espresso at bedtime
| Time of the espresso | Caffeine left at 11 pm |
|---|---|
| 9:00 am | 11 mg |
| 12:00 pm | 17 mg |
| 2:00 pm | 23 mg |
| 4:00 pm | 30 mg |
| 6:00 pm | 40 mg |
| 8:00 pm | 53 mg |
An 80 mg espresso (average content used by EFSA), 11 pm bedtime, halved every 5 hours, the average adult half-life. A simple model: absorption is treated as immediate.
What the studies measure
In the meta-analysis by Gardiner and colleagues, caffeine reduces total sleep time by 45 minutes on average and sleep efficiency by 7%. Falling asleep takes 9 minutes longer and deep sleep drops by 11 minutes.
In a controlled trial (Drake et al., Journal of Clinical Sleep Medicine, 2013), 400 mg of caffeine taken six hours before bed cut sleep by more than an hour, measured at home.
For healthy adults, EFSA raises no safety concern up to 400 mg of caffeine a day and up to 200 mg per intake. It also notes that a dose of around 100 mg close to bedtime can delay sleep onset in some adults.
Why the gap varies from one person to another
Half of the caffeine is cleared in 5 hours on average in adults, but that time changes a lot between people: genetics, smoking, pregnancy and some medications lengthen or shorten it. The amount matters as much as the time: three coffees in the morning leave more caffeine in the evening than a single one in the early afternoon. These figures describe averages, they say nothing about any one person.
Run the numbers with your own drinks
The calculator adds up your coffees, teas and sodas of the day, then shows what is left in your blood hour by hour and at bedtime. Two minutes, nothing is stored.
Open the caffeine calculator →Frequently asked questions
Can you drink coffee at 4 pm and still sleep well?
For an 11 pm bedtime, a 4 pm coffee is taken seven hours before, which is inside the 8.8-hour average gap found by the 2023 meta-analysis. With a 5-hour half-life, about 30 mg of an 80 mg espresso is left at bedtime. The real effect depends on each person's sensitivity.
How long does caffeine stay in your body?
Half is cleared in 5 hours on average in adults. After 10 hours about a quarter is left; after 15 hours, about an eighth.
Is tea as much of a problem as coffee?
A cup of tea holds about 50 mg of caffeine on average, against 80 mg for an espresso and 90 mg for a drip coffee, according to the contents used by EFSA. At the same time of day, less is left at bedtime.
Sources
- Gardiner C. et al., The effect of caffeine on subsequent sleep: a systematic review and meta-analysis, Sleep Medicine Reviews, 2023.
- Drake C. et al., Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed, Journal of Clinical Sleep Medicine, 2013.
- EFSA, Scientific Opinion on the safety of caffeine, EFSA Journal, 2015.
VitalCipher describes what studies measure. This content is not medical advice.