Coffee and Sleep: When to Stop Drinking for Better Rest

When to stop drinking coffee before bed: what sleep studies found at 100 and 400 mg, how much caffeine is left at bedtime at different half-lives, and how to find your own cutoff.

Rules for the last cup of the day vary: noon, 2 pm, “nothing after lunch.” The studies help explain why no one rule fits. The answer depends on how much caffeine is in the cup, how long before bed you drink it, and how fast your body clears it.

This page is about timing. Why some people clear caffeine faster than others is in our caffeine metabolism guide, and how much caffeine is in each kind of cup is in our caffeine in coffee guide.

What the sleep studies found

They disagree less than they seem to. Drake and the 2025 trial tested big single doses of 400 mg, about what the FDA cites for a whole day, and found them disruptive many hours later. The 2025 trial’s 100 mg dose, about one cup, made no measurable difference in healthy young men. The review’s 8.8 hours is an average across very different studies, not a rule for one person.

The European Food Safety Authority (EFSA) puts the population view this way: “Single doses of 100mg … of caffeine may affect sleep duration and patterns in some adults, particularly when consumed close to bedtime.” Some adults is the point. The 2025 trial’s authors note that adults over 40 have been shown to be more susceptible than the young men they tested.

How much is still in you at bedtime

How much caffeine is left when you go to bed is arithmetic, once you pick a half-life. The table uses our Caffeine Calculator’s model: each drink peaks about 45 minutes after you drink it, then halves every half-life. The 3-, 5- and 8-hour half-lives are the calculator’s Faster, Typical and Slower settings; why people differ is in the metabolism guide.

Caffeine left at an 11 pm bedtime from 100 mg (calculated with the calculator’s model):

Last 100 mg at3-hour half-life5-hour half-life8-hour half-life
8 amabout 3 mgabout 13 mgabout 28 mg
Noonabout 8 mgabout 22 mgabout 39 mg
2 pmabout 13 mgabout 30 mgabout 47 mg
4 pmabout 21 mgabout 39 mgabout 56 mg
6 pmabout 33 mgabout 51 mgabout 66 mg

Two things to keep in mind. First, the model is linear: 200 mg leaves twice as much, and drinks add up. The calculator estimates an 8 fl oz drip coffee at 105–195 mg, so one mug can be one to two of these 100 mg units. Second, the studies above measured sleep, not leftover caffeine. There’s no tested bedtime amount to aim for, so read the table as a comparison between times, not a pass mark.

Why you might not notice

People are poor judges of what caffeine does to their sleep. In Drake’s study, caffeine six hours before bed cut sleep by more than an hour on the monitor, yet the sleepers’ diaries didn’t register a significant loss. In the 2025 trial, 400 mg reduced how well the men felt they’d slept only when it was taken 4 hours before bed, although objective changes showed up at 8 and 12 hours too. The authors conclude that people “may have difficulty accurately perceiving the influence of caffeine on sleep quality.”

What changes is the shape of the night. Across the 2023 review’s studies, caffeine lengthened the time to fall asleep by 9 minutes and the time awake after first falling asleep by 12, lowered sleep efficiency by 7%, added light sleep and took away deep sleep. Drake found less deep (slow-wave) sleep when caffeine was taken at bedtime and 6 hours before.

What moves your cutoff

Finding your own last-cup time

Treat it as an experiment. Keep your amounts and times steady for a week or two and note how you sleep and how you feel in the morning. If you sleep poorly, move your last caffeinated cup earlier, or switch the afternoon one to decaf, and watch for a change. Because people underrate caffeine’s effect on their own sleep, a steady routine tells you more than one night’s impression.

If you have insomnia, snoring or pauses in breathing, restless legs, or sleep trouble that lasts, ask your clinician. Caffeine timing is one thing to look at, not a treatment. The same goes for pregnancy and for medicines that change how you clear caffeine.

For timing coffee around work, see coffee and productivity; for coffee in a fasting window, see coffee and intermittent fasting.

Sources

Share