By Zencalcy Editorial TeamLast reviewed About us
Caffeine takes ~30 minutes to kick in and clears with a ~5–6 hour half-life. Use this to plan your coffee timing after sleep debt or a night shift so you're awake when you need to be.
When and how much caffeine you need to stay alert.
optimal time = max(0, 8 − sleepLost) hours from now · optimal mg = min(400, 100 × (8 − sleepLost) / 2)
| Symbol | Meaning |
|---|---|
| sleepLost | Hours of sleep you're short (0 if none) |
| shiftStart | Shift start if working night shift |
Slept 4 hours → 4 hours from now take 200 mg. Night shift starting in 6 hours → take 200 mg at shift start plus 200 mg 4 hours into shift.
Continue with the Coffee Calculator, Coffee Footprint Calculator, or the Coffee Ratio Calculator — or browse more coffee & tea tools and all cooking calculators.
Half-life ~5–6 hours; quarter-life ~10–12 hours. Still ~25% in your system after 10 hours.
Calculate dough hydration percentage for baking
Free calculator · No signup
Free calculator · No signup
Free calculator · No signup
Free calculator · No signup
Free calculator · No signup
Content updated: September 2026