Caffeine & Sleep

What Time Should You Stop Drinking Coffee? By Bedtime

What time should you stop drinking coffee? A 2023 meta-analysis points to at least 8.8 hours before bed for one cup. See the estimate for your bedtime.

Published October 22, 2026 · Updated November 6, 2026 · 6 sources

“No coffee after noon” and “no coffee after 2 pm” are rules you may have heard. Neither one knows when you go to bed. So what time should you stop drinking coffee? A cutoff makes more sense when you count backwards from your own lights-out time, and one 2023 meta-analysis gives a way to do that.

The short answer: in a 2023 meta-analysis, the model estimated that a cup of coffee of about 107 mg taken less than roughly 9 hours before bed was linked, on average, to a statistically significant drop in total sleep time, and one taken earlier was not. Bigger amounts had longer estimated gaps. Your own point may sit earlier or later, so read everything below as an estimate, not a rule for any one person.

Where does the 8.8-hour figure come from?

In 2023, researchers pooled the results of 24 studies on caffeine and night-time sleep in a systematic review and meta-analysis published in Sleep Medicine Reviews. Across those studies, caffeine was linked to about 45 minutes less sleep on average, about 7 percentage points lower sleep efficiency, about 9 more minutes to fall asleep and about 12 more minutes awake during the night.

The authors then asked how far ahead of lights-out caffeine would need to be taken for the drop in sleep time to stop being statistically significant. Based on their analysis, they gave these estimated gaps:

  • a coffee with about 107 mg of caffeine (a 250 mL cup, roughly 8.5 fl oz): at least 8.8 hours before bed; with a shorter gap, the model showed a statistically significant drop in total sleep time,
  • a larger serving of about 217 mg (a typical pre-workout supplement serving): at least 13.2 hours before bed,
  • for a cup of black tea (about 47 mg), the same model found no cutoff: it was not linked to a significant drop in sleep length at any point before bed.

The authors give an example for a 10 p.m. bedtime: a cup of coffee before about 1:12 p.m., and a pre-workout serving before about 8:50 a.m. The closer to bed the caffeine is taken, the bigger the predicted drop.

What time should you stop drinking coffee for your own schedule?

If you want a number for your own evening, here is the same 8.8 hours counted back from common bed times, for one 250 mL cup of coffee:

Lights-out Model cutoff for about 107 mg
9 p.m. around 12:10 p.m.
10 p.m. around 1:10 p.m.
11 p.m. around 2:10 p.m.
Midnight around 3:10 p.m.

Using the 13.2-hour figure for a pre-workout serving of about 217 mg, an 11 p.m. lights-out would put that drink at roughly 9:50 a.m. A 12 oz mug of coffee can hold more than 107 mg, since the FDA lists 113 to 247 mg for 12 oz of brewed coffee, and the model sets earlier cutoffs for larger amounts.

These times are arithmetic on one study’s estimate. They are not a promise that a coffee at 2 p.m. is harmless, or that one at 3 p.m. will ruin a night.

How long before bed should you stop drinking caffeine?

People search this in several ways: caffeine cutoff time, when to stop caffeine before bed, or how late is too late for caffeine. Phrased in hours, the same estimate reads like this: about 9 hours for a 250 mL cup of coffee, and about 13 hours for a pre-workout serving. A cup of black tea, with less caffeine, had no cutoff in the model. These are averages from studies of healthy adults, and each person’s own gap may be shorter or longer.

What did the 2013 home study find?

An earlier home-based study from 2013 also linked caffeine to less sleep several hours later, though it was small: 12 healthy adults. They took 400 mg of caffeine at once (roughly two to three 12 oz cups by the FDA’s figures, and about the daily level the FDA describes as not generally associated with negative effects) at bedtime, 3 hours before, or 6 hours before, and wore a sleep monitor. Each timing, including 6 hours before bed, was linked to roughly an hour less sleep (1.1 to 1.2 hours).

Sleep diaries told a slightly different story. People noticed the effect when caffeine was taken right at bedtime or 3 hours before, but at 6 hours the difference they reported did not reach the usual threshold for statistical significance (p = 0.08). The sample was small, and the study was supported by a grant from Zeo Inc.

What did a newer 2025 trial find?

A 2025 crossover trial with 23 young men who had a moderate habitual caffeine intake tested 100 mg and 400 mg at 4, 8 and 12 hours before bedtime. A 100 mg dose, close to the 107 mg cup in the 2023 model, showed no significant effect on sleep even when taken 4 hours before bedtime. The authors reported that a 400 mg dose may disrupt sleep when taken within 12 hours of bedtime, with greater disruption the closer it is taken. In the polysomnography data, total sleep time dropped by about 51 minutes when 400 mg was taken 4 hours before bed, which was statistically significant, while at 8 and 12 hours the drops were about 30 minutes and did not reach significance. It is a small study of one group, so it adds detail to the 8.8-hour estimate without settling it. One non-significant result does not show that 100 mg never matters: the European Food Safety Authority (EFSA) says single doses of 100 mg may affect sleep duration and patterns in some adults, especially when taken close to bedtime.

Is it bad to drink coffee after 7pm?

It depends on lights-out and on the amount. With an 11 p.m. lights-out, a coffee at 7 p.m. is 4 hours before bed. That is well inside the 8.8-hour estimate for a 250 mL cup, so in this model it would be linked to a drop in sleep time. The 2025 trial found no significant effect for 100 mg, close to this cup size, even at 4 hours, so the two studies do not line up neatly for a cup of about this size, and EFSA notes that 100 mg may still affect sleep in some adults. With a much later night the gap is larger, and the estimate changes. These are group averages, and individual responses may differ.

Why no coffee after 3pm?

The rule is often quoted, and it roughly matches the estimate above for a midnight lights-out: counting 8.8 hours back from midnight gives about 3:10 p.m. We did not find a study built around that exact rule, so it is best read as a convenient shortcut, not a tested threshold. For an earlier night the same arithmetic points to an earlier cutoff.

What is the 2 hour coffee rule?

The label “2 hour coffee rule” is not defined in the sources behind this article, so we do not use it in any estimate here. The sources we read look at the gap between caffeine and sleep, which is a different question from what time should you stop drinking coffee by a fixed rule of thumb.

Is 4pm too late for caffeine?

Counted back from an 11 p.m. lights-out, 4 p.m. leaves 7 hours. That is shorter than the 8.8 hours estimated for a 250 mL cup, so the model would link it to some loss of sleep time. For a midnight lights-out it leaves 8 hours, which is closer to the estimate but still short of it. With a smaller drink, a later night or faster clearance, the picture could differ.

Is 2:00 too late to drink coffee?

It depends on lights-out. For an 11 p.m. or midnight lights-out, 2 p.m. falls before the model cutoffs in the table above. For a 9 p.m. or 10 p.m. lights-out, the model cutoffs are around 12:10 p.m. and 1:10 p.m., so 2 p.m. would sit inside the window. Whether anyone would notice anything depends on the cup size, clearance speed and individual sleep.

What is the latest time to drink coffee, in practice?

There is no single answer, and the honest version is a range. So what time should you stop drinking coffee if you only want a rough guide? About 8.8 hours before lights-out for a 250 mL cup is the estimate we have, and a longer gap for bigger servings. The latest time to drink coffee in this model therefore moves with both lights-out and cup size. The FDA lists 113 to 247 mg for a 12 oz cup of brewed coffee, so two cups called “regular coffee” can contain very different amounts. That spread is one more reason the estimate is soft.

Why the cutoff is a starting point, not a rule

If you are still wondering what time should you stop drinking coffee for yourself, several things can push a personal cutoff in either direction:

  • Clearance speed. The American Academy of Sleep Medicine gives about 3 to 5 hours for the half-life of caffeine, and the 2023 meta-analysis notes values of about 2 to 10 hours across healthy adults.
  • Amount. A small cup of tea and a large cold brew are very different amounts of caffeine, and the 2025 trial points the same way.
  • How caffeine works. Adenosine is a substance in the body that promotes sleepiness, according to the American Academy of Sleep Medicine, and caffeine blocks its receptors. How fast the body clears caffeine may differ from person to person.
  • The studies themselves. The meta-analysis covered healthy adults who were mostly low to moderate caffeine users, so the results may not hold for teenagers, older adults, people who rarely have caffeine, or very heavy users. Some of the underlying studies used activity monitors, which can overestimate sleep.
  • Statistical, not necessarily clinical. The cutoff times mark where a statistically significant drop shows up. The authors themselves note that this assumes a statistically significant drop is equivalent to a clinically significant one, so it does not automatically mean a drop you would notice or that matters for your health.

Sleep also depends on many everyday factors, and the studies cannot separate them for your own life. A bad night after a late coffee does not prove the coffee caused it. The same goes for coffee before bed on a night that goes well: one night shows very little either way.

How are these numbers meant to be used?

The authors of the 2023 review describe their cut-off times as a starting point to be adjusted to the effect on one’s own sleep, not as a rule. The numbers here are best read the same way: a way to understand the pattern, not a verdict on anyone’s habits.

For a rough idea of how much caffeine your usual drinks might leave at night, the caffeine calculator lets you add drinks and move the half-life. For the background on speed of clearance, see how long caffeine stays in your system and the caffeine half-life guide.

Sources

  1. Gardiner C. et al. (2023). The effect of caffeine on subsequent sleep: a systematic review and meta-analysis. Sleep Medicine Reviews 69:101764.
  2. Drake C. et al. (2013). Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed. Journal of Clinical Sleep Medicine 9(11).
  3. Gardiner C.L. et al. (2025). Dose and timing effects of caffeine on subsequent sleep: a randomized clinical crossover trial. Sleep.
  4. American Academy of Sleep Medicine, Sleep Education: Sleep and Caffeine.
  5. U.S. FDA. Spilling the Beans: How Much Caffeine Is Too Much?
  6. European Food Safety Authority (EFSA). Caffeine (topic page, based on the 2015 Scientific Opinion on the safety of caffeine, EFSA Journal 13(5):4102).
Next in Caffeine & SleepCaffeine and Sleep: What the Research Suggests

Keep reading

More guides