T
THINKFORU
Submit Feedback

Caffeine Cut-Off Calculator: Safe Drink Time

Caffeine Cut-Off Calculator: Safe Drink Time

Caffeine & Melatonin Cut-Off Calculator

Save on Google

Find the last time you can drink caffeine without hurting tonight's sleep. Enter your bedtime, your drink or dose in milligrams, and how fast you clear caffeine to get your cut-off deadline, the caffeine left at bedtime and your natural melatonin window. Everything is calculated privately in your browser.

← Want your full bedtime plan? Use our Complete Sleep Calculator & Bedtime Matrix

Target bedtime

Beverage or supplement

Caffeine dose (mg)

How fast do you clear caffeine?

 

Deadline

Safe caffeine cut-off

--
 
Residual

Caffeine left at bedtime

--
 
Melatonin

Natural melatonin onset

--
 
Wind-Down

Screens-down curfew

--
 

The cut-off is the time when the remaining caffeine falls to about 50 mg, using a simple half-life model. Caffeine peaks 30 to 60 minutes after drinking. Keep total daily caffeine under 400 mg for healthy adults.

How Caffeine Works in Your Body

Caffeine is absorbed within 30 to 60 minutes and reaches peak levels in your blood about an hour after you drink it. It blocks adenosine receptors in the brain, so the sleep pressure that builds up all day stops registering. The caffeine does not make you less tired, it only hides the tiredness, which is why the effect ends in a crash and why late doses make it harder to fall asleep.

Half-Life and the Cut-Off Formula

The liver clears caffeine at a steady proportion, so the amount left follows a half-life curve. The average half-life is 5 to 7 hours, which means half the dose is still active after that time. This calculator uses 5 hours for fast metabolizers, 6 hours for average and 7 hours for slow metabolizers. The cut-off is the time at which the remaining caffeine drops to about 50 mg, a level that is unlikely to disturb sleep for most people. The formula is: hours before bed = half-life × log2(dose ÷ 50).

Your personal half-life can be different. Oral contraceptives can roughly double it, pregnancy lengthens it further, and smoking shortens it. If you often lie awake after afternoon coffee, choose slow metabolizer.

Caffeine and the Melatonin Window

Melatonin is the hormone that signals night. Under dim light it starts rising about 2 hours before your usual bedtime. Bright screens suppress it, and caffeine can delay it: one study found that caffeine taken 3 hours before bed delayed the body clock by about 40 minutes. Protecting the window means dimming lights and finishing caffeine before it opens. If you use melatonin supplements, they are usually taken 30 to 60 minutes before bed, and you should talk to a doctor first.

Step-by-Step Examples

200 mg Cold Brew, Bedtime 11:00 PM

Enter 200 mg and 11:00 PM with an average metabolizer. Your cut-off is 11:00 AM, 12 hours before bed, and 200 mg has fallen to 50 mg by then. A fast metabolizer can push this to 1:00 PM, and a slow one needs 9:00 AM.

Double Espresso Before a 10:30 PM Bedtime

Choose the double espresso at 126 mg with an average metabolizer. The cut-off is 2:25 PM, about 8 hours before bed, because 126 mg needs about 1.3 half-lives to fall to 50 mg. Use the tool to see the exact time for your own bedtime.

Energy Drink and a Midnight Bedtime

Choose a 160 mg energy drink, a midnight bedtime and slow metabolizer. The calculator gives a cut-off of 12:15 PM, almost 12 hours before bed. A second can at 6:00 PM would still leave about 90 mg in your system at midnight.

Beverage and Supplement Caffeine vs Required Clearance Hours

Forty common drinks and supplements with typical caffeine content and the hours needed to fall to 50 mg. The last column assumes an 11:00 PM bedtime and an average metabolizer. Caffeine content varies by brand and preparation, so check the label when you can.

Beverage and supplement caffeine content versus required clearance hours (time to fall to 50 mg)
Beverage / SupplementServing SizeCaffeineClearance: Fast (5h)Clearance: Average (6h)Clearance: Slow (7h)Latest Drink for 11 PM Bed (Average)
Espresso, single shot1 oz (30 ml)63 mg1.7 h2.0 h2.3 h8:55 PM
Espresso, double shot2 oz (60 ml)126 mg6.7 h8.0 h9.3 h2:55 PM
Latte or cappuccino (1 shot)12 oz63 mg1.7 h2.0 h2.3 h8:55 PM
Instant coffee8 oz62 mg1.6 h1.9 h2.2 h9:05 PM
Drip coffee8 oz95 mg4.6 h5.6 h6.5 h5:25 PM
Drip coffee12 oz140 mg7.4 h8.9 h10.4 h2:05 PM
Drip coffee16 oz190 mg9.6 h11.6 h13.5 h11:25 AM
Cold brew12 oz155 mg8.2 h9.8 h11.4 h1:10 PM
Cold brew16 oz205 mg10.2 h12.2 h14.2 h10:45 AM
Cold brew20 oz310 mg13.2 h15.8 h18.4 h7:10 AM
Decaf coffee8 oz3 mg0.0 h0.0 h0.0 hAny time before bed
Black tea8 oz47 mg0.0 h0.0 h0.0 hAny time before bed
Oolong tea8 oz38 mg0.0 h0.0 h0.0 hAny time before bed
Green tea8 oz28 mg0.0 h0.0 h0.0 hAny time before bed
White tea8 oz20 mg0.0 h0.0 h0.0 hAny time before bed
Matcha8 oz (about 2 g powder)70 mg2.4 h2.9 h3.4 h8:05 PM
Yerba mate8 oz85 mg3.8 h4.6 h5.4 h6:20 PM
Chai latte12 oz60 mg1.3 h1.6 h1.8 h9:25 PM
Bottled iced tea16 oz40 mg0.0 h0.0 h0.0 hAny time before bed
Kombucha8 oz15 mg0.0 h0.0 h0.0 hAny time before bed
Cola12 oz can34 mg0.0 h0.0 h0.0 hAny time before bed
Diet cola12 oz can46 mg0.0 h0.0 h0.0 hAny time before bed
Dr Pepper12 oz can41 mg0.0 h0.0 h0.0 hAny time before bed
Mountain Dew12 oz can54 mg0.6 h0.7 h0.8 h10:20 PM
Red Bull8.4 oz can80 mg3.4 h4.1 h4.7 h6:55 PM
Red Bull12 oz can114 mg5.9 h7.1 h8.3 h3:50 PM
Monster16 oz can160 mg8.4 h10.1 h11.7 h12:55 PM
Rockstar16 oz can160 mg8.4 h10.1 h11.7 h12:55 PM
Celsius12 oz can200 mg10.0 h12.0 h14.0 h11:00 AM
High-caffeine energy drink16 oz can300 mg12.9 h15.5 h18.1 h7:25 AM
Energy shot2 oz bottle200 mg10.0 h12.0 h14.0 h11:00 AM
Caffeine pill100 mg tablet100 mg5.0 h6.0 h7.0 h5:00 PM
Caffeine pill200 mg tablet200 mg10.0 h12.0 h14.0 h11:00 AM
Pre-workout (moderate)1 scoop200 mg10.0 h12.0 h14.0 h11:00 AM
Pre-workout (high-stimulant)1 scoop300 mg12.9 h15.5 h18.1 h7:25 AM
Headache tablets with caffeine2 tablets130 mg6.9 h8.3 h9.6 h2:40 PM
Caffeine gum1 piece50 mg0.0 h0.0 h0.0 hAny time before bed
Dark chocolate (70-85%)1 oz bar23 mg0.0 h0.0 h0.0 hAny time before bed
Milk chocolate bar1.5 oz10 mg0.0 h0.0 h0.0 hAny time before bed
Hot cocoa8 oz5 mg0.0 h0.0 h0.0 hAny time before bed

Hourly Adenosine Receptor Clearance Timeline

The percentage of caffeine remaining at each hour after you drink it for each metabolizer type, plus the milligrams left from a 200 mg dose.

Hourly adenosine receptor clearance timeline (percent of caffeine remaining)
Time After DrinkingRemaining: Fast (5h)Remaining: Average (6h)Remaining: Slow (7h)From a 200 mg Dose (Average)Adenosine Receptor EffectSleep Impact
1 h87%89%91%178 mgPeak blood levels; receptors strongly blockedAlertness at its highest
2 h76%79%82%159 mgStrong block continuesStill far too soon for any bedtime
4 h57%63%67%126 mgModerate to strong blockFalling asleep is still likely to be delayed
6 h44%50%55%100 mgModerate block; roughly half remainsDrake et al. (2013): 400 mg taken 6 h before bed cut sleep by over an hour
8 h33%40%45%79 mgMild to moderate blockLighter, less deep sleep is still possible
10 h25%31%37%63 mgMild blockSmall effect for most people with a normal serving
12 h19%25%30%50 mgLow residual blockUsually fine after a single standard serving
16 h11%16%21%31 mgTrace amountsNo meaningful effect on tonight's sleep
24 h4%6%9%13 mgMostly clearedCleared before the next day's first dose

Melatonin Suppression Risk by Screen Light and Evening Stimulants

Risk levels are approximate and depend on brightness, distance and how long you are exposed. Use them as a guide for your evening routine.

Melatonin suppression risk by screen light and evening stimulants (approximate)
Evening ExposureTypical IntensityMelatonin Suppression RiskApproximate EffectCurfew Before BedMitigation
Bright overhead room lightOver 200 luxHighClear suppression and later melatonin onset2 hours before bedSwitch to warm lamps under 30 lux
Phone or tablet at full brightnessBlue-rich, held close to the eyesHighSuppresses melatonin and delays sleep onset2 hours before bedLower brightness, hold it farther away, use night mode
Backlit e-reader or tablet readingBlue-rich, sustained useHighChang et al. (2015): melatonin onset delayed by roughly 1.5 h1–2 hours before bedRead a paper book or use an e-ink reader
Laptop or TVModerate brightness, farther awayModerateSmaller delay that grows with brightness and time1 hour before bedTurn on night mode and dim the room
Night mode and low brightnessWarm, dimmed screenLow to moderateReduces but does not remove the effect30–60 minutes before bedPair with room lights turned down
Dim warm lampsUnder 30 luxLowLittle effect on melatoninFine up to bedtimeUse amber bulbs in bedroom and bathroom
Blue-blocking glassesAmber lensesLowCan limit the blue-light effect of screensWear 2 hours before bedCombine with dimmer screens
Caffeine within 6 hoursOver 50 mg remainingModerateBurke et al. (2015): caffeine 3 h before bed delayed the body clock by about 40 minUse your cut-off timeStop caffeine at the calculated deadline
Caffeine plus bright screensBoth stimulants togetherHighEffects stack: later onset and lighter sleepCut-off time and 2 hours of dim lightDrop both in the evening
NicotineStimulant, shorter half-lifeModerateRaises arousal and fragments sleepAt least 2 hours before bedAvoid late-evening use

Frequently Asked Questions

People also ask: caffeine and sleep FAQ
QuestionAnswer
How many hours before bed should I stop drinking caffeine?For a typical cup of coffee, stop about 6 hours before bed. Larger doses need more time: a 200 mg drink needs about 12 hours with an average 6-hour half-life. A lab study found that even 400 mg taken 6 hours before bed cut sleep by over an hour.
How long does caffeine stay in your system?Caffeine has an average half-life of 5 to 7 hours, so half the dose is still in your body after that time. After about 10 to 12 hours a single cup is mostly cleared, but genetics, pregnancy, oral contraceptives and smoking can speed it up or slow it down.
Does caffeine affect melatonin?Yes. Caffeine blocks adenosine and can delay your body clock: one study found caffeine taken 3 hours before bed delayed melatonin onset by about 40 minutes. Natural melatonin starts rising about 2 hours before sleep, so stopping caffeine and dimming lights before then protects it.
Does decaf coffee have caffeine?Yes, a small amount. An 8 oz cup of decaf usually has about 2 to 7 mg, which is far below the 50 mg threshold used here, so it is fine for most people in the evening.
Can I take melatonin and caffeine on the same day?Generally yes, as long as the caffeine ends by your cut-off time. Melatonin supplements are usually taken around 30 to 60 minutes before bed, so caffeine in the afternoon will not overlap. Speak to a doctor or pharmacist before taking melatonin regularly.

Medical disclaimer: This calculator is an educational tool and not medical advice. Caffeine is not suitable for everyone, including people who are pregnant, have heart rhythm problems, anxiety or high blood pressure, so ask a doctor first. If you cannot sleep despite stopping caffeine early, speak to a doctor about insomnia or another sleep disorder.