When to stop caffeine before bed: the evidence-based cutoff time

Stop drinking caffeine at least 8 to 9 hours before bed for a regular cup of coffee, and about 13 hours before bed for a strong dose such as a pre-workout drink. A 2023 meta-analysis of 24 studies found that a 107 mg coffee should be consumed at least 8.8 hours before bedtime, and a 217.5 mg pre-workout serving at least 13.2 hours before, to avoid losing total sleep time.

The popular "no caffeine 6 hours before bed" rule is a floor, not a target. This article stays on the cutoff question. For the full timeline of how long caffeine stays in your body, read our guide on how long caffeine stays in your system.

What is the best time to stop caffeine before bed?

The best evidence-based cutoff is at least 8.8 hours before bed for a regular coffee of about 100 mg. For doses above 200 mg, such as pre-workout drinks or large energy drinks, the cutoff moves to at least 13.2 hours. These figures come from a 2023 meta-analysis in Sleep Medicine Reviews that pooled 24 studies on caffeine and night-time sleep.

The table converts those figures into clock times. It rounds down to the quarter hour, so each time is slightly earlier than the exact cutoff.

Your bedtime Last regular coffee (about 100 mg, 8.8 h) Last strong dose (about 220 mg, 13.2 h)
9:30 p.m. 12:30 p.m. 8:15 a.m.
10:00 p.m. 1:00 p.m. 8:45 a.m.
10:30 p.m. 1:30 p.m. 9:15 a.m.
11:00 p.m. 2:00 p.m. 9:45 a.m.
11:30 p.m. 2:30 p.m. 10:15 a.m.
12:00 a.m. 3:00 p.m. 10:45 a.m.

Cutoff hours from Gardiner et al., 2023. Clock times are bedtime minus the cutoff, rounded down.

If your cup is bigger than about 100 mg, treat it like the strong dose. A 12-ounce brewed coffee can hold 113 to 247 mg according to the FDA, which is more than the coffee in the meta-analysis. You can check typical amounts in our caffeine in coffee, espresso and tea chart.

Is the 6-hour rule enough?

The 6-hour rule comes from a 2013 study by Drake and colleagues. It tested 400 mg of caffeine taken at bedtime, 3 hours before and 6 hours before, against a placebo. All three times disturbed sleep. Even at 6 hours, total sleep fell by about 1 hour. The authors called 6 hours a minimum, not a safe point.

That study used a high dose, about four regular cups at once, so it is not a direct guide for one coffee. The 2023 meta-analysis covers a wider range of doses and gives dose-specific cutoffs. Taken together, the two studies point the same way: 6 hours is too short for large doses, and even a regular coffee needs more time than most people allow.

How does caffeine affect sleep if you still fall asleep?

Caffeine can change sleep even when you fall asleep without trouble. Across 24 studies, caffeine reduced total sleep time by about 45 minutes, lowered sleep efficiency by 7%, added about 9 minutes to the time needed to fall asleep and about 12 minutes of time awake after sleep onset. Deep sleep fell by about 11 minutes, while light sleep rose.

Sleep measure Average change with caffeine Source
Total sleep time About 45 minutes less Gardiner et al., 2023
Sleep efficiency About 7% lower Gardiner et al., 2023
Time to fall asleep About 9 minutes longer Gardiner et al., 2023
Time awake after falling asleep About 12 minutes longer Gardiner et al., 2023
Deep sleep (N3) About 11 minutes less Gardiner et al., 2023
Light sleep (N1) About 6 minutes more Gardiner et al., 2023

Pooled results across doses and timings. Your own response may be smaller or larger.

These are averages across studies, and many used doses given within a few hours of bed. They show the direction of the effect. Changes in deep sleep and wake time are hard to feel, which is why some people believe evening coffee has no effect on them. A tracker that records sleep stages can show whether late caffeine days look different over a few weeks. Our guide on how to get more deep sleep covers the other factors that affect deep sleep.

How much caffeine close to bedtime is too much?

A smaller amount matters for some people. EFSA notes that caffeine at doses of around 100 mg can affect sleep in certain individuals, especially when taken close to bedtime. That is about one 8-ounce cup of brewed coffee. Below that level the effect is smaller on average, but sensitive sleepers can still notice it.

It helps to think in terms of caffeine left at bedtime, not caffeine drunk. With a typical half-life of about 5 hours, a 95 mg coffee at 2 p.m. leaves about 27 mg at 11 p.m. The same coffee at 6 p.m. leaves about 48 mg. Two drinks in the afternoon can add up to the 100 mg range by bedtime, especially if your half-life is long.

Should slow caffeine metabolizers stop earlier?

Yes. The half-life of caffeine is about 5 hours on average but ranges from about 2 to 10 hours between people. Pregnancy and oral contraceptives slow the liver enzyme that clears caffeine, which lengthens the half-life. If you take hormonal contraception or are pregnant, or if afternoon coffee clearly affects your sleep, move your cutoff earlier than the table above.

A practical test is to move your last caffeinated drink one hour earlier each week and watch your sleep data. If your sleep improves and then stops improving, you have found your personal cutoff. Keep other habits, such as alcohol and bedtime, as stable as you can during the test so the comparison is fair.

What can you drink in the evening instead?

Drinks with little or no caffeine are the safest evening choice. Decaf coffee typically has 2 to 15 mg per 8-ounce cup according to the FDA. Brewed green tea has about 28 mg and black tea about 47 mg per 8 ounces in USDA data. Check labels on bottled teas and flavored drinks, which can include added caffeine.

Evening drink Typical caffeine Notes
Decaf coffee, 8 oz 2 to 15 mg FDA; adds up over several cups
Green tea, 8 oz About 28 mg USDA FoodData Central
Black tea, 8 oz About 47 mg USDA FoodData Central
Cola, 12 oz 23 to 83 mg (all caffeinated soft drinks) FDA

Values from the FDA consumer update and USDA FoodData Central.

Watch for less obvious sources late in the day, such as pre-workout powders and energy drinks. The FDA notes that most energy drinks in the U.S. list total caffeine from all sources on the label.

When should you talk to a doctor?

Talk to a doctor if poor sleep continues after you cut evening caffeine, if you snore loudly or stop breathing in your sleep, or if you have palpitations, chest pain or anxiety after caffeine. Adults need 7 or more hours of sleep per night. Ongoing short sleep despite good habits can have other causes that need a medical check.

How Svanu helps you find your cutoff

Svanu logs coffee and other drinks in one tap with a time and estimates how much caffeine is still active at your bedtime. The logs also go to Apple Health. Over 30 days, the correlations view checks whether caffeine is associated with your sleep and recovery, and shows a result only with at least 14 paired days and p below 0.05.

The sleep screen suggests tonight's bedtime from your own median wake time and sleep need, so you can count your cutoff back from a real bedtime instead of a guess. Everything is computed on your iPhone, with no sign-up. See how the caffeine and sleep features fit together on the Svanu home page.

Key takeaways

  • A regular coffee of about 100 mg needs at least 8.8 hours before bed, based on a 2023 meta-analysis.
  • Strong doses above 200 mg need about 13.2 hours.
  • The 6-hour rule is a minimum: 400 mg at 6 hours still cut about 1 hour of sleep.
  • Around 100 mg close to bedtime can affect sleep in some people.
  • Slow metabolizers, including people on oral contraceptives or who are pregnant, should stop earlier.

Frequently asked questions

Is 6 hours before bed enough time to stop caffeine?

Often not. In the study behind the 6-hour rule, 400 mg taken 6 hours before bed still reduced total sleep by about 1 hour. A 2023 meta-analysis suggests at least 8.8 hours for a regular 107 mg coffee and 13.2 hours for a 217.5 mg pre-workout dose.

What time should I stop drinking coffee if I go to bed at 10 p.m.?

Based on the 8.8-hour figure for a regular coffee, about 1 p.m. For a strong pre-workout or energy drink above 200 mg, the 13.2-hour figure points to before 9 a.m. If you are a slow metabolizer, move the cutoff earlier.

Can I drink green tea or decaf in the evening?

They contain far less caffeine. Brewed green tea has about 28 mg per 8 ounces and decaf coffee typically 2 to 15 mg. EFSA notes that around 100 mg close to bedtime can affect sleep in some people, so small amounts are less likely to matter, but sensitive sleepers should test it.

Why can I fall asleep after an espresso but still feel tired?

Falling asleep is only one part of sleep. A meta-analysis found that caffeine also increased time awake after sleep onset by about 12 minutes and reduced deep sleep by about 11 minutes. You may not notice those changes, but they can show up in a sleep tracker.

Does caffeine before bed affect deep sleep?

Studies suggest it does. In the 2023 meta-analysis, caffeine was associated with about 11 minutes less deep sleep and more light sleep. The size of the effect depends on the dose and how close to bedtime you had it.

Sources

  1. Gardiner C et al. The effect of caffeine on subsequent sleep: A systematic review and meta-analysis. Sleep Med Rev, 2023
  2. Drake C et al. Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed. J Clin Sleep Med, 2013
  3. Evans J, Richards JR, Battisti AS. Caffeine. StatPearls, NCBI Bookshelf
  4. EUFIC. EFSA opinion on the safety of caffeine (summary of EFSA NDA Panel, 2015)
  5. U.S. FDA. Spilling the Beans: How Much Caffeine is Too Much?
  6. Watson NF et al. Recommended Amount of Sleep for a Healthy Adult. J Clin Sleep Med, 2015

This article is for general information and is not medical advice. Svanu is not a medical device.

More on caffeine and nutrition

How long does caffeine stay in your system? Half-life, timeline and bedtime math

How long does caffeine stay in your system? Half-life is about 5 hours, so a quarter of a dose is still there after 10. See the timeline and bedtime math.

Caffeine in coffee, espresso, matcha and tea: a sourced chart

How much caffeine in a cup of coffee? About 95 mg per 8 oz brewed cup, 63 mg per espresso shot. Sourced chart for coffee, matcha, green tea, black tea, decaf.

AI photo calorie counting: how accurate is it?

Is a photo calorie counter accurate? In a 2025 study, AI estimates from photos alone missed by about 31% on average, and by 14% when ingredients were added.