How Late Can You Have Caffeine? Stop at Least 6 Hours Before Bed
A sleep study found 400 mg of caffeine taken 6 hours before bed still cut about an hour of sleep. Why to stop at least 6 hours before bedtime.
The short answer
Stop caffeine at least 6 hours before bed. In a 2013 sleep study, 400 mg of caffeine taken 6 hours before bedtime still reduced measured sleep by about an hour, and the researchers advised avoiding substantial caffeine for at least 6 hours before bed. Smaller doses still matter: EFSA says even 100 mg close to bedtime can affect sleep in some adults.
Key takeaways
- Drake et al. (2013): 400 mg taken 0, 3 or 6 hours before bed all cut measured sleep by roughly 1 hour.
- The authors advise avoiding substantial caffeine for at least 6 hours before bedtime.
- In most people, half the caffeine is cleared in about 4 to 6 hours, but the range is 2 to 12 hours.
- If you go to bed at 11 pm, a 5 pm cut-off is the minimum; earlier is safer for big doses.
| Taken before bed | Effect on total sleep (sleep monitor) | Source |
|---|---|---|
| At bedtime | About 1 hour less | Drake et al. 2013 |
| 3 hours before | About 1 hour less | Drake et al. 2013 |
| 6 hours before | About 1 hour less (diary: 41 min less, not significant) | Drake et al. 2013 |
12 healthy adults, randomized, double-blind, placebo-controlled crossover study. The sleep monitor showed reductions of roughly 1.1 to 1.2 hours at each timing.
What the sleep study found
In a 2013 study in the Journal of Clinical Sleep Medicine, 12 healthy sleepers took 400 mg of caffeine at bedtime, 3 hours before bed or 6 hours before bed, and a placebo on another night. Sleep was measured at home with a sleep monitor and a diary.
Caffeine at every timing cut measured total sleep by roughly 1.1 to 1.2 hours compared with placebo. At 6 hours before bed, people’s own diaries showed 41 fewer minutes of sleep, which was not statistically significant, suggesting that people may not notice the sleep they lose.
The authors concluded that the results support avoiding substantial caffeine for at least 6 hours before bedtime, and suggested limiting afternoon caffeine to before 5 pm.
Why caffeine lingers
Your body clears caffeine slowly. According to the Sleep Foundation, in most people half of it is cleared in about 4 to 6 hours, with a range of 2 to 12 hours. The FDA notes wide variation in how fast people eliminate caffeine. So an afternoon coffee can still be working at bedtime.
Smaller doses count too
The study used a large dose: 400 mg is the whole daily reference amount for healthy adults. But the European Food Safety Authority says a single dose of just 100 mg, about one cup of brewed coffee, may affect sleep duration and patterns in some adults when taken close to bedtime. See how much caffeine is in your drinks in how much caffeine is in a cup of coffee.
A cut-off rule you can use
Count back at least 6 hours from your usual bedtime:
- Bed at 10 pm: last caffeine by 4 pm
- Bed at 11 pm: last caffeine by 5 pm
- Bed at midnight: last caffeine by 6 pm
Go earlier for big doses such as a 16 oz energy drink (160 mg) or a large coffee; how much caffeine is in everything lists the common ones. If you still sleep badly, try moving the cut-off earlier, and talk to a doctor about ongoing sleep problems. To keep your total in check, see how much caffeine is too much.
Frequently asked questions
Can I drink coffee 4 hours before bed?
It may cost you sleep. In the 2013 study, 400 mg taken even 6 hours before bed reduced measured sleep by about an hour, and EFSA says 100 mg close to bedtime can affect sleep in some adults.
How long does caffeine stay in your system?
In most people half of it is cleared in about 4 to 6 hours, though it ranges from about 2 to 12 hours (Sleep Foundation). The FDA notes wide variation between people.
What time should I stop drinking coffee?
At least 6 hours before bed. For an 11 pm bedtime that means by 5 pm, which matches the study authors' suggestion to limit afternoon caffeine to before 17:00.
Does decaf affect sleep?
Decaf has very little caffeine: about 1 mg per 8 oz cup (Mayo Clinic) or 2 to 15 mg (FDA).
The bottom line
Have your last caffeine at least 6 hours before bed, earlier for big doses like energy drinks, and remember that even 100 mg late in the day can affect sleep.
Sources 7
- Drake C, Roehrs T, Shambroom J, Roth T (2013). Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed. Journal of Clinical Sleep Medicine 9(11):1195-1200
- American Academy of Sleep Medicine: Late afternoon and early evening caffeine can disrupt sleep at night
- EFSA (European Food Safety Authority): Caffeine · checked Dec 2026
- Sleep Foundation: How long does it take for caffeine to wear off? · checked Dec 2026
- FDA: Spilling the Beans: How Much Caffeine is Too Much? · checked Dec 2026
- Mayo Clinic: Caffeine content for coffee, tea, soda and more · checked Dec 2026
- Temple JL et al. (2017). The Safety of Ingested Caffeine: A Comprehensive Review. Frontiers in Psychiatry
Written by
Editor
[Placeholder bio. Who the author is, what they have written about and why they can be trusted on energy and focus. Add a real photo in public/authors/.]
Medically reviewed by
Reviewer Name, [Placeholder: for example RD, PharmD or MD]
Expert reviewer
[Placeholder bio. The reviewer's qualification, where they practise and what they check in each post.]
How we write and check every post: editorial policy.
Keep reading
More on energy, sleep and fasting
How Much Caffeine Is Too Much? 400 mg a Day for Most Adults
Up to 400 mg of caffeine a day is not generally linked to negative effects in healthy adults (FDA). Single doses, pregnancy and what 400 mg looks like.
How Much Caffeine Is in a Cup of Coffee? About 96 mg in 8 oz
An 8 oz cup of brewed coffee has about 96 mg of caffeine on average, a shot of espresso about 63 mg and decaf about 1 mg. Why your cup may differ.
How Much Caffeine Is in Everything? Coffee, Tea, Soda and Energy Drinks Compared
An 8 oz coffee has about 96 mg of caffeine, black tea 48 mg, a can of Coke 34 mg, Red Bull 80 mg and a 16 oz Monster 160 mg. Every drink in one table.