Free calculator · 2026

Caffeine cutoff calculator

A 95 mg cup of brewed coffee, on the 5-hour average half-life, needs to be about 7.8 hours before bed to leave 32 mg. For an 11 pm bedtime that is 3:09 pm. Log what you already had, pick the next drink, and the calculator names the last call.

When should you stop caffeine tonight?

Runs in your browser. What you type is not sent to us or stored, and there is no sign-up. A share link carries your numbers in the link itself.

How long does caffeine last?

Caffeine fades by half every few hours. That time is the half-life. The Institute of Medicine puts the average at about 5 hours in healthy adults, and the range between people at about 1.5 to 9.5 hours. Oral contraceptives can roughly double it.

Caffeine left after t hours = dose × 0.5(t / half-life). This model does not add an absorption delay. The whole serving is treated as present at the time you log.

Here is a 95 mg brewed coffee on the 5-hour average.

Hours after a brewed coffeeCaffeine left
095 mg
548 mg
1024 mg
1512 mg

Gardiner et al. 2023 pooled 24 studies. Caffeine cut total sleep time by 45 minutes and sleep efficiency by 7%. Time to fall asleep rose 9 minutes. Time awake after falling asleep rose 12 minutes.

When should you stop caffeine before bed?

Gardiner 2023 says a 107 mg coffee should be at least 8.8 hours before bed, and a 217.5 mg pre-workout at least 13.2 hours, to avoid losing total sleep time. On the 5-hour average half-life, those leftover amounts are about 32 mg and 35 mg. We calculated those leftovers. The calculator uses 32 mg, the coffee figure, for every drink. It is an average, not personal advice.

Drake 2013 gave 400 mg at bedtime, 3 hours before, or 6 hours before. Even the 6-hour dose cut measured sleep by more than an hour. The authors support avoiding substantial caffeine for a minimum of 6 hours before bedtime.

Times below are for an 11:00 PM bedtime and 32 mg left at bed. Faster, average, and slower are 3, 5, and 8 hour half-lives. Drinks at or under 32 mg are fine up to bedtime on this model.

DrinkFaster (3 h)Average (5 h)Slower (8 h)
Brewed coffee (95 mg)4.7 h · 6:17 PM7.8 h · 3:09 PM12.6 h · 10:26 AM
Espresso (64 mg)3 h · 8:00 PM5 h · 6:00 PM8 h · 3:00 PM
Black tea (47 mg)1.7 h · 9:20 PM2.8 h · 8:14 PM4.4 h · 6:34 PM
Green tea (28 mg)Fine up to bedtimeFine up to bedtimeFine up to bedtime
Cola (33 mg)0.1 h · 10:52 PM0.2 h · 10:47 PM0.4 h · 10:39 PM
Energy drink (75 mg)3.7 h · 7:19 PM6.1 h · 4:51 PM9.8 h · 1:10 PM
Dark chocolate, 70–85% cacao (23 mg)Fine up to bedtimeFine up to bedtimeFine up to bedtime
Milk chocolate (9 mg)Fine up to bedtimeFine up to bedtimeFine up to bedtime
Pre-workout, one standard serve (217.5 mg)8.3 h · 2:42 PM13.8 h · 9:11 AM22.1 h · 12:53 AM

How much caffeine is in coffee, tea, and chocolate?

Values are USDA FoodData Central, caffeine per 100 g scaled to the serving, read December 1, 2026. Pre-workout is the 217.5 mg standard serve in Gardiner 2023. Decaf is left out. Brands vary. Read the can.

DrinkServingCaffeineSource
Brewed coffee8 fl oz cup95 mgUSDA FDC 171890
Espresso1 fl oz shot64 mgUSDA FDC 171891
Black tea8 fl oz cup47 mgUSDA FDC 173227
Green tea8 fl oz cup28 mgUSDA FDC 171917
Cola12 fl oz can33 mgUSDA FDC 174852
Energy drink8.4 fl oz can75 mgUSDA FDC 173210
Dark chocolate, 70–85% cacao1 oz23 mgUSDA FDC 170273
Milk chocolate1.55 oz bar9 mgUSDA FDC 167587
Pre-workout, one standard serve—217.5 mgGardiner 2023

The FDA cites 400 mg a day as an amount not generally linked to negative effects for most adults. People vary widely in sensitivity and in how fast they clear caffeine. That daily line is not a sleep line. A single coffee too close to bed can cost sleep at well under 400 mg.

Why is your own cutoff different?

A calculator like this has to pick one half-life and one bedtime leftover for everyone. The Institute of Medicine range is about 1.5 to 9.5 hours between people, so the last call on this page can miss yours by hours.

NutriCam on iPhone lets you log the coffee, the tea, even the chocolate, by photo or by saying what you had. It counts the caffeine down by half-life. With Apple Health sleep connected, it shows the most caffeine you can have at bedtime for good sleep, how much each 10 mg of caffeine changes your sleep quality, and your best caffeine cutoff time, from your own nights. It does not diagnose sleep disorders.

More on the job: the best caffeine tracker app for sleep, and does caffeine affect your sleep even if you fall asleep fine.

FAQ

How long does caffeine stay in your system?

The average half-life in healthy adults is about 5 hours, so half of a 2 pm coffee is still there at 7 pm and a quarter at midnight. The range between people is about 1.5 to 9.5 hours, and oral contraceptives can roughly double it.

What time should I stop drinking coffee?

Gardiner 2023 says a 107 mg coffee should be at least 8.8 hours before bed to avoid losing total sleep time. For an 11 pm bedtime that is about 2:12 pm. This calculator uses a 95 mg USDA cup and a 32 mg leftover, which for an 11 pm bedtime is about 3:09 pm on the average half-life. Slow clearers need earlier.

Does tea or chocolate count?

Yes. An 8 fl oz black tea is 47 mg, green tea is 28 mg, a 1 oz square of 70–85% dark chocolate is 23 mg, and a 1.55 oz milk chocolate bar is 9 mg, per USDA. Hidden caffeine in iced tea, cola, and chocolate adds up with the coffee you remember.

What is a caffeine half-life?

It is how long your body takes to clear half of a dose. The Institute of Medicine puts the average at about 5 hours in healthy adults. This calculator treats leftover caffeine as dose × 0.5^(hours / half-life), with no absorption delay.

Why 32 mg?

Gardiner 2023 published two cutoffs, not a leftover milligram target. A 107 mg coffee 8.8 hours before bed, and a 217.5 mg pre-workout 13.2 hours before bed, on a 5-hour half-life, leave about 32 mg and 35 mg. We calculated those leftovers. The calculator uses 32 mg, the coffee figure. It is an average, not personal advice.

Is this caffeine calculator medical advice?

No. It is an estimate from average half-lives and typical servings, not medical advice or a sleep test. It does not diagnose sleep disorders. Ask a clinician if you have a sleep problem. It runs in your browser, and what you type is not sent to us.

Sources

The 32 mg bedtime leftover is our calculation from Gardiner 2023's published cutoffs, using a 5-hour average half-life. Drink values are USDA FoodData Central, per 100 g scaled to the serving shown, read December 1, 2026, except pre-workout, which is the Gardiner 2023 standard serve. Brands vary. Read the label on yours.

This is an estimate from average half-lives, not medical advice.