When to Stop Drinking Coffee Before Bed
Caffeine

When to Stop Drinking Coffee Before Bed

To protect your sleep, stop drinking coffee about 8–10 hours before bed — research shows caffeine 6 hours before bedtime still disrupts sleep. Here is how to find your personal cutoff.

D
Daniel Okafor · MS Food Science
Coffee Science Writer
|Published Reviewed 2026-07-05|5 min read

The short answer

Stop drinking coffee about 8–10 hours before bed for the safest sleep, and treat 6 hours as the bare minimum. A well-known study found that caffeine taken even 6 hours before bedtime significantly reduced total sleep time — often without the drinker noticing. If you go to bed at 11 p.m., that means your last coffee is ideally by 1–3 p.m.
The reason is simple math: caffeine's long half-life means an afternoon cup is still partly active at bedtime.

Why a mid-afternoon cutoff works

Caffeine has a half-life of about 5 hours (see how long caffeine lasts). So a 200 mg afternoon coffee at 3 p.m. still leaves roughly 100 mg in your system at 8 p.m. and ~50 mg at 1 a.m.
Caffeine keeps you awake by blocking adenosine, the molecule that builds up during the day and makes you sleepy. Even a modest amount at bedtime can blunt that signal, reduce deep sleep, and delay how long it takes to fall asleep — even if you *feel* tired enough to drop off.

Find your personal cutoff

Your ideal curfew depends on your bedtime, how much you drink, and how fast you metabolize caffeine. To dial it in:
Use the math. Enter your dose and bedtime into the caffeine half-life calculator to see how much caffeine will still be active when you turn in.
Count the real total. A large café coffee can be 200–300 mg, not 95 — check yours with the caffeine intake calculator.
Adjust for sensitivity. Slow metabolizers, pregnant people, and the caffeine-sensitive should push the cutoff earlier.

If you slip past your cutoff

Had a late coffee? A few things help: switch to decaf or half-caff after your cutoff, keep the evening dose small, and give yourself a longer wind-down. Over days, moving your last cup earlier is one of the highest-impact changes you can make for sleep quality — no other habit is required.

Frequently asked questions

How many hours before bed should you stop drinking coffee?

Aim to stop 8–10 hours before bed, and treat 6 hours as the minimum. Research shows caffeine even 6 hours before bedtime measurably reduces sleep.

Does an afternoon coffee affect sleep?

It can. With a ~5-hour half-life, a 3 p.m. coffee still leaves a meaningful amount of caffeine active at bedtime, which can reduce deep sleep even if you fall asleep fine.

What time should I have my last coffee?

For an 11 p.m. bedtime, aim for your last coffee by 1–3 p.m. Adjust earlier if you are caffeine-sensitive, pregnant, or a slow metabolizer.

Is decaf okay before bed?

Generally yes — decaf has only about 2–5 mg of caffeine per cup, far too little to disrupt most people's sleep.

About the author

D
Daniel Okafor · MS Food Science
Coffee Science Writer

Daniel holds an MS in Food Science and covers the chemistry side of coffee for BrewMetrics — caffeine metabolism, extraction, water chemistry, and roast development. He translates peer-reviewed research and USDA/FDA data into practical guidance, and every claim in his articles is cited to a verifiable source.

Caffeine & MetabolismExtraction ChemistryWater for CoffeeRoast Science

Sources

  • 1.Drake C. et al., Journal of Clinical Sleep Medicine — "Caffeine Effects on Sleep Taken 0, 3, and 6 Hours before Going to Bed."
  • 2.U.S. Food & Drug Administration (FDA) — Caffeine and sleep guidance.
  • 3.National Sleep Foundation — Caffeine and sleep hygiene recommendations.

Brew it by the numbers

Dial in your ratio, caffeine, and cost with our free coffee calculators.

Open the calculators