Sleep

The Best Time to Stop Drinking Coffee for Better Sleep

Caffeine lingers for hours. Research shows even an afternoon coffee can steal sleep. Here is how to set a sensible caffeine curfew.

Caffeine works by blocking adenosine, the molecule that builds up through the day and makes you feel sleepy. The catch is how long it sticks around: caffeine has a half-life of about 5 hours in a typical healthy adult. Drink a 200 mg coffee at 4 p.m. and roughly 100 mg is still circulating at 9 p.m.

How late is too late?

A frequently cited 2013 clinical study gave people caffeine 0, 3, and 6 hours before bed. Even the 6-hours-before-bed dose measurably reduced total sleep — and people often did not notice the damage themselves. That is the core problem: caffeine can flatten your sleep quality without making you feel wired.

A simple rule of thumb Set your "caffeine curfew" about 8–10 hours before your planned bedtime. If you go to bed at 11 p.m., make your last coffee around 1–3 p.m. People who are sensitive to caffeine, or who metabolize it slowly, may need an even earlier cutoff.

Try itFind your caffeine curfew Open full tool
Your usual caffeine hit95 mg

Your caffeine curfew is 6:22 PM for a 11:00 PM bedtime.

Your caffeine curfew6:22 PM

Have your last 95 mg by 6:22 PM — about 4.6 hours before your 11:00 PM bedtime — to be near 50 mg residual by bed.

Prefer a cushion? The common rule of thumb is to stop 1:00 PM–3:00 PM (8–10 hours before bed).

Your day, optimized for sleep

7:00 AM wake11:00 PM bed
  1. 7:00 AMWake up
  2. 7:30 AMMorning light10–30 min outdoors, within 1 hour of waking
  3. 6:22 PMLast caffeineabout 4.6 h before bed
  4. 9:30 PMScreens offdim screens & bright lights
  5. 10:15 PMWind downrelax, dim the lights
  6. 11:00 PMBedtime

Caffeine still in your system

If your last 95 mg is at 6:22 PM, this is roughly how much remains — about 50 mg by bedtime (≈5-hour half-life).

050100~50 mgbed6:22 PM

General sleep-hygiene education, not medical advice. Caffeine metabolism varies a lot between people (genetics, smoking, pregnancy, and some medications change it) — treat these times as a starting point and adjust to how you feel.

Work backward from your bedtime

To set the curfew you first need a target bedtime — and the easiest way to find one that ends on a natural wake-up is to count in 90-minute sleep cycles from when you have to get up.

Try itFind your ideal bedtime Open full tool

Sleep Calculator

I want to…

Assumes about 15 minutes to fall asleep, with 90-minute cycles.

To wake at 7:00 AM, go to bed at:
  • 6 cycles9 hours of sleep9:45 PMRecommended
  • 5 cycles7.5 hours of sleep11:15 PMRecommended
  • 4 cycles6 hours of sleep12:45 AM

Most adults do best with 5–6 full cycles (7.5–9 hours). Waking at the end of a cycle helps you feel refreshed rather than groggy.

Once you know your bedtime, subtract 8–10 hours for your last coffee. If poor sleep has already piled up, the Sleep Debt Calculator shows how much you owe and how to repay it gradually.

Things that change your cutoff

  • Genetics & sensitivity: "slow metabolizers" clear caffeine far more slowly and should cut off earlier.
  • Dose: a double espresso needs more lead time than a small cup.
  • Hidden sources: tea, cola, energy drinks, pre-workout, dark chocolate, and some painkillers all add up.
  • Pregnancy & some medications: can dramatically slow caffeine clearance — follow medical advice.

Better-sleep habits that help more than timing alone

  • Get morning daylight to anchor your body clock.
  • Keep a consistent wake-up time, even on weekends.
  • Swap the late coffee for decaf or herbal tea to keep the ritual.
  • Dim screens and lights in the last hour before bed.

People also ask

What time should I stop drinking coffee?

Because caffeine has a ~5-hour half-life and can disrupt sleep even 6 hours out, a good default is to stop 8–10 hours before bed — roughly early-to-mid afternoon for an 11 p.m. bedtime.

Does afternoon coffee really affect sleep?

Yes. Controlled research found caffeine taken 6 hours before bed significantly reduced total sleep time, often without the person realizing their sleep had worsened.

How long does caffeine stay in your system?

About half is cleared in roughly 5 hours, but it takes around 10 hours or more to clear most of a dose — longer in slow metabolizers, during pregnancy, or with certain medications.

Reviewed & sources

  1. Drake C, et al. Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed. J Clin Sleep Med. 2013.
  2. Institute of Medicine / FDA. Caffeine half-life is roughly 5 hours in healthy adults.
  3. Clark I, Landolt HP. Coffee, caffeine, and sleep: a systematic review. Sleep Med Rev. 2017.