Caffeine cutoff calculator
This calculator needs JavaScript. The quick-reference table below works without it, and the formula is just above it.
How it works
Your body clears caffeine at a steady rate: every half-life, half of what's left is gone. For most adults that's about 5 hours, but it ranges from roughly 2 to 10. Pregnancy and some medicines slow it a lot. The calculator works out how many hours your drink needs to fall to the amount you're happy to have left at bedtime, and counts back from your bedtime.
In one study, people took 400 mg (about four cups) at bedtime, 3 hours before or 6 hours before. Even 6 hours before cost more than an hour of sleep. So if a cutoff looks early, it probably isn't.
hours needed = half-life × log₂(dose ÷ amount left at bedtime)
last coffee = bedtime − hours needed
example: 95 mg down to 25 mg at a 5-hour half-life = 5 × log₂(3.8) ≈ 9.6 hours
Quick reference
| Bedtime | Espresso (63 mg) | Coffee (95 mg) | 2 coffees (190 mg) |
|---|---|---|---|
| 9:00 PM | 2:20 PM | 11:22 AM | 6:22 AM |
| 9:30 PM | 2:50 PM | 11:52 AM | 6:52 AM |
| 10:00 PM | 3:20 PM | 12:22 PM | 7:22 AM |
| 10:30 PM | 3:50 PM | 12:52 PM | 7:52 AM |
| 11:00 PM | 4:20 PM | 1:22 PM | 8:22 AM |
| 11:30 PM | 4:50 PM | 1:52 PM | 8:52 AM |
| 12:00 AM | 5:20 PM | 2:22 PM | 9:22 AM |
How Auralo does this
Auralo puts a caffeine cutoff in your plan each day, from your setting, and moves it an hour earlier when you're short on sleep or sleep is your goal. It counts as done unless you tag a late coffee. Log caffeine in Auralo or any app that writes to Apple Health, and Auralo shows how your caffeine days line up with your sleep score. Don't drink coffee? Turn the item off.
Questions
What is caffeine's half-life?
About 5 hours for most adults, with a range of roughly 2 to 10. Smoking speeds it up; pregnancy, oral contraceptives and some medicines slow it down.
Is decaf OK in the evening?
Mostly. A cup of decaf has a few milligrams, well under any cutoff here.
I fall asleep fine after an espresso. Does it matter?
Caffeine can make sleep lighter and shorter even when falling asleep feels easy. Try two weeks with an earlier cutoff and compare.
Is this medical advice?
No. It's wellness information. If you're pregnant or take medication, ask your doctor about caffeine.
Sources
- Drake C et al. Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed. J Clin Sleep Med 2013;9(11):1195–1200.
- Institute of Medicine. Caffeine for the Sustainment of Mental Task Performance. National Academies Press, 2001 (pharmacology: half-life about 2.5 to 10 hours).
- USDA FoodData Central: caffeine in brewed coffee, espresso and black tea.
Wellness information, not medical advice. If you have a health condition, follow your clinician's guidance.