You had one coffee. At two in the afternoon. Hours ago, practically the morning by your reckoning. And yet here you are at half eleven, wide awake, mentally rearranging the kitchen cupboards, a hobby nobody asked for and caffeine apparently insists on.
The right caffeine cut-off time is later than most people admit and earlier than most people want, and it depends on a gene you have probably never been tested for. Let us get specific.

Half-life, and why it matters
Caffeine has a half-life of roughly five to six hours in most adults. That means a 200mg dose — a large filter coffee — still has around 100mg circulating five hours later, and 50mg at the ten-hour mark.
So a 2pm coffee leaves meaningful caffeine on board at 10pm. Not enough to keep you awake in an obvious way. Enough to shift what your sleep looks like once you are.
What the research actually measured
Evidence: Strong. The most-quoted trial gave people 400mg of caffeine at zero, three and six hours before bed. All three timings measurably disrupted sleep — including the dose taken six hours before bedtime, which reduced total sleep time by more than an hour compared with placebo.
The part that matters most: participants did not reliably notice. Their subjective sense of how they had slept did not match what the monitoring showed. Which is exactly why people insist coffee does not affect them, in perfect good faith.
More recent work suggests caffeine also suppresses deep sleep specifically, so you can sleep a normal number of hours and still get less of the restorative kind.
“Caffeine does not affect my sleep” is a claim about what you noticed, not about what happened.
Setting your caffeine cut-off time
A reasonable default is eight to ten hours before bed. For an 11pm bedtime, that means finishing by 1pm or 3pm. Yes, this is annoying. I have made my peace with it the way one makes peace with a difficult in-law: reluctantly, and only after several failed rebellions.
If you are a slow metaboliser, push it earlier. Variation in the CYP1A2 gene means some people clear caffeine at less than half the rate of others. You do not need a test — if a mid-afternoon coffee reliably ruins your night, you have your answer for free.
If you take hormonal birth control, halve your expectations. Oestrogen slows caffeine clearance considerably, which can nearly double the half-life. Almost nobody is told this.
Watch the hidden sources. Green tea, cola, dark chocolate, some painkillers and most pre-workouts. A pre-workout at 6pm is a coffee at 6pm wearing gym clothes.

The morning half of the problem
Cutting caffeine earlier only holds if the mornings are survivable. Two things make that likelier.
Delay the first coffee by 60 to 90 minutes after waking. This reduces the mid-afternoon crash that makes the 3pm cup feel non-negotiable. The evidence here is thinner than the internet suggests — file under reasonable rather than proven — but it costs nothing to test.
Get outside light early instead. Morning light does more for daytime alertness than a second coffee, and unlike caffeine it improves the following night rather than taxing it.
If you cut back and nothing improves
Then caffeine was not your problem, which is useful to know. Look at alcohol, the temperature of your room, an overnight blood sugar dip, or an untreated sleep disorder. Two weeks of an earlier cut-off is a decent experiment; a month of white-knuckling it without improvement is a sign to look elsewhere.
Questions people actually ask
Is 2pm too late for coffee?
For an 11pm bedtime, 2pm leaves roughly a quarter of the dose still circulating at bedtime. It is workable for fast metabolisers and too late for many people.
How long does caffeine stay in your system?
The half-life is around five to six hours for most adults, so meaningful amounts remain for ten to twelve hours. Hormonal contraceptives and pregnancy both slow clearance further.
Does decaf count?
Decaf contains a small amount of caffeine, typically around 2 to 5mg per cup. For almost everyone that is negligible in the evening.
More in the sleep section.
Where this comes from
- Drake et al. — caffeine effects on sleep taken 0, 3 and 6 hours before bed
- PubMed — CYP1A2 and caffeine metabolism
- NHS — Sleep and tiredness
- Sleep Foundation — caffeine and sleep
Links open in a new tab. Where a claim rests on a small or mixed body of evidence, that is stated in the text above.