Caffeine and sleep: when to have your last cup
What the FDA, a sleep-lab study and the Sleep Foundation say about caffeine timing, turned into clock times for a 10:30 PM bedtime.
Caffeine keeps working long after the cup is empty. The question is not only how much, but when.
How caffeine keeps you up
NINDS explains the mechanism in two sentences. A chemical called adenosine builds up and "helps make you feel sleepy." Caffeine "counteracts sleepiness by blocking the actions of adenosine."
That is the point of morning coffee. It is also why an afternoon cup can still be working at bedtime.
How much: the FDA number
The FDA says that for most adults, 400 milligrams a day is "an amount not generally associated with negative effects." That is about two to three 12-fluid-ounce cups of coffee.
The FDA also lists insomnia or sleep disruptions among the signs of too much caffeine. For children and teens, it lists sleep problems as a possible effect. It recommends that people who are pregnant, trying to become pregnant or breastfeeding talk to their health care provider about caffeine.
Caffeine varies a lot by drink. The FDA's typical ranges per 12 fl oz (355 ml):
| Drink, 12 fl oz (355 ml) | Caffeine |
|---|---|
| Caffeinated soft drink | 23–83 mg |
| Green tea | about 37 mg |
| Black tea | about 71 mg |
| Energy drink | 41–246 mg |
| Brewed coffee | 113–247 mg |
A single 12-ounce coffee can be anywhere from about a quarter (113 mg) to more than half (247 mg) of the 400 mg figure.
When: what the sleep-lab study found
The best-known timing study was published in the Journal of Clinical Sleep Medicine in 2013. The American Academy of Sleep Medicine summarized it:
- 12 healthy normal sleepers took 400 mg of caffeine (about 2 to 3 cups of coffee) at bedtime, 3 hours before, or 6 hours before.
- Caffeine at all three times disrupted sleep.
- Even 6 hours before bed, objectively measured total sleep time was cut by more than one hour.
- The participants did not report noticing the disruption.
The release concluded that caffeine "generally should be avoided after 5 p.m." The last finding is the one to remember. You may feel you slept fine and still have lost an hour.
How long: the half-life problem
The Sleep Foundation puts caffeine's half-life at "anywhere between 2 and 12 hours." The FDA says only that there is wide variation in how fast people eliminate caffeine. The half-life is the time it takes the body to clear half of a dose.
To see what that range means, here is simple half-life math for a 200 mg coffee drunk 8 hours before bed. This is arithmetic, not a prediction for your body.
| If your half-life is… | Caffeine left after 8 hours |
|---|---|
| 2 hours | 12.5 mg |
| 4 hours | 50 mg |
| 8 hours | 100 mg |
| 12 hours | about 126 mg |
At the slow end of the range, more than half the coffee is still on board at bedtime. That is why one person can drink an espresso after dinner and sleep while another lies awake after a 3 PM latte.
Turning it into a clock time
The Sleep Foundation says the generally recommended cut-off is "a minimum of eight hours before bedtime." The 2013 study shows that 6 hours was not enough for its 400 mg dose. CDC's own list of habits says to avoid caffeine "in the afternoon or evening," and NINDS says to avoid it "late in the day."
For a 10:30 PM bedtime, our library gives:
| Rule | Last caffeine by |
|---|---|
| 6 hours before bed (the study's earliest dose, still disruptive) | 4:30 PM (16:30) |
| 8 hours before bed (Sleep Foundation's minimum) | 2:30 PM (14:30) |
Use the 8-hour line as the default. If your bedtime is earlier, the cut-off moves with it: with a 9:30 PM bedtime it becomes 1:30 PM.
A simple plan
- Find your bedtime. The sleep calculator gives one from your alarm. For a 6:30 AM alarm and five cycles, it is 10:45 PM.
- Count back 8 hours. For 10:45 PM, that is 2:45 PM.
- Front-load. Keep most of the day's caffeine in the morning.
- Check the label. Energy drinks and large coffees span huge ranges. A late "small" drink can be bigger than it seems.
If you nap, the National Sleep Foundation notes that a small amount of caffeine before a nap may reduce grogginess. That only works with an early nap. See how long a nap should be.
When to get help
If you have cut caffeine early and still struggle to sleep, caffeine may not be the cause. CDC says to talk to your healthcare provider if you regularly have problems sleeping. The FDA also lists an increased heart rate, heart palpitations, anxiety and jitters among the signs of too much caffeine, which are worth raising with a doctor too.
Sources
- FDA: Spilling the Beans: How Much Caffeine is Too Much? (content current as of August 28, 2024)
- American Academy of Sleep Medicine: Late afternoon and early evening caffeine can disrupt sleep at night (press release on Drake et al., 2013)
- Drake C, et al. Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed. J Clin Sleep Med, 2013
- Sleep Foundation: Caffeine and Sleep Problems (updated July 16, 2025)
- NINDS (NIH): Brain Basics, Understanding Sleep
- CDC: About Sleep
General information based on published averages, not medical advice. Sleep cycles and needs vary from person to person. If you have problems sleeping or feel unusually tired during the day, see a doctor.