Caffeine cutoff calculator

Enter your drinks and your bedtime. The calculator shows how much caffeine is in your body at bedtime. It also shows the latest hour to start a coffee.

Your day

Drinks today

At 23:00 you are 21 mg under the threshold.

Caffeine at bedtime20 mgPeak today 81 mg · 125 mg listed
Sleep threshold41 mgWhere measurable effects during sleep start, scaled to your weight.
Last coffee11:22Latest start for one 95 mg coffee.
0255075100Sleep threshold 40.7 mgBed 23:0020 mg06:0009:0012:0015:0018:0021:0000:00mg of caffeine in the body

The brown line is caffeine in your body. The dashed green line is the sleep threshold. The blue line is bedtime. The small ticks on the bottom axis are the drinks you listed.

How caffeine half-life works

Your body removes caffeine at a steady percentage rate, not at a steady number of milligrams. One half-life is the time your body needs to remove half of the caffeine in it. For most adults that is about five hours. Try one 95 mg coffee at 15:00 in the model above. It peaks near 74 mg at about 16:50. It is still around 53 mg at 20:00, 26 mg at 01:00, and 13 mg at 06:00. What is left at bedtime comes from that tail.

Absorption matters too. Caffeine does not enter your blood all at once. The level climbs for the first hour or two after you drink. The calculator models the climb and the decline with the same equation the app uses. A drink from 40 minutes ago counts for less than the same drink from two hours ago.

Caffeine clearance varies by person

Half-life is not the same for everybody. Clearance depends mostly on the liver enzyme CYP1A2. Measured half-lives in healthy adults span roughly two to ten hours. Smoking makes clearance faster. Oral contraceptives, pregnancy and some medicines make it slower.2 Two people can drink the same flat white at the same hour and hold very different amounts at midnight. That is why the calculator asks how fast you clear caffeine. It does not assume five hours for everyone.

Caffeine also matters later in the day than most people think. In a controlled trial, 400 mg of caffeine taken six hours before bed still cut total sleep time by a measurable amount.1 Self-reports miss the loss: most participants in the study did not notice it. The disruption shows in the sleep recording first.

How the threshold and cutoff are calculated

The sleep threshold is a plasma concentration of 0.83 µg of caffeine per mL. At that level, measurable effects on heart rate and heart rate variability during sleep begin.3 The calculator converts that concentration to milligrams in your whole body. It uses a volume of distribution of 0.7 litres per kilogram. That is why body weight is one of the inputs. A 60 kg person crosses the threshold at about 35 mg. A 90 kg person crosses it at about 52 mg.

The last coffee figure is a search, not a formula. The calculator tests a 95 mg coffee at every time of day, on top of the drinks you listed. It returns the latest start time that keeps you under the threshold at bedtime. If the answer is "none left today", one more coffee cannot clear in time. A smaller drink still might.

The caffeine values in the drink list are the app's defaults for one standard serving. A real cup varies with preparation. Treat every figure here as a good estimate, not a measurement.

In the app

The WaterChamp app runs the same curve on your phone from the drinks you log. It warns you before your last chance for coffee passes. It also tracks water, alcohol and calories from 62 pickable drinks. It writes your water intake to Apple Health and Health Connect.

Not medical advice. This is a general model, not a measurement of you. Half-life estimates vary widely between people and change with pregnancy, liver conditions, smoking and medicines. Talk to a doctor about caffeine if you are pregnant, taking medication, or having ongoing trouble sleeping.

1. Drake C, Roehrs T, Shambroom J, Roth T. "Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed." Journal of Clinical Sleep Medicine, 2013;9(11):1195-1200. pubmed.ncbi.nlm.nih.gov/24235903

2. Nehlig A. "Interindividual differences in caffeine metabolism and factors driving caffeine consumption." Pharmacological Reviews, 2018;70(2):384-411. pubmed.ncbi.nlm.nih.gov/29514871

3. Baur DM, Dornbierer DA, Landolt HP. "Concentration-effect relationships of plasma caffeine on EEG delta power and cardiac autonomic activity during human sleep." Journal of Sleep Research, 2024;33:e14140. pubmed.ncbi.nlm.nih.gov/38221756

Hydration figures elsewhere on this site come from the Beverage Hydration Index: Maughan RJ, Watson P, Cordery PA, et al. "A randomized trial to assess the potential of different beverages to affect hydration status." American Journal of Clinical Nutrition, 2016;103(3):717-723. pubmed.ncbi.nlm.nih.gov/26702122

The WaterChamp mascot drinking boba tea

WaterChamp for iPhone & Android

A water, caffeine and alcohol tracker. It counts 62 drinks toward your daily goal, shows a live hydration level, and tells you your last chance for coffee.

Download on the App Store Get it on Google Play