Wondering if that afternoon coffee is why you can’t fall asleep? Tap a drink button to add it, then set the time you had it. Change the milligrams if your cup is bigger or you know the exact amount from the label. Enter your bedtime and you’ll see roughly how much caffeine is still in your body when you lie down, what time it falls below your sleep target, and the latest time you could have one regular cup of coffee. Most adults clear half of their caffeine in about 5 hours, but you can choose a faster or slower rate.

–
Estimate only, not medical advice. Pregnancy, some medications, smoking and liver health can change how fast caffeine leaves your body a lot.

How it works: caffeine left = amount × 0.5^(hours since the drink ÷ half-life), added up for every drink. The typical adult half-life is about 5 hours (it varies from roughly 2 to 10 hours between people), and the calculator treats each drink as fully absorbed when you have it. Drink amounts are average values; check the label for energy drinks and coffee shop sizes. Drinks timed later than your bedtime are counted as the day before.