Skip to content

Blog / Adult sleep

Caffeine and sleep: when to have your last cup

How caffeine can affect sleep hours after you drink it, and how to choose a sensible cutoff time.

By Best Sleep Trackers · Updated October 18, 2026

Caffeine blocks the signal that makes you feel sleepy. It wears off slowly, so an afternoon coffee can still be working at bedtime.

What the research found

In a lab study, 400 mg of caffeine taken three hours before bed, and even six hours before bed, reduced total sleep time by more than an hour compared with a placebo (Drake et al., 2013). People often did not notice how much sleep they had lost.

How much caffeine is in a drink?

It varies a lot by brand and strength. A brewed coffee often has far more than a cola or a cup of tea (Mayo Clinic). The caffeine cutoff calculator lets you pick your drink and works out how much is left at bedtime.

Practical tips

  • Work back from bedtime. Find your bedtime with the bedtime calculator, then use the cutoff tool.
  • Move it earlier if you sleep lightly or have trouble falling asleep.
  • Switch down. Half-strength or tea in the afternoon leaves less behind.
  • Watch hidden sources: energy drinks, pre-workout, some painkillers, dark chocolate.
  • Night shifts? Keep caffeine to the start of the shift (shift work tips).

Pregnant, or on medication? Ask your doctor what limit is right for you.

Try the tool Caffeine cutoff calculator The latest time for your last coffee, tea or energy drink.

Sources

Related articles

General information only. This tool gives general sleep information and is not a substitute for medical advice. If you're worried about your sleep or your child's, talk to a doctor or pediatrician.