The journal
When to stop drinking coffee before bed
When to have your last coffee before bed, why caffeine lingers, how much is in your day and how to keep an afternoon cup without losing sleep.

Quick answer: when should you stop drinking coffee?
Stop at least six hours before you plan to sleep, so around 4 p.m. for an 11 p.m. bedtime. That rule comes from research: in a study published in the Journal of Clinical Sleep Medicine, 400 mg of caffeine taken zero, three and even six hours before bedtime all reduced sleep compared with a placebo (Drake and colleagues, 2013). If you are sensitive to caffeine, an earlier cut-off may suit you better.
Why caffeine lingers
Caffeine blocks the signals that build up sleep pressure through the day, and your body clears it slowly. A cup that perks you up at 4 p.m. can still be working when you turn the light off. People differ a great deal in how quickly they clear it, which is why some can drink espresso after dinner and others lie awake after a lunchtime cup.

How much caffeine is in your day?
The FDA puts an 8 oz cup of coffee at roughly 80 to 100 mg of caffeine and cites 400 mg a day as an amount not generally associated with negative effects for most adults (FDA: how much caffeine is too much?). Real cups vary: dose, cup size and beans all change the total. Ground & Gauge explains how much caffeine is in espresso, pour-over and AeroPress and why the dose matters more than the brew method.
- Tea: less than coffee per cup, but not caffeine free; see green tea before bed.
- Soft drinks and energy drinks: check the label.
- Pre-workout products: often high in caffeine, which matters for evening training. Rep & Range's guide to caffeine and training shows how to count the whole day.
- Chocolate and some medicines: smaller amounts, but they add up.
Keeping the afternoon cup without the cost
- Move the last cup earlier by an hour or two and see how you sleep over a week.
- Switch the afternoon cup to decaf or half-caf. Decaf still has a little caffeine, but far less.
- Make the afternoon cup smaller, for example a single rather than a double shot.
- Replace the ritual with a caffeine-free drink you enjoy, such as herbal tea.
Already had coffee too late? Our guide to sleeping after drinking coffee has practical steps for that night.
| Bedtime | Last caffeine, six hours before |
|---|---|
| 10 p.m. | 4 p.m. |
| 11 p.m. | 5 p.m. |
| Midnight | 6 p.m. |
Frequently asked questions
Is six hours enough for everyone?
It is a research-based starting point. If you still sleep poorly, move your cut-off earlier or reduce the amount.
Does decaf affect sleep?
Decaf contains a small amount of caffeine, far less than regular coffee. Most people sleep fine after it.
Can coffee make you sleepy?
Some people feel tired after coffee as the effect wears off, but caffeine itself works against sleep.