How long before bed should you stop drinking caffeine?
A cutoff of at least six hours before bed is the minimum supported by research, and eight hours is a safer default for many people. Official guidance puts it more simply: the CDC and the AASM both advise avoiding caffeine in the afternoon or evening.
Where does the six-hour figure come from?
It comes mainly from one study. Researchers at Henry Ford Hospital gave 12 healthy normal sleepers 400 mg of caffeine in pill form at bedtime, three hours before, or six hours before, and compared those nights with a placebo. Sleep was measured at home with a portable monitor and with sleep diaries.
Caffeine at all three times disrupted sleep compared with placebo. Even at six hours, the monitor showed total sleep cut by roughly an hour. Participants' diaries showed a smaller loss that did not reach statistical significance, suggesting people may not fully notice the effect.
Keep the limits in mind. It was a small study, and 400 mg is a large single dose, roughly two to three 12-ounce cups of brewed coffee according to the FDA. A single smaller cup may have a smaller effect. On the other hand, the study did not test cutoffs longer than six hours, so it cannot say that six is enough.
Why eight hours may be safer
NHLBI notes that the effects of caffeine can last up to 8 hours. The FDA also notes wide variation in how sensitive people are to caffeine and how fast they clear it. If you have any trouble falling asleep, an eight-hour gap is a sensible starting point.
What is your caffeine cutoff?
Use your target bedtime and pick a column. If you are not sure, use the eight-hour column for two weeks and see how it goes.
| Target bedtime |
6-hour cutoff |
8-hour cutoff |
| 9:30 p.m. |
3:30 p.m. |
1:30 p.m. |
| 10:00 p.m. |
4:00 p.m. |
2:00 p.m. |
| 10:30 p.m. |
4:30 p.m. |
2:30 p.m. |
| 11:00 p.m. |
5:00 p.m. |
3:00 p.m. |
| 11:30 p.m. |
5:30 p.m. |
3:30 p.m. |
| Midnight |
6:00 p.m. |
4:00 p.m. |
Remember that caffeine is not only in coffee. The FDA lists typical amounts per 12 ounces: brewed coffee 113 to 247 mg, black tea about 71 mg, green tea about 37 mg, soft drinks 23 to 83 mg, and energy drinks 41 to 246 mg. NHLBI also lists chocolate among caffeine sources.
How do you make the cutoff a habit?
A time rule you have to remember is easy to break. A cue-based rule is easier. Here is a worked example.
Taylor goes to bed at 10:30 and used to drink a coffee at 4:00 to get through the afternoon. Taylor sets the rule: "After lunch, I switch to decaf or water." Lunch ends around 1:00, well inside an eight-hour cutoff.
To handle the 4:00 slump, Taylor replaces the coffee with a different afternoon routine: a glass of water and a five-minute walk outside. The habit stacking builder helps write this kind of swap as a single sentence. Taylor keeps decaf tea at work so the ritual of a warm drink stays the same.
For two weeks, Taylor records the time of the last caffeinated drink and the time of falling asleep in the habit tracker. This matches day 11 of the 30-day evening routine plan, which asks you to set a caffeine cutoff and write it on your routine card.
How do you find your own cutoff?
Because sensitivity varies, the best cutoff is one you test. A simple two-week comparison works:
- Week 1: your usual pattern. Change nothing. Each evening, note the time of your last caffeinated drink, roughly how much it was, and the time you think you fell asleep.
- Week 2: the eight-hour cutoff. Move your last caffeinated drink to at least eight hours before your target bedtime. Record the same three things.
- Compare. Look at the average time to fall asleep and how many nights you lay awake for a long time. Also note how you felt in the afternoons.
If week 2 looked better, keep the earlier cutoff. If you saw no difference, you can try the six-hour cutoff, but keep caffeine out of the evening either way, as official guidance advises.
This is a personal experiment, not a clinical test. Other changes, such as a stressful week or a late dinner, can blur the results. Try to keep everything else as similar as you can, and repeat the comparison later if the first round was unclear.
When does the advice change?
If you are very sensitive to caffeine
Some people notice effects from a single morning coffee. Try moving your last cup to late morning for two weeks and compare. The FDA notes that sensitivity varies widely between people.
If you work nights or rotating shifts
Count from your planned sleep time, not the clock. If you sleep at 8:00 a.m. after a night shift, your cutoff might be around midnight to 2:00 a.m. Ask a clinician for advice specific to shift work if sleep is a problem.
If you are pregnant, take medication or have a health condition
Caffeine limits and interactions can differ. This page is about routine timing, not medical advice, so check with your clinician or pharmacist.
If cutting caffeine has not helped
If you move caffeine early and still have trouble sleeping most nights, the cause may be something else. The CDC advises talking to a healthcare provider if you regularly have problems sleeping. The page on what to do when you can't fall asleep covers the night itself.
Next steps
Fit your cutoff into a full wind-down with the bedtime routine guide, work out your target with what time you should go to bed, browse the sleep hub, or build your own evening plan.