July 22, 2026

Caffeine and Sleep: The Half-Life Maths That Explains Your 3am

Before assuming you have insomnia — and long before considering tablets — it’s worth auditing the most widely used psychoactive drug in the world: caffeine. The numbers surprise almost everyone.

The half-life maths

Caffeine’s half-life is roughly 5–6 hours in a typical adult: the time for half of it to leave your system. Work it through for a 200mg mid-afternoon coffee at 4pm: ~100mg still active at 9–10pm, and ~50mg — a quarter of the original dose, about half a cup’s worth — still circulating at 2–3am. You may fall asleep regardless, but caffeine measurably reduces deep slow-wave sleep even when it doesn’t keep you awake — which is why you can sleep “enough” hours and still wake unrefreshed.

Half-life varies enormously between people

  • Genetics: variants in the CYP1A2 liver enzyme make some people fast metabolisers and others slow — the friend who drinks espresso at 9pm and sleeps fine isn’t tougher than you, just genetically different;
  • The contraceptive pill and pregnancy significantly slow caffeine clearance — half-life can double or more in pregnancy;
  • Some medicines (including certain antibiotics such as ciprofloxacin) slow it dramatically;
  • Smoking speeds it up — which is why people who quit smoking suddenly find their usual coffee intake overwhelming.

The hidden caffeine audit

Rough typical figures: brewed coffee 90–140mg per mug; espresso-based drinks 60–130mg; tea 40–75mg; green tea 30–50mg; cola ~35mg; energy drinks 80–160mg per can; dark chocolate up to ~25mg per 50g; and — the one people miss — some pain relief tablets contain 60–130mg per dose. Check labels on “extra” or “plus” painkiller formulations, especially any taken in the evening. Decaf isn’t zero either (~5–10mg a cup), though it’s rarely the problem.

A realistic cut-off strategy

  • Set your caffeine curfew at 8–10 hours before bed — for an 11pm bedtime, that’s no caffeine after about 1–3pm;
  • Front-load: enjoy coffee in the morning, switch to decaf, herbal tea or water after the curfew;
  • Cut down gradually if you’re a heavy user — abrupt withdrawal causes headaches and irritability for a few days;
  • Beware the vicious circle: bad night → extra caffeine → worse night. Breaking it for two weeks is one of the cheapest sleep experiments available, and pairs well with the habits in alternatives to zopiclone.

If sleep remains poor after a genuine two-week caffeine audit, something else is going on — see why can’t I sleep? for the other usual suspects.

Frequently asked questions

What time should I stop drinking caffeine?

A good rule is 8–10 hours before bedtime — for an 11pm bedtime, stop by early afternoon. Slow metabolisers, pill users and pregnant women may need an even earlier cut-off.

Does caffeine affect sleep even if I fall asleep fine?

Yes — caffeine reduces deep slow-wave sleep even when it doesn’t delay falling asleep, which is why you can sleep a full night after evening coffee and still wake unrefreshed.

Which painkillers contain caffeine?

Many “extra” or “plus” formulations of paracetamol, aspirin and ibuprofen combine the painkiller with 60–130mg of caffeine per dose — check the label before taking them in the evening, or ask a pharmacist for a caffeine-free alternative.

Why can my partner drink coffee at night and sleep fine?

Genetics — variants in the CYP1A2 enzyme make some people clear caffeine two to three times faster than others. Their tolerance tells you nothing about yours.

Questions about your sleep or your medicines? Speak to one of our pharmacists — advice is free and confidential. If you already have a prescription, you can nominate our pharmacy to dispense and deliver it.


This article is general health information based on NHS and BNF guidance. It is not medical advice, and it is not an advertisement for any medicine. Always follow your prescriber’s instructions and read the patient information leaflet. If you need urgent help call NHS 111; in an emergency call 999. [Clinical review placeholder — reviewed by NAME, Superintendent Pharmacist, GPhC reg. NUMBER, on DATE.]

This article is general health information, not medical advice. Always speak to a pharmacist, GP or NHS 111 about your own circumstances. [Clinical review placeholder — reviewed by NAME, GPhC reg. NUMBER, on DATE.]