Half-life and what remains
The AASM’s Sleep Education site gives caffeine a half-life of 3 to 5 hours. With a 5-hour half-life, half of what you drank is still in your body 5 hours later.
| Time since drinking | Remaining (5 h half-life) | If you had 200 mg |
|---|---|---|
| 5 hours | 50% | about 100 mg |
| 10 hours | 25% | about 50 mg |
| 15 hours | 12.5% | about 25 mg |
The same site cites research in which caffeine taken 6 hours before bed still reduced total sleep by 1 hour. The Sleep Foundation gives a general cutoff of at least 8 hours before bedtime.
Cutoff time by bedtime
| Bedtime | 6 hours before | 8 hours before (cutoff) |
|---|---|---|
| 22:00 | 16:00 | 14:00 |
| 23:15 | 17:15 | 15:15 |
| 00:45 | 18:45 | 16:45 |
It isn’t only coffee: energy drinks, tea, cola and chocolate contain caffeine too. The AASM site advises no more than about 300–400 mg a day in total.
People differ
The Sleep Foundation puts caffeine’s half-life anywhere from 2 to 12 hours, which shows how much it varies. If you are pregnant or take medication, ask your doctor or pharmacist.
Start with your bedtime

Get your bedtime from your wake time
Enter tomorrow’s wake time in Sleep Calculator’s When to sleep? and pick the 5- or 6-cycle bedtime. For a 07:00 wake-up and 5 cycles, that’s 23:15.
Subtract 8 hours
23:15 minus 8 hours is 15:15. That’s your target to stop caffeine. The app’s Guide tab also shows a daily tip, including one on caffeine.

Check it with notes
On days with late coffee, add a note like "coffee 4pm" in the Log tab with a star rating, and compare to find your own limit. Notes are searchable.
FAQ
Coffee doesn’t stop me falling asleep.
The point of the study above is that total sleep or deep sleep can still shrink even if you fall asleep fine. Compare in your log.
What about coffee before a nap?
Some guidance says caffeine on waking helps clear sleep inertia, but in the late afternoon it can still affect your night. See 20 vs 90-minute naps.
Sleep Calculator
No sign-up, and your sleep log stays on your phone. Free on Android.