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.
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.
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.Coffee, tea, energy drinks, cola and more, each with its caffeine amount.
When do you want to be asleep?
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.
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 →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.
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.
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.
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.
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.
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.