Best Time to Drink Coffee: The Science of Timing (2026)
TL;DR: The best time to drink coffee is roughly 60–90 minutes after waking — not the moment your alarm goes off — because your natural cortisol is already high on wake-up. The latest you should have coffee is about 8–10 hours before bed, since caffeine's half-life is roughly 5–6 hours and half of it is still in your system that long after your last sip. Below is the morning window, the evening cutoff math, and a bedtime-to-cutoff table you can use tonight.
Most of us reach for coffee in the first ten minutes of the day, half-awake and running on habit. It turns out that's the one window where caffeine does the least for you — and the timing of your last cup matters even more for how you sleep tonight.
Why not first thing in the morning?
When you wake up, your body runs a built-in wake-up program called the cortisol awakening response. Cortisol — your main alertness hormone — spikes 30–45 minutes after you open your eyes and stays elevated for a while. Cleveland Clinic notes that cortisol naturally peaks between 7 and 8 a.m. for most people on a standard schedule.
The argument goes like this: if your body is already flooding you with a natural stimulant, adding caffeine on top is redundant. You get less of a lift, and you may train your system to need more coffee for the same effect.
There's a second layer worth knowing. Overnight, a molecule called adenosine builds up and makes you sleepy; caffeine works by blocking it. First thing in the morning, your adenosine has mostly cleared from sleep, so there's less for caffeine to block anyway.
Here's the honest caveat: the "wait for cortisol to dip" advice is popular but debated. The cortisol awakening response is real and well-documented, but there's little direct evidence that a 30-minute wait dramatically changes how alert you feel. Treat it as a low-cost experiment, not a hard rule.
The best morning window
For most people on a 6:30–7 a.m. wake time, the sweet spot lands somewhere between 9:30 and 11:30 a.m. — about 60 to 90 minutes after your natural cortisol peak starts to fall. Cleveland Clinic points to a similar window, suggesting 9:30 to 11 a.m. as the point where cortisol dips and caffeine gives you the biggest return.
The simple version: don't drink coffee the second you wake up. Give it 60–90 minutes.
There's also a health-timing angle that's newer and stronger than the cortisol story. A 2025 analysis of more than 40,000 U.S. adults, published in the European Heart Journal and covered by the NHLBI, found that people who drank coffee mostly in the morning were 16% less likely to die from any cause — and 31% less likely to die from cardiovascular disease — than non-coffee drinkers, over nearly a decade. That same protection didn't show up for people who drank coffee all day. The researchers think front-loading coffee protects sleep, which protects the heart. It's an association, not proof, but it points the same direction: coffee early, not late.
If you're trying to shift your morning timing on purpose, it helps to anchor it to an existing routine. Our guide on how to wake up at 5am covers the light, movement, and bedtime-math steps that do more for early alertness than that first cup ever will.
The afternoon window and the cutoff
Caffeine's effect on sleep comes down to one number: its half-life, the time it takes your body to clear half of a dose. In healthy adults that's roughly 5–6 hours, though it ranges widely — Cleveland Clinic cites anywhere from 2 to 10 hours depending on your metabolism and the CYP1A2 gene.
Do the math on a 5 p.m. coffee with a 5.5-hour half-life. At 10:30 p.m., half the caffeine is still circulating. At 4 a.m., a quarter is still there. That's why an "innocent" late-afternoon cup can quietly cost you deep sleep even if you fall asleep fine.
The practical rule: stop drinking coffee 8–10 hours before bed. If you go to bed at 11 p.m., that means last coffee by about 1–3 p.m.
Because your metabolism is personal, a general rule only gets you close. To get a cutoff time built around your own last cup and bedtime, run the numbers through our free caffeine half-life calculator — it estimates how much caffeine is left in your system at bedtime and tells you when to stop.

How caffeine timing affects sleep
The strongest evidence for a cutoff comes from a 2013 study in the Journal of Clinical Sleep Medicine. Researchers gave participants a 400 mg caffeine dose (about four cups of coffee) at 0, 3, or 6 hours before bed. Even the dose taken a full 6 hours before bedtime measurably reduced total sleep time — and many people didn't notice the disruption.
That last part matters. You can feel like you slept fine and still lose deep sleep to caffeine you drank in the afternoon. Over weeks, those small losses add up into a running deficit — the kind of sleep debt that leaves you reaching for more coffee the next morning, which pushes your cutoff later, which costs you more sleep. It's a loop worth breaking.
If your evenings and mornings both feel off, timing your caffeine is one lever, but it's not the only one. A tighter wind-down routine helps too — the sleep hygiene checklist walks through the evening habits that protect the back half of your night, and the sleep cycle calculator helps you pick a bedtime that lines up with your wake time.
Your bedtime to latest-coffee table
This table assumes a moderate caffeine metabolism (about a 5.5-hour half-life) and the standard "stop 8–10 hours before bed" rule. If you're caffeine-sensitive or a slow metabolizer, aim for the earlier end.
| Your bedtime | Latest recommended coffee | Why |
|---|---|---|
| 9:00 p.m. | 11:00 a.m. – 1:00 p.m. | ~10 h clears most caffeine before an early bed |
| 10:00 p.m. | 12:00 p.m. – 2:00 p.m. | Early afternoon cutoff keeps deep sleep intact |
| 11:00 p.m. | 1:00 p.m. – 3:00 p.m. | The most common cutoff for a standard schedule |
| 12:00 a.m. | 2:00 p.m. – 4:00 p.m. | Later bed buys a slightly later last cup |
| 1:00 a.m. | 3:00 p.m. – 5:00 p.m. | Night owls still need an 8+ hour buffer |
The gap in each row is your safety margin — pick the earlier time on days you're already sleeping poorly.
Cutoffs only work if you actually keep them, and 3 p.m. is exactly when the afternoon slump makes a coffee tempting. This is where treating "coffee cutoff" as a trackable daily habit helps. In a habit tracker like HabitBox, you can log a simple "no coffee after 2 p.m." check-in and watch the streak build — the visual progress does more to hold the line than willpower alone, and after a couple of weeks you'll see whether earlier cutoffs actually improve your sleep.
Frequently asked questions

Mira Hartwell
Editor, HabitBoxEditor at HabitBox. Writes about habit science and productivity, grounding every post in named research (Lally, Wood, Walker, Huberman) instead of recycled advice. Read full bio →


