CaffeineTime

When should you drink coffee?

Sources checked claim by claim by an AI review. Approved for publishing by Oleksii Y. on 2026-10-19.

Pick a drink and your bedtime to estimate the latest time to have it, for fast, average and slow metabolism.

Caffeine cutoff calculator

Latest time to have it, by metabolism

Fast
7:28 PM
3.5 h before bed
Average
5:37 PM
5.4 h before bed
Slow
2:51 PM
8.2 h before bed

Studies at their own doses (these are not the dose above)

  • Gardiner et al. 2025 (randomized trial): In 23 healthy young men, 100 mg taken 12, 8 or 4 hours before bed had no significant effect on measured or self-rated sleep.
  • Gardiner et al. 2023 (meta-analysis): To avoid losing sleep time, the authors suggest a coffee (107 mg per 250 ml) at least 8.8 hours before bed.
How this is estimated

Our model assumes caffeine peaks 45 minutes after you drink it, then halves every 3 h (fast), 5 h (average) or 8 h (slow), and aims for 50 mg or less at bedtime. These numbers are modelling choices, not published limits; studies report peaks from about 30 minutes to 2 hours.

More than one drink a day? Plan them with the timing calculator →

No account. No install. Your inputs stay in your browser.

The drink amounts are typical servings, rounded to whole mg, except the pre-workout serving, which is the 217.5 mg used by Gardiner et al. 2023. Each drink's data page shows where its number comes from: Espresso (1 shot), Brewed Coffee (8oz), Cold Brew (Starbucks Tall, 12oz), Energy Drink (250ml can), Black Tea (8oz), Green Tea (1 cup), Matcha Latte (Starbucks Grande), Cola (12oz can), Pre-Workout (1 serving) (Gardiner et al. 2023), Dark Chocolate (1oz).

By drinkThe latest time to drink 30 popular drinks before bed →Red Bull, Celsius, Starbucks, Diet Coke and more, with sourced caffeine figures and a fast-to-slow metabolism range.

How it works

  1. 1. Pick your drink

    Coffee, tea, energy drinks, cola and more, each with its caffeine amount.

  2. 2. Enter your bedtime

    When do you want to be asleep?

  3. 3. See the latest time

    For fast, average and slow metabolism, unless the drink is already under the 50 mg the tool aims for at bedtime. For most drinks it also shows what studies found near that dose.

Planning several drinks?

The timing calculator places each drink before the hours you need to be alert and adds up how much caffeine is left at bedtime, from fast to slow metabolism.

Open the timing calculator →

What the studies found

Dose matters

Gardiner et al. 2025 — randomized trial

In 23 healthy young men, 100 mg taken 12, 8 or 4 hours before bed had no significant effect on sleep. 400 mg reduced deep sleep even when taken 12 hours before bed.

You can feel fine but sleep less

Drake et al. 2013 — J Clin Sleep Med

In 12 people, 400 mg taken 6 hours before bed cut sleep measured by a monitor by more than an hour; the loss in their own sleep diaries was smaller and not statistically clear.

Half-life varies a lot

EFSA; Blanchard & Sawers 1983a

About 4 hours on average in healthy adults, from about 2 to 8 hours (EFSA); one study measured 2.3 to 9.9 hours. That is why the tools show a range.

Caffeine costs sleep on average

Gardiner et al. 2023 — meta-analysis

Across studies, caffeine cut total sleep by about 45 minutes and made falling asleep take about 9 minutes longer.

Explore

General information, not medical advice

  • This tool provides educational estimates only.
  • Caffeine's half-life averages about 4 hours in healthy adults and ranges from about 2 to 8 hours (EFSA). Your actual clearance may differ.
  • This tool does not diagnose sleep disorders or caffeine sensitivity.

If you feel unwell after caffeine — for example chest pain, a fast or irregular heartbeat that does not settle, fainting, confusion or trouble breathing — get urgent medical help. If you are pregnant or breastfeeding, under 18, take medication, or have a heart, liver or anxiety condition, high blood pressure or a sleep disorder, ask a doctor or pharmacist what amount is right for you.

Sources

  1. Gardiner CL, Weakley J, Burke LM, 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 ↗
  2. Drake C, Roehrs T, Shambroom J, Roth T. (2013). Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed. Journal of Clinical Sleep Medicine, 9(11), 1195–1200. PMID 24235903 ↗
  3. European Food Safety Authority (2015). EFSA explains risk assessment: Caffeine. European Food Safety Authority. efsa.europa.eu (PDF) ↗
  4. Blanchard J, Sawers SJ. (1983). Comparative pharmacokinetics of caffeine in young and elderly men. Journal of Pharmacokinetics and Biopharmaceutics, 11(2), 109–126. PMID 6886969 ↗
  5. Gardiner C, Weakley J, Burke LM, 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 ↗
  6. Blanchard J, Sawers SJ. (1983). The absolute bioavailability of caffeine in man. European Journal of Clinical Pharmacology, 24(1), 93–98. PMID 6832208 ↗
  7. Temple JL, Bernard C, Lipshultz SE, et al. (2017). The Safety of Ingested Caffeine: A Comprehensive Review. Frontiers in Psychiatry, 8, 80. PMID 28603504 ↗
  8. European Food Safety Authority. Caffeine | EFSA. EFSA topic page (summary of the 2015 Scientific Opinion on the safety of caffeine). efsa.europa.eu ↗

An app for better sleep is on the way

We’re working on a mobile app to help you sleep better. It isn’t out yet. Leave your email and we’ll let you know when it launches.