When should I stop drinking coffee?

Enter your bedtime and today’s drinks. The calculator estimates how much caffeine may be left at bedtime and shows the cutoff times suggested by sleep research.

Caffeine cutoff calculator

Your drinks today (up to 10)
  1. Drink 1
  2. Drink 2

Amounts are typical figures from the FDA and vary a lot by brand, size and brew [1]. Check the label and edit the milligrams if you know them.

Advanced: caffeine half-life

Default 5 hours, the mean for healthy adults; individual half-lives range from about 1.5 to 9.5 hours [2]. Pregnancy, smoking, some medicines and liver health change it [3].

Clock

About 47 mg of caffeine may still be in your body at

Show the chart as a table

Cutoff times from the research, for an 11:00 PM bedtime

  • : at least 6 hours before bed. Drake et al. found that 400 mg taken 6 hours before bedtime still disrupted sleep and supported avoiding “substantial caffeine use for a minimum of 6 hours prior to bedtime” [4].
  • : 8.8 hours before bed for a coffee. A 2023 meta-analysis concluded that “coffee (107 mg per 250 mL) should be consumed at least 8.8 h prior to bedtime” to avoid losing sleep [5].
  • : 13.2 hours before bed for a pre-workout supplement (217.5 mg), from the same meta-analysis [5].

The milligram figure is a model estimate (half-life 5 h), not a measurement. Research hasn’t set a “safe” amount at bedtime, which is why the guidance is given in hours before bed.

This calculator gives general estimates based on average 90-minute sleep cycles. It isn’t medical advice. If you have ongoing trouble sleeping, loud snoring, or daytime sleepiness, talk to a doctor.

How accurate is this? It’s an estimate from a simple model: each drink halves every half-life. Half-lives vary several-fold between people [2], and caffeine reaches its peak in the blood anywhere from 15 to 120 minutes after you drink it [2]; the model ignores that delay.

Caffeine in common drinks

Typical caffeine content (FDA; amounts vary by brand and size)
DrinkServingTypical caffeine
Brewed coffee (regular, non-specialty)12 fl oz113–247 mg
Black tea12 fl oz71 mg
Green tea12 fl oz37 mg
Caffeinated soft drink12 fl oz23–83 mg
Energy drink12 fl oz41–246 mg
Decaf coffee8 fl oz2–15 mg

These are the FDA’s typical figures [1]. The calculator fills in the low end of each range; edit the milligrams if your drink’s label says otherwise. For most adults, the FDA has cited 400 mg a day as an amount not generally associated with negative effects, while noting wide variation in sensitivity [1].

How the estimate works

Your body clears caffeine gradually, and the speed is described by its half-life: the time it takes to eliminate half of what you consumed. The mean half-life in healthy adults is about 5 hours, with a range of about 1.5 to 9.5 hours [2]. The calculator applies caffeine left = amount × 0.5hours ÷ half-life to each drink and adds them up.

Example: one 113 mg coffee, 5-hour half-life
Hours after drinkingEstimated caffeine left
0113 mg
557 mg
1028 mg
1514 mg

Pregnancy, smoking, some medicines and liver health change the half-life [3]. The Sleep Foundation gives a wider range of 2 to 12 hours [3]. If you are sensitive to caffeine, try a longer half-life in the advanced settings.

What the research says about cutoff times

Two studies give practical, hour-based guidance, and the calculator turns them into clock times for your bedtime:

The same meta-analysis found that caffeine reduced total sleep time by 45 minutes and sleep efficiency by 7%, increased the time to fall asleep by 9 minutes, and reduced deep sleep [5]. CDC lists avoiding caffeine in the afternoon or evening among habits that can improve sleep [6].

Why caffeine keeps you awake

During the day a chemical called adenosine builds up and helps make you feel sleepy. Caffeine counteracts sleepiness by blocking adenosine’s actions [7]. That’s useful in the morning and unhelpful at night.

Decaf and hidden caffeine

Decaffeinated doesn’t mean caffeine-free: decaf coffee typically has 2 to 15 mg in an 8-ounce cup [1]. The FDA also notes caffeine can turn up in energy bars, chewing gum, dietary supplements and some over-the-counter medicines [1]. If you’re pregnant, trying to become pregnant, breastfeeding or taking medication, the FDA recommends talking to your healthcare provider about caffeine [1].

Once you know your cutoff, use the bedtime calculator to plan the rest of the evening.

Related guides

Learn how caffeine fits into the bigger picture of sleep.

Frequently asked questions

How late can I drink coffee?

Research gives two benchmarks: avoid substantial caffeine for at least 6 hours before bed [4], and a 2023 meta-analysis concluded that a coffee (107 mg) should be drunk at least 8.8 hours before bedtime to avoid losing sleep [5].

What is caffeine’s half-life?

The time it takes your body to clear half of it. The mean in healthy adults is about 5 hours, but it can range from 1.5 to 9.5 hours [2]; the Sleep Foundation gives 2 to 12 hours [3].

How much caffeine is in a cup of coffee?

FDA figures for a 12-ounce regular brewed coffee range from 113 to 247 mg [1]. Brand, size and brewing method all change it.

How much caffeine is too much?

For most adults, the FDA has cited 400 mg a day as an amount not generally associated with negative effects, but sensitivity varies widely [1]. If you’re pregnant, breastfeeding or take medication, ask your healthcare provider.

Does decaf have caffeine?

Yes, a little: decaf coffee typically has 2 to 15 mg in an 8-ounce cup [1].

Why does coffee keep me awake?

Adenosine helps make you feel sleepy, and caffeine counteracts sleepiness by blocking its actions [7].

How does caffeine affect sleep?

Across 24 studies, caffeine reduced total sleep time by 45 minutes and sleep efficiency by 7%, and increased the time to fall asleep by 9 minutes [5].

Is the milligram result exact?

No. It’s a model based on an average half-life. Your own half-life could be much shorter or longer, so treat the number as a rough guide and rely on the hour-based guidance.

Are energy drinks worse than coffee?

It depends on the can. FDA figures for energy drinks range from 41 to 246 mg per 12 ounces [1]. The same meta-analysis suggested a pre-workout supplement (217.5 mg) should be taken at least 13.2 hours before bed [5].

Sources

  1. U.S. FDA: Spilling the Beans: How Much Caffeine is Too Much?. August 28, 2024. Accessed October 21, 2026.
  2. Peer-reviewed review (open access): Common questions and misconceptions about caffeine supplementation (Antonio et al., J Int Soc Sports Nutr 2024). 2024. Accessed October 21, 2026.
  3. Sleep Foundation: Caffeine and Sleep. July 16, 2025. Accessed October 21, 2026.
  4. PubMed: Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed (Drake et al., J Clin Sleep Med 2013;9(11):1195–1200). 2013. Accessed October 21, 2026.
  5. PubMed: The effect of caffeine on subsequent sleep: A systematic review and meta-analysis (Gardiner et al., Sleep Med Rev 2023;69:101764). 2023. Accessed October 21, 2026.
  6. CDC: About Sleep. May 15, 2024. Accessed October 21, 2026.
  7. NINDS (NIH): Brain Basics: Understanding Sleep. February 25, 2025. Accessed October 21, 2026.

Last reviewed by the CycleRest team (sources re-checked; no medical reviewer). Editorial policy