Guide · Sunrise

How long before bed should you stop drinking caffeine?

Quick answer

How long before bed should you stop drinking caffeine? At least 6 hours, and longer if you are sensitive. In a 2013 study, a large dose taken 6 hours before bed still cut total sleep by more than an hour. With a 10:30 PM bedtime, stop by about 4:30 PM. Sunrise, an alarm app, tracks your sleep.

Updated 2 min readGambit Studio

Important: this guide summarizes official guidance and published studies and is not a substitute for advice from a doctor. Loud snoring, pauses in breathing during sleep, strong daytime sleepiness or tiredness that lasts for weeks are reasons to see one.

The evidence

Researchers gave people 400 mg of caffeine 0, 3 or 6 hours before bedtime; even at 6 hours, total sleep fell by more than one hour (Drake et al., 2013). Caffeine's effects last for hours; the AASM advises avoiding it in the afternoon and evening (AASM).

Your cut-off time

BedtimeLast caffeine (6 h)If sensitive (8-10 h)
9:30 PM3:30 PM11:30 AM-1:30 PM
10:30 PM4:30 PM12:30-2:30 PM
11:30 PM5:30 PM1:30-3:30 PM
12:30 AM6:30 PM2:30-4:30 PM

Count all sources: coffee, tea, cola, energy drinks, pre-workout and some pain relievers. The FDA cites 400 mg a day as an amount not generally linked to negative effects in healthy adults (FDA), but timing matters for sleep even below that.

Already had a late coffee?

  • Keep your usual bedtime but go to bed only when sleepy (AASM).
  • Dim the lights and skip screens to let sleepiness build.
  • Keep the same wake time tomorrow; one bad night is not worth a lie-in.

Where the Sunrise app helps

Test your own cut-off: move your last coffee earlier for a week and compare your sleep efficiency and score in Sunrise.

Sources

  1. Drake et al. Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed. J Clin Sleep Med, 2013
  2. AASM (sleepeducation.org): Healthy sleep habits
  3. FDA: Spilling the Beans: How Much Caffeine is Too Much? (August 28, 2024)

Frequently asked questions

What people ask most about this, answered with the source.

What time should I stop drinking coffee?
At least 6 hours before bedtime, so mid-afternoon for most people; earlier if you are sensitive or drink a lot.
Does caffeine affect sleep quality even if I fall asleep?
It can. In the 2013 study, caffeine taken 6 hours before bed reduced total sleep even though people did not always notice.
How long does caffeine stay in your system?
Its effects last several hours, which is why sleep doctors advise avoiding it in the afternoon and evening.
SunriseGentle Light, Heavy Sleepers
Get