Caffeine Cut-Off Calculator

See how much caffeine from your last drink will still be in your system at bedtime and the latest time you should stop for a good night's sleep.

mg

Calculated in your browser. Nothing you enter is stored or sent anywhere.

How to use this calculator

  1. Enter your details. Fill in the time of your last caffeinated drink, what it was (or a custom amount in mg) and your bedtime. Fields marked optional can be left empty.
  2. Calculate. Press "Check my caffeine". The result appears under the form straight away.
  3. Read your result. Check the main figure, its category and the detail rows beneath it. The colour shows whether the value is in a typical, borderline or higher-risk range.
  4. Understand what it means. Use the guide below to see how the number is worked out, what its limits are and when to speak to a doctor.

Why caffeine timing matters for sleep

Caffeine keeps you awake by blocking adenosine, the chemical that builds up through the day and makes you sleepy. The effect does not switch off when the buzz fades. Caffeine has a half-life of about five hours in healthy adults, meaning half of what you drank is still circulating five hours later and a quarter after ten hours. In a controlled study, 400 mg of caffeine taken six hours before bed still cut total sleep by more than an hour, and the volunteers did not notice the loss.

How the calculator works

Caffeine at bedtime = dose × 0.5(hours before bed ÷ 5)
Latest cut-off = bedtime − 5 × log₂(dose ÷ 50) hours

Choose your last drink, or enter a custom amount in milligrams, along with when you had it and your usual bedtime. The calculator estimates how much caffeine is still active when you go to bed using a 5-hour half-life, and shows the range for a fast (3-hour) and slow (7-hour) metaboliser. It then works back to the latest time you could have had that drink and still be below about 50 mg at bedtime, roughly the amount in a cup of green tea, which most people tolerate.

Typical caffeine content

Drink Caffeine (typical) Under 50 mg after
Brewed coffee, 240 ml cup 95 mg 4.6 hours
Large coffee-shop coffee, 475 ml 200 mg 10 hours
Espresso, single shot 63 mg 1.7 hours
Black tea, cup 47 mg Immediately
Green tea, cup 28 mg Immediately
Cola, 355 ml can 34 mg Immediately
Energy drink, 250 ml can 80 mg 3.4 hours

Decaf still contains 2 to 15 mg a cup, dark chocolate about 20 mg per 30 g, and some painkillers and cold remedies 30 to 65 mg a dose. Use the caffeine calculator to check your whole day’s intake against the 400 mg adult guideline.

Why half-life varies

Caffeine is broken down mainly by a liver enzyme called CYP1A2, and people differ. Smokers clear it in about three hours; the oral contraceptive pill, pregnancy, liver disease and some antibiotics and antidepressants roughly double the half-life. Genetics matter too: so-called slow metabolisers can have caffeine still working at bedtime from a mid-morning coffee. During pregnancy the half-life can reach 15 hours in the third trimester, which is one reason intake is limited to 200 mg a day.

Limitations

The result is an estimate for one drink. If you had several, add their doses together or run the calculator for the latest one and assume the rest adds to it. Caffeine content varies with brand, bean, brewing time and cup size. Sensitivity to the amount left at bedtime also varies, so if you sleep badly, treat even 50 mg as too much and bring your cut-off earlier.

When to see a doctor

If you depend on caffeine to get through the day, or sleep badly even after stopping it by early afternoon, something else may be disturbing your sleep. A doctor can check for sleep apnoea, iron deficiency, thyroid problems and anxiety. Stopping caffeine suddenly can cause headaches and irritability for a few days, so cut down gradually.

References

  1. Drake C, Roehrs T, Shambroom J, Roth T. Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed. J Clin Sleep Med. 2013;9:1195–1200. PubMed
  2. European Food Safety Authority. Scientific opinion on the safety of caffeine. EFSA Journal. 2015;13(5):4102.
  3. U.S. Food and Drug Administration. Spilling the beans: how much caffeine is too much?
Dr. Beenish Gafoor, MBBS
Medically reviewed by

Dr. Beenish Gafoor, MBBS

MBBS · PMDC registered

Registered Medical Practitioner (PMDC), Senior Medical Editor and Medical Reviewer for OdeSleep. Medical Officer in Paediatrics & NICU at Children's Hospital Lahore, combining frontline clinical experience with medical fact-checking.

View full profile →

Frequently asked questions

For an 11 pm bedtime, a single cup of brewed coffee should be finished by about 6 pm to leave under 50 mg active at bedtime, and most sleep specialists suggest stopping caffeine by early afternoon to be safe.

The half-life is about five hours in healthy adults, so a quarter of the dose remains after ten hours and small amounts persist for a day. Smokers clear it faster; pregnancy and the contraceptive pill slow it down.

For most people it is a small amount, similar to a cup of green tea, but caffeine-sensitive people and those with insomnia may still notice it. If in doubt, aim lower.

Decaf contains 2 to 15 mg of caffeine a cup, far less than regular coffee. One cup in the evening is unlikely to matter, but several can add up for sensitive sleepers.

Genetic differences in the CYP1A2 enzyme and adenosine receptors mean some people clear caffeine quickly or feel it less. Even so, studies show it still reduces deep sleep in many of them without their noticing.

Get one useful sleep insight a week

Evidence-based sleep tips, bedding care know-how and early access to new collections from OdeSleep, straight to your inbox.

One email a week. Unsubscribe any time.

Shopping Cart
Scroll to Top