Most people think about how much caffeine they drink and never about when. But because of how long caffeine lingers in your body, the timing of your last cup may matter more than the amount. Here is the cutoff that protects your sleep, and the science behind it.

The key fact: caffeine's long half-life

Caffeine has a half-life of roughly five to six hours in most adults. Half-life means the time it takes your body to clear half of it. So if you drink a coffee with 100mg of caffeine at 3 p.m.:

That lingering caffeine is the problem. Even if you fall asleep, caffeine in your system blocks adenosine — the molecule that builds sleep pressure — which lightens your sleep, reduces deep sleep, and fragments the night. You can sleep 'through' caffeine and still get worse sleep from it. (How sleep pressure and caffeine interact.)

The cutoff time

A practical rule based on the half-life: stop caffeine at least 8-10 hours before bed. For a midnight bedtime, that means no caffeine after about 2-4 p.m. For most people aiming for an 11 p.m. bedtime, an early-afternoon cutoff — around 1-2 p.m. — is the sweet spot.

If you are caffeine-sensitive, push it earlier. Some people metabolise caffeine slowly (it is partly genetic), and for them even a late-morning cup affects sleep.

'Caffeine doesn't affect me' — the trap

Plenty of people insist they can drink an espresso after dinner and sleep fine. Here is the catch: they do fall asleep — caffeine tolerance blunts the wired feeling — but studies that actually measure sleep show caffeine still reduces deep sleep and sleep quality even in people who report no trouble falling asleep. You do not feel the damage; you just wake less restored. 'It doesn't affect me' usually means 'I can't feel that it affects me.'

It's not just coffee

Watch the hidden sources when timing your cutoff: tea (including green tea), most sodas, energy drinks, pre-workout supplements, dark chocolate, and some pain relievers all contain caffeine. A late 'harmless' green tea or a pre-workout at 6 p.m. can be the reason you sleep poorly.

How to move your cutoff earlier without misery

The bottom line

Caffeine's five-to-six-hour half-life means your afternoon coffee is still in your system at bedtime, quietly degrading your deep sleep even if you fall asleep fine. Stop caffeine 8-10 hours before bed — for most people, an early-afternoon cutoff — watch the hidden sources, and don't trust 'it doesn't affect me.' It's one of the easiest high-impact changes you can make. (More ways to sleep better; and if you're not sure what's actually wrecking your nights, the free Titan Sleep Score quiz is a two-minute check.)