The answer depends on your genetics, but there are evidence-based guidelines that work for most people. And most people are drinking coffee too late in the day.
Caffeine’s Half-Life
Caffeine has a half-life of approximately 5–7 hours in most adults. That means if you drink a 200mg cup of coffee (a standard mug) at 2pm, you still have 100mg of caffeine active in your system at 7–9pm. By midnight, there may still be 50mg circulating.
Research published in the Journal of Clinical Sleep Medicine found that caffeine consumed even 6 hours before bedtime significantly reduced total sleep time. Participants reported feeling fine, but their sleep metrics showed clear disruption — less deep sleep, more fragmented rest.
The Practical Cutoff
For most people, stopping caffeine intake by 2pm is a reasonable rule of thumb. If you go to bed at midnight and have a longer caffeine half-life, you might push this to 3–4pm. If you’re particularly sensitive or go to bed at 10pm, noon might be more appropriate.
The “I can drink coffee at 8pm and sleep fine” crowd falls into two groups: fast metabolizers (a real genetic variation), and people who have normalized poor sleep quality and don’t notice the deficit.
Decaf Is Not Caffeine-Free
Worth knowing: decaf coffee contains roughly 2–15mg of caffeine per cup, compared to 80–200mg in regular coffee. For most people, this is negligible. For sensitive individuals, a late-night decaf can still cause enough stimulation to disrupt sleep.
The Sleep-Coffee Cycle
Poor sleep increases adenosine buildup faster the next day, making you feel more tired and more dependent on caffeine to function. This creates a cycle where caffeine disrupts sleep, which increases dependence on caffeine, which further disrupts sleep. Breaking that cycle for a few days — by cutting off caffeine earlier — often leads to better energy levels overall.
