Free tool
Caffeine cutoff calculator
Caffeine has a half-life of roughly five hours, so an afternoon coffee is still working at bedtime — even in people who swear it “does nothing” to them. Controlled studies have found measurable sleep disruption from caffeine taken six hours before bed. Pick your bedtime and sensitivity, and get your cutoff time.
Calculator
Think of this as a caffeine sleep calculator: tell it when you plan to sleep, and it works out when your last coffee, tea or energy drink should be.
Why six hours?
Caffeine blocks adenosine, the chemical that builds sleep pressure through the day, and its concentration halves roughly every five hours. A study measuring sleep with wrist sensors found that 400 mg of caffeine (about two strong coffees) taken six hours before bedtime still cut total sleep by more than an hour. Sensitivity varies widely with genetics, age, medicines and how much caffeine you drink daily — hence the adjustable buffer.
The calculator covers timing, not totals: up to about 400 mg a day is generally fine for healthy adults, but if your sleep is broken despite an early cutoff, the answer is usually less caffeine overall — or an evaluation for a sleep disorder. Persistent sleepiness despite adequate sleep belongs with a clinician; the directory lists accredited sleep centers that can help.