Caffeine & Sleep Calculator
Sleep deeply.
Wake up fully alive.
A clear head. Energy for what matters. More of you for the people you love.
See what your coffee leaves behind at bedtime. Compare a change to your timing, then take your personal report and seven-night tracker into tomorrow.
Check my coffee timingCoffee, tea, energy drinks and more.
Personal report + tracker, free by email.

Your coffee, made clear
What will your coffee
leave behind tonight?
Start with your drinks and bedtime. Then see what a change could look like.
Your evening, at a glance
Your result will appear here.
Enter your drinks and bedtime, then choose “Show my result”.
Worked example · change the entries to see your own estimate
estimated caffeine remaining
at your chosen bedtime
An estimate based on your entries. Your body may clear caffeine differently.
See what an earlier coffee changes.
Try moving your 2pm filter coffee:
Choose another change
Only an applied change is included in your report. You can request your original result at any time.
See the full calculation

Take the insight into your life
Make your next
seven nights count.
Get the report built from your drinks and bedtime, plus a tracker to connect your coffee, sleep and morning energy.
- Your caffeine curve and bedtime estimate.
- The timing change you explored, if you chose one.
- A seven-night sheet for coffee, sleep and morning alertness.
Your report request
Why timing matters
Your afternoon coffee
can reach into your night.
You may have finished your coffee hours ago while some of its caffeine remains. The amount and the timing both matter. This calculator makes that relationship visible, so you can choose a change and observe your nights.
A review of 24 studies found that caffeine reduced total sleep by 45 minutes on average. That pooled result is not a prediction for your night. Gardiner et al., 2023. A later trial further examined dose and timing: Gardiner et al., 2025.
Understand your numbers
Your questions,
clearly answered.
When should I stop drinking coffee before bed?
The answer depends on how much caffeine you have, when you have it, your bedtime and how quickly your body clears it. Use the calculator to compare your actual routine with an earlier drink. There is no single cutoff that guarantees good sleep for everyone.
How long does caffeine stay in my system?
This calculator starts with a five-hour half-life: in that model, half of an amount remains after five hours and a quarter after ten. Your own clearance can differ. Open “Adjust the estimate” to see how the assumption changes the result.
Can coffee affect sleep even if I fall asleep easily?
Falling asleep is only one part of sleep. The 2025 trial measured sleep timing, fragmentation and architecture, and found differences between some objective effects and what participants perceived. Its findings depended on dose and timing. Read the study.
Do tea, energy drinks and pre-workout count?
Yes. Choose the actual source in the calculator and adjust its amount if you have a product label. Serving size, brand and preparation can change the caffeine amount.
Does this tell me exactly how well I will sleep?
It estimates caffeine remaining from the entries and assumption you choose. It does not measure your metabolism or predict sleep quality. The tracker helps you record what you actually experience over seven nights.
Caffeine amounts: check your drink
These are starting estimates. The amount varies with serving size, brand and preparation. Use a product label or a known amount when available.
| Source | Serving | Starting estimate |
|---|---|---|
| Espresso, 1 shot | Single shot | 75mg |
| Double espresso | Two shots | 150mg |
| Filter / drip coffee | 8 oz / 237 ml | 115mg |
| Large brewed coffee | 16 oz | 260mg |
| Cold brew | 16 oz | 205mg |
| Instant coffee | Standard cup | 65mg |
| Decaf coffee | 8 oz | 5mg |
| Black tea | 8 oz | 48mg |
| Earl Grey | 8 oz | 48mg |
| Green tea | 8 oz | 29mg |
| Matcha | 1 prepared serving | 50mg |
| Yerba mate | 1 serving | 80mg |
| Cola, 12 oz | 12 oz can | 34mg |
| Diet cola, 12 oz | 12 oz can | 46mg |
| Pepsi, 12 oz | 12 oz can | 38mg |
| Energy drink, 8 oz | 8 oz | 80mg |
| Energy drink, 16 oz | 16 oz | 160mg |
| Energy shot, 2 oz | 2 oz | 200mg |
| Pre-workout, estimate | 1 serving | 175mg |
| Dark chocolate, 1 oz | 1 oz / 28 g | 20mg |
| Cocoa drink | 8 oz | 6mg |
| Kombucha | 1 bottle | 15mg |
| Caffeine tablet | 1 tablet | 200mg |
Check your serving and product before using the estimate. Change the amount in the calculator when you have a label or a known dose.
How this caffeine cutoff calculator works
For each drink, the model multiplies its caffeine amount by 0.5 raised to the power of elapsed hours divided by the selected half-life. It adds the amounts remaining from each drink at bedtime.
Times are interpreted within the 24 hours ending at bedtime. An entered clock time later than bedtime belongs to the previous day in this model. Drink quantities are estimates unless you supply a known amount.
A comparison changes only the selected drink’s time or caffeine amount. It does not turn a lower caffeine estimate into a guaranteed sleep improvement. The detailed cutoff calculation concerns the largest dose and your chosen reference target; it is not a universal safe-coffee time.
Reviewed: 8 October 2026. 2023 review · 2025 trial.
- Gardiner, C., Weakley, J., Burke, L.M. et al. (2023). The effect of caffeine on subsequent sleep: A systematic review and meta-analysis. Sleep Medicine Reviews, 69, 101764. doi:10.1016/j.smrv.2023.101764.
- Gardiner, C.L. et al. (2025). Dose and timing effects of caffeine on subsequent sleep: a randomized clinical crossover trial. Sleep, 48(4), zsae230. doi:10.1093/sleep/zsae230. The trial involved 23 men and tested specific doses and times.
