SLEEP & EVENING ROUTINE · Q&A GUIDE

How Long Before Bed Should You Stop Drinking Caffeine?

What the evidence says about caffeine timing and sleep, a cutoff table by bedtime, and a simple way to make the cutoff a habit.

The short answer

Stop caffeine at least six hours before bed, and eight hours if you are sensitive or have trouble sleeping. In a small study, a large dose taken six hours before bed still cut objectively measured sleep by about an hour. For a 10:30 p.m. bedtime, that means a last coffee around 2:30 p.m. or earlier.

30-Day Evening Routine Plan

Turn this into a daily step with a hard-day version, weekly reviews and reminders. Free, on your phone.

Make it my plan

Key takeaways

  • A small study found that a large caffeine dose six hours before bed still disrupted sleep.
  • NHLBI notes the effects of caffeine can last up to 8 hours.
  • The CDC and AASM advise avoiding caffeine in the afternoon or evening.
  • People vary widely in caffeine sensitivity, so test your own cutoff.
  • Tie the cutoff to a daily event, such as lunch, so it becomes automatic.
A bedside table with a glowing blue lamp, a closed book and a glass of water, with a phone charging across the room

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:

  1. 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.
  2. 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.
  3. 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.

Frequently asked questions

Is decaf coffee OK in the evening?

Decaf has much less caffeine but is not caffeine-free. The FDA says decaf coffee typically has 2 to 15 mg per 8-ounce cup. If you react strongly to caffeine, you may prefer herbal tea or water in the evening.

Does caffeine affect sleep even if I can fall asleep fine?

It can. In the small study on caffeine timing, a monitor showed about an hour less sleep when caffeine was taken six hours before bed, while participants' own diaries showed a smaller change. You may not notice all of the effect.

How much caffeine is too much in a day?

For most adults, the FDA has cited 400 mg a day, about two to three 12-ounce cups of coffee, as an amount not generally associated with negative effects. People vary, and this page does not give individual health advice.

What can I drink in the afternoon instead of coffee?

Water, herbal tea or decaf can keep the ritual of a drink without the caffeine. Pairing the drink with a short walk or a few minutes of daylight can help with an afternoon slump.

Sources and evidence

  1. Drake et al. (2013): Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed — In 12 healthy sleepers, 400 mg of caffeine taken 0, 3 or 6 hours before bed significantly disrupted sleep; at 6 hours objective total sleep fell by about an hour.
  2. NHLBI (NIH): Healthy sleep habits — The effects of caffeine can last up to 8 hours; caffeine sources include coffee, tea, soda and chocolate.
  3. FDA: Spilling the beans: How much caffeine is too much? — 400 mg a day for most adults is about two to three 12-ounce cups of coffee; caffeine content ranges by drink; wide variation in sensitivity; decaf coffee typically has 2 to 15 mg per 8-ounce cup.
  4. CDC (2024): About Sleep — Avoid caffeine in the afternoon or evening; talk to a provider about regular sleep problems.
  5. AASM Sleep Education: Healthy sleep habits — Avoid consuming caffeine in the afternoon or evening.

Want a plan shaped around your own reason and obstacles?

Build my sleep & evening routine plan