The best time to drink coffee is usually earlier in your waking day, with the last caffeinated serving well before you plan to sleep. There isn't one clock time that works for everyone. If an afternoon coffee seems to be affecting your nights, start by moving that serving earlier or replacing it with decaf. Check the size of the drink as well as the time.
This Coffee Corner guide helps you make that decision without treating a study average as a personal deadline. A small morning coffee, a large afternoon cold brew and a late workout supplement aren't interchangeable doses.
Choose a starting cutoff from your bedtime
Work backward from when you actually intend to sleep. The NHLBI's sleep guidance notes that caffeine's effects can last up to eight hours. An eight-hour gap is a useful starting point for planning an earlier last cup, not proof that caffeine has cleared or that sleep will be unaffected.
| Planned bedtime | Eight hours earlier | Ten hours earlier |
|---|---|---|
| 9 p.m. | 1 p.m. | 11 a.m. |
| 10 p.m. | 2 p.m. | Noon |
| 11 p.m. | 3 p.m. | 1 p.m. |
| Midnight | 4 p.m. | 2 p.m. |
The ten-hour column simply shows what moving the last serving another two hours earlier looks like. It isn't a separately validated safe cutoff. Choose an earlier time if you already know that afternoon caffeine disrupts your sleep; you don't need to repeat an uncomfortable routine to establish a baseline.
For example, with an 11 p.m. bedtime and a habitual 5 p.m. coffee, moving that coffee to 3 p.m. changes the gap from six to eight hours. Keeping the same drink makes the timing comparison easier to interpret. Replacing it with decaf changes the dose too, which may be more practical if you want a late coffee break.
Why the dose changes the answer
Sleep studies help explain why advice ranges from avoiding evening coffee to stopping much earlier. They don't all test the same dose, people or outcome.
- Six hours isn't a guarantee. In Drake and colleagues' 2013 trial, a 400 mg dose disturbed sleep when taken at bedtime, three hours before or six hours before. That finding concerns a substantial dose, not a measured caffeine amount for every mug.
- The widely quoted 8.8 hours comes from a model. A 2023 review of 24 studies estimated that interval for coffee containing 107 mg in 250 mL. The analysis combined different study designs and modeled the final dose. Its authors describe the resulting times as starting points to adjust, not individualized predictions.
- A smaller dose had different results in a later trial. In Gardiner and colleagues' crossover trial, published online in 2024, 23 healthy young men received 100 or 400 mg at 12, eight or four hours before bed. Researchers found no statistically significant sleep effect from the 100 mg conditions, while 400 mg affected some sleep measures even 12 hours before bed. Participants also received their usual daily caffeine amount on waking. This wasn't a test of unlimited small coffees throughout the day.
The later trial doesn't establish that 100 mg four hours before bedtime is harmless for everyone. Women, people with sleep disorders and other populations weren't represented in that sample. Consider the amount and timing together. Neither result supplies a personal permission slip for a late coffee.
Also separate daily intake guidance from sleep advice. The FDA's 400 mg daily reference for most adults is neither a target nor a promise of undisturbed sleep. Use product-specific caffeine information where available; our caffeine serving guide explains why mug size and preparation matter.
Do you need to wait after waking?
You don't need to impose a 90-minute delay on a comfortable morning routine just because of a cortisol claim. A 2024 scientific review of caffeine questions found no evidence supporting the idea that waiting 1.5–2 hours prevents an afternoon crash.
If you prefer coffee with breakfast or after your first task, that's a reasonable preference. Choose a morning routine that feels comfortable; there's no established hormone window you need to hit. Moving the first cup later while leaving several later drinks in place doesn't answer the bedtime question.
If morning coffee repeatedly causes jitters, look at the serving before adding another timing rule. The FDA advises discussing unwanted symptoms, medicines, health conditions, pregnancy or breastfeeding with your health care provider. An earlier clock time doesn't make an unsuitable dose suitable.
What a half-life estimate can tell you
CDC/NIOSH describes a typical five-to-six-hour caffeine half-life. Half-life means the time for roughly half a dose to leave the body. It doesn't mean the entire dose disappears after that time, and clearance can take considerably longer in some people.
Those are calculated quantities, not measurements from a person or a brew. Changing the assumed half-life changes the result; it doesn't reveal your metabolism. Nor does a particular remaining amount predict when you'll fall asleep.
Our caffeine calculator models the servings currently entered as if consumed at one time. It doesn't automatically combine separate drinking times or include every food, supplement and medicine. To explore the example above, calculate each serving's elapsed time separately, then add the modeled amounts. Don't enter both drinks as though they were consumed at noon.
Use a short diary to see the pattern
The American Thoracic Society recommends a sleep diary that records sleep, naps and caffeine over a couple of weeks. The worksheet below adds drink details so you can distinguish a later serving from a larger one.
- Record a few ordinary days. Note the drink, approximate size and finish time. Include tea, energy drinks and other known caffeine sources. If you don't know the milligrams, write “unknown” instead of guessing.
- Choose one practical change. Move the last caffeinated drink earlier for the following week, or replace it with decaf. Write which change you made so you don't mistake a dose reduction for a timing-only effect.
- Check the following morning. Estimate how long you took to fall asleep, note prolonged waking and record how rested you feel. Mark unusual nights, such as travel or illness, rather than treating them as ordinary comparisons.
| Write down | What to include |
|---|---|
| Coffee and other caffeine | Drink, size, known mg or “unknown,” finish time |
| Sleep opportunity | Bedtime, getting-up time, naps |
| Night and next morning | Time to fall asleep, remembered waking, rested or unrefreshed |
| Anything unusual | Travel, alcohol, illness, schedule changes or a changed drink |
Keep your sleep schedule reasonably consistent, as recommended in AASM healthy-sleep guidance. Look for a repeated pattern, not a verdict from one good night. Your notes can support a conversation with a clinician, but they can't rule out sleep disruption you didn't notice or diagnose a sleep disorder.
Troubleshooting your coffee schedule
You fall asleep easily but wake unrefreshed. Falling asleep is only one aspect of sleep. The Gardiner trial found differences between perceived and objectively measured effects. Move the last caffeinated serving earlier and use the diary to compare waking and morning restfulness, not just how quickly you fall asleep. Persistent problems deserve medical advice.
You're still having trouble after moving the cutoff. Check whether the supposedly earlier routine includes a larger drink or another caffeine source. Reduce the late serving rather than shifting an equally large dose slightly earlier, and observe whether the nights change. The dose differences in the trials above explain why timing alone may not resolve the problem.
A sudden switch leaves you with a headache. Distinguish an abrupt reduction from the original sleep complaint. The FDA recommends cutting back gradually. Make a smaller reduction instead of alternating between no caffeine and your full usual intake; note whether the new symptoms settle.
The whole day still feels sleepy. Compare your available sleep time with your actual schedule before adding coffee. NIOSH cautions that caffeine doesn't provide the alertness of adequate sleep. Protect a regular sleep opportunity and seek care for ongoing daytime sleepiness. Don't drive or operate machinery when sleepy, as the Thoracic Society advises.
Fit workouts and shifts around sleep
Caffeine can help some exercise performance, especially endurance activity, but results vary. The NIH Office of Dietary Supplements also notes that more caffeine can increase side effects without adding benefit. For an evening workout, consider skipping the added caffeine rather than moving your planned bedtime later. Count a pre-workout drink in the same day's intake as coffee.
If you work nights, use your planned daytime sleep as the reference point. NHLBI advises limiting caffeine to the first part of a shift. A coffee near the end of the shift may be close to your bedtime even though everyone else is starting breakfast. Discuss persistent difficulties with a clinician; a coffee schedule alone can't resolve every shift-work sleep problem.
Coffee timing FAQs
Can I do this without a scale or sleep tracker?
Yes. Use the same mug, fill level and preparation, and note approximate finish times on paper or your phone. A labeled café size is enough to distinguish a small drink from a larger order. You don't need to convert scoops into caffeine milligrams, and a home scale cannot measure caffeine content. Record remembered sleep in the morning without watching the clock through the night.
Is decaf okay after dinner?
Decaf contains less caffeine, not necessarily none. It can be a useful swap, but if you're especially sensitive, choose a caffeine-free drink instead. See the decaf guide for serving estimates and label checks; there isn't a universal bedtime guarantee for decaf either.
What if I've already had coffee too late?
Avoid adding more caffeine and give it time. Keep the evening quiet and the bedroom dark and comfortable. If you're lying awake, the AASM suggests getting up for a quiet activity in low light and returning when sleepy. These habits support sleep; they don't cancel the caffeine dose. Don't try to counter it with alcohol or an improvised supplement routine.
When should I stop experimenting?
Ask your health care provider if sleep problems persist, daytime sleepiness affects normal activities, or caffeine causes concerning symptoms. Take your diary and a list of medicines and supplements. Repeatedly moving the last cup earlier is not a substitute for finding another cause.




