Caffeine is popular because it works quickly and reliably. It blocks adenosine, a molecule that builds up through the day and creates sleep pressure. The catch is that the block does not end when the buzz does. Caffeine is cleared gradually, and a meaningful fraction can still be circulating when you want to sleep.
The half-life is the useful number
For most healthy adults, the half-life of caffeine is roughly five hours, though normal variation runs from about three to seven. That means half the caffeine from a 2pm coffee may still be present around 7pm, and a quarter may remain around midnight.
This is why the timing of the last cup matters more than the total for many people. A single late coffee can reduce sleep quality even when you fall asleep without trouble. You may spend less time in deep sleep and wake more often, without connecting the dots.
Calculate a personal cutoff
Start with your sleep window. If you aim to be asleep by 11pm, count back about eight hours. That puts the cutoff around 3pm. If you are sensitive, move it earlier. If you regularly drink coffee at 5pm and sleep well, you may not need to change anything.
Run a two-week test rather than guessing. Keep the morning coffee the same, move the afternoon cup earlier by two hours, and note sleep latency, night awakenings, and how you feel in the morning. Change one variable at a time so you can actually learn something.
Sensitivity is real and uneven
Genetics, pregnancy, some medications, and liver function change how quickly caffeine is cleared. Smoking speeds it up; oral contraceptives and pregnancy slow it down. Age tends to reduce tolerance for late caffeine even when the morning cup still feels fine.
If you are unsure, the simplest experiment is a week without caffeine after noon. If sleep improves clearly, you have your answer. If nothing changes, the late cup is probably not your main problem.
Watch the hidden sources
Coffee is not the only delivery system. Tea, cola, energy drinks, chocolate, pre-workout powders, and some painkillers contain caffeine. A large energy drink can carry as much as two or three coffees, and the label may not make the total obvious.
- Check the milligrams on energy drinks and pre-workout labels.
- Remember that espresso has less volume but a similar dose per shot.
- Treat afternoon chocolate and cola as part of the total.
- Do not use caffeine to compensate for a sleep debt you never repay.
Cut down without a crash
Stopping suddenly can bring headaches and fatigue. Reduce by about one cup or one serving every few days, and replace the ritual rather than only the drink. A decaf coffee or a sparkling water in the same mug can preserve the pause without the dose.
If you have a heart condition, uncontrolled anxiety, or are pregnant, ask a clinician about a suitable limit. The US Food and Drug Administration publishes general caffeine guidance.
For the broader evening routine, see a consistent sleep window beats perfect sleep.
Frequently asked questions
What time should I stop drinking coffee?
A practical default is eight hours before your intended bedtime, so around 3pm for an 11pm bedtime. Sensitive sleepers may need to stop earlier; people who sleep well may not need a strict cutoff.
Does caffeine affect sleep if I fall asleep easily?
Yes. It can reduce deep sleep and increase night awakenings even when sleep onset feels normal. The effect is easy to miss without tracking your sleep for a week or two.
How much caffeine is safe per day?
For most healthy adults, up to about 400 milligrams per day is considered moderate by US regulators. Individual tolerance, pregnancy, and medical conditions change that picture.
Can I drink decaf in the evening?
Usually yes. Decaf contains a small amount of caffeine, but far less than regular coffee. If you are very sensitive, test it rather than assuming.
Read next
Box Breathing: A Practical Stress Reset
Slow breathing will not solve the cause of stress. It can still buy you a calmer minute, and a calmer minute is often enough to make a better decision.