How Many Hours Before Bed Should You Stop Caffeine? Six or More
A last-coffee time worked back from your bedtime, with what a sleep trial measured and how long a cup stays with you.
On This Page
- How Many Hours Before Bed Should You Stop Caffeine?
- What the 6-Hour Sleep Trial Found
- What Time Should You Stop Drinking Coffee?
- Why Can Caffeine Keep You Awake Hours Later?
- Can I Drink Coffee at Night?
- What if You Work Nights or Sleep at Odd Hours?
- Does a Small Cup Still Matter?
- Does the Six-Hour Rule Suit Everyone?
- Set Your Last-Coffee Time Tonight
- Sources
Short answer
Stop caffeine at least six hours before bed.
- In a 2013 trial, 400 mg taken 6 hours before bed cut sleep by more than an hour.
- The trial's authors suggest no afternoon caffeine after 5 PM.
- Caffeine's half-life is 5 to 6 hours (NIOSH): half a 3 PM coffee is left at 8 or 9 PM.

Six hours is the shortest gap with evidence behind it. A coffee that feels long gone by dinner can still be at work when you turn the light off.
Your cut-off is your bedtime minus six hours, or 5 PM if that comes earlier, and the rest of the evening can run on decaf, herbal tea or water.
How Many Hours Before Bed Should You Stop Caffeine?
At least six. In a 2013 trial in the Journal of Clinical Sleep Medicine, 400 mg of caffeine taken six hours before bed still cut sleep by more than an hour. The authors recommend no substantial caffeine for at least six hours before bedtime, and suggest stopping afternoon caffeine before 5 PM.
Coffee Times for an 11 PM Bedtime
- 7:30 AM
- 10:30 AM
- 1 PM
- 4:30 PM
Six hours is a floor, not a promise. The trial's authors note that cut-off times suggested in the sleep literature run from 4 to 11 hours, because people clear caffeine at very different speeds.
What the 6-Hour Sleep Trial Found
Twelve healthy adults who slept normally took 400 mg of caffeine, or a dummy pill, at bedtime, 3 hours before and 6 hours before, in their own homes. A headband monitor measured their sleep each night, and they kept a sleep diary too.
- 12
- healthy sleepers, ages 19 to 48
- 400 mg
- caffeine, about four 8 oz cups of home-brewed coffee by the study's count
- 1.1 to 1.2 h
- less sleep on the monitor at each timing
The 400 mg dose is large for one sitting: it is the whole daily amount the FDA names for most healthy adults. A single 8 oz coffee carries about a third of it, so a smaller afternoon cup does less than the trial measured.
Why You May Not Notice the Lost Sleep
On the monitor, the 6-hour dose cut sleep about as much as the bedtime dose. In the diaries, the same people reported only 41 minutes less, a gap too small to count as a clear result.
You can lose an hour of sleep to an afternoon coffee and wake up thinking you slept fine. The authors suggest this blind spot may be why many people ignore advice on caffeine timing.
What Time Should You Stop Drinking Coffee?
Six hours before your usual bedtime, and no later than 5 PM if you follow the trial's authors. For an 11 PM bedtime, both rules give 5 PM. For a 10 PM bedtime, the six-hour rule moves your last coffee to 4 PM.
| Your bedtime | Six hours before | The 5 PM suggestion | Last coffee by |
|---|---|---|---|
| 9 PM | 3 PM | 5 PM | 3 PM |
| 10 PM | 4 PM | 5 PM | 4 PM |
| 11 PM | 5 PM | 5 PM | 5 PM |
| Midnight | 6 PM | 5 PM | 5 PM |
The earlier of the two times wins in each row. Night owls with a 1 AM bedtime can stretch to 7 PM by the six-hour rule alone, but the trial's authors still point to 5 PM.

Why Can Caffeine Keep You Awake Hours Later?
Because your body clears it slowly. NIOSH, the US workplace health institute, says caffeine has a half-life of 5 to 6 hours and can stay in your system much longer. Half of a 3 PM coffee is still in you at 8 or 9 PM, and a third or more of it at 11 PM.
MedlinePlus adds the timing: caffeine reaches its peak level in your blood within an hour, and its effects can last four to six hours. NIOSH puts the start at about 30 minutes, with a range of 15 to 45.
The Same Coffee at 1 PM and at 6 PM
Take a 12 oz (355 ml) mug of brewed coffee, about 200 mg on Health Canada's 135 mg per 8 oz, and an 11 PM bedtime. The numbers below halve it every 5 to 6 hours, as NIOSH describes.
Mug at 1 PM
- 10 hours before bed
- About 50 to 63 mg left at 11 PM
- Under EFSA's 100 mg bedtime mark
Mug at 6 PM
- 5 hours before bed
- About 100 to 112 mg left at 11 PM
- At or over EFSA's 100 mg mark
EFSA uses that 100 mg mark itself: a single 100 mg dose may affect how long and how well some adults sleep, especially when taken close to bedtime. Our half-life sums are estimates; your own clearance may be faster or slower.
Can I Drink Coffee at Night?
Decaf, yes, for most people; regular coffee, not if you want to sleep soon after. A regular 8 oz brewed coffee holds about 135 mg, already past EFSA's 100 mg bedtime mark, while decaf holds a few milligrams.
The same goes for the rest of the evening's drinks. A herbal tea or a glass of water carries no caffeine, and a black tea holds roughly a third of a coffee, which is still more than you want in the last hours before bed.
Green tea lattes are no escape, since matcha's caffeine runs 19 to 44 mg for every gram whisked in.

Does Decaf Coffee Keep You Awake?
Unlikely, at a cup or two. The FDA finds 2 to 15 mg of caffeine in an 8 oz decaf, and Health Canada lists 3 mg, both far below EFSA's 100 mg mark.
Several decafs add up, though. Six 8 oz cups at the top of the FDA's range come to 90 mg, close to a regular cup.
What if You Work Nights or Sleep at Odd Hours?
Count back from the time you lie down, not from midnight. The six hours run from when you plan to sleep, so a nurse who goes to bed at 8 AM has her last caffeine at 2 AM, and the 5 PM line belongs to people who sleep at night.
| You go to bed at | Last caffeine by |
|---|---|
| 3 AM | 9 PM |
| 6 AM | midnight |
| 8 AM | 2 AM |
| noon | 6 AM |
NIOSH warns that a cup near the end of a night shift may still be active enough to cause restlessness or waking when you try to sleep after the shift, so apply the six hours to the time you sleep, whatever the clock says.
Does a Small Cup Still Matter?
It can. The six-hour rule comes from a 400 mg dose, but EFSA says a single 100 mg dose may already affect sleep duration and patterns, especially close to bedtime, so the size of the drink matters as well as the hour. Against that 100 mg line, the usual evening drinks sort like this:
| Drink | Caffeine | Against 100 mg |
|---|---|---|
| Decaf coffee, 8 oz | 2 to 15 mg (FDA) | far under |
| Caffeinated soft drink, 12 oz | 23 to 83 mg (FDA) | under |
| Green tea, 12 oz | 37 mg (FDA) | under |
| Black tea, 12 oz | 71 mg (FDA) | under, but two cups pass it |
| Espresso, 2 oz (60 ml) | 80 mg (EFSA, via EUFIC) | near it |
| Brewed coffee, 12 oz | 113 to 247 mg (FDA) | over |
| Energy drink, 12 oz | 41 to 246 mg (FDA) | can be over |
Drinks add up, so a soda with dinner and a black tea after it can reach the line together. A can or chain label beats these averages, so read it and count the evening drinks in one tally.
Does the Six-Hour Rule Suit Everyone?
Not exactly. The FDA notes wide variation in how sensitive people are to caffeine and how fast they clear it, and the trial tested only 12 healthy sleepers. If you sleep badly after a noon coffee, your own cut-off sits earlier than six hours.
MedlinePlus asks people with sleep disorders, anxiety or certain medicines to check with a health care provider about caffeine at all. Pregnancy changes the daily limit too, and the limits for each group set out the numbers the public bodies give.
Set Your Last-Coffee Time Tonight
Put the cut-off where you will see it, so the 4 PM coffee decision is already made:
- Set a phone reminder 15 minutes before your cut-off.
- Keep a decaf or a caffeine-free tea ready for the evening, and a water bottle for the late-afternoon slump.
- Write down how you wake for a week.
Give it a week before you judge it. The trial showed people do not always feel the sleep they lose, so a week of notes on how you wake tells you more than one night.
General information for healthy adults, not medical advice. If a doctor has set your fluid amount, follow that.

Sources
- Journal of Clinical Sleep Medicine (Drake, Roehrs, Shambroom and Roth). Caffeine Effects on Sleep Taken 0, 3, or 6 Hours before Going to Bed, 2013.
- CDC, National Institute for Occupational Safety and Health. NIOSH Training for Nurses on Shift Work and Long Work Hours, Module 6: Caffeine, 2015.
- MedlinePlus (US National Library of Medicine). Caffeine, 2021.
- European Food Safety Authority. Caffeine (topic page on the 2015 scientific opinion), 2015.
- EUFIC (European Food Information Council). EFSA opinion on the safety of caffeine, 2015.
- US Food and Drug Administration. Spilling the Beans: How Much Caffeine is Too Much?, 2024.
- Health Canada. Caffeine in foods, 2025.
Sources checked by the Glubbo Editorial Team on Oct 19, 2026. General information, not medical advice. How we write and check our guides.
