This tool provides general information based on average caffeine half-life research. It is not medical advice — individual metabolism varies, especially with pregnancy, liver conditions, or certain medications. Consult a healthcare provider with specific concerns.
How Caffeine Half-Life Works
Caffeine has a half-life of roughly 4-6.5 hours depending on individual sensitivity — half the dose clears every half-life period. A 95mg coffee leaves about 47mg active 5 hours later, 24mg after 10 hours, and so on. This calculator sums the remaining caffeine from everything you've logged, decayed to your bedtime, to estimate how much is still active when you try to sleep.
Why Timing Matters More Than Total Amount
Caffeine in your system at bedtime reduces deep, slow-wave sleep even when it doesn't stop you from falling asleep — so you can fall asleep on schedule and still wake up feeling unrested. For the full strategy on managing caffeine across a night shift, see our caffeine timing guide, and if caffeine dependence itself is the issue, our guide to breaking caffeine addiction on night shift.
Frequently Asked Questions
How long before bed should you stop caffeine?
As a rule, stop caffeine 8 hours before your planned sleep time. This calculator gives you a more precise cutoff based on your own sensitivity and what you've already had.
How long does caffeine stay in your system?
Caffeine has a half-life of roughly 4-6.5 hours depending on individual sensitivity — half the dose is gone after one half-life, a quarter after two, and so on. A typical 95mg coffee can still leave 10-25mg active in your system 8-10 hours later.
Does caffeine affect sleep quality even if I can still fall asleep?
Yes. Caffeine in your system when you fall asleep reduces deep, slow-wave sleep even if it doesn't stop you from falling asleep at all — so you can fall asleep on schedule and still wake up feeling unrested.
How much caffeine is safe on night shift?
There's no universal safe amount — it depends on your sensitivity, body weight, and how close to your sleep window you're consuming it. The FDA cites 400mg/day as a general upper limit for most healthy adults, but timing relative to your sleep window matters more than total daily amount for sleep quality specifically.