You might feel the effect of an afternoon coffee for an hour or two. But caffeine stays active in your body much longer.
Caffeine’s half-life
On average, it takes around five hours for your body to clear half the caffeine you’ve consumed — though that ranges from a couple of hours to ten or more depending on genetics, medications, pregnancy and other factors. That means a 3pm coffee can still be partly active at 10pm.
The research
In a 2013 study, people took caffeine (about the amount in two cups of coffee) at bedtime, three hours before bed, or six hours before bed. Even caffeine taken six hours before bedtime reduced total sleep by more than an hour — and participants often didn’t notice the difference themselves.
A practical cutoff
For most people, stopping caffeine at least six to eight hours before bed is a sensible rule. If you go to bed at 10:30pm, that means no caffeine after roughly 2:30–4:30pm. If you’re sensitive or struggle with sleep, try a noon cutoff for two weeks and see what changes.
Hidden caffeine
Caffeine isn’t just in coffee: tea, cola, energy drinks, pre-workout supplements, dark chocolate and some pain relievers contain it too. Decaf coffee still contains a small amount.
How much is OK?
The FDA cites up to 400mg a day — about four cups of brewed coffee — as an amount not generally associated with negative effects for healthy adults. If you have anxiety, palpitations, reflux or hot flashes, you may notice benefits from less.