Skip to content

Caffeine Half-Life & Sleep Cutoff Calculator

Add what you drink and when, and your bedtime. You get how much caffeine is still in you when you lie down, the line of caffeine left through the night, and the latest time a coffee still clears the published sleep cut-off.

What you drink today

    Pick the drink, then its time. Change the milligrams if your label says something else.

    How fast you clear caffeine

    That is the half-life: the hours it takes to clear half. Adults range from 3 to 7 hours. Not sure? Leave it on the middle.

    Anything that changes it

    Still in you at 10:30 pm

    42 mg of today’s 190 mg, at a 5-hour half-life

    Caffeine in your body, from the first drink to the next morning. The dashed line is your bedtime.
      The published cut-offs, for your bedtime
      DrinkCaffeineStop at leastLatest

      This is not medical advice and it does not diagnose anything. If you are pregnant, breastfeeding, have a heart condition or take medication — especially antidepressants, blood thinners or blood-pressure medicine — ask your doctor or pharmacist how much caffeine is right for you.

      Caffeine leaves an adult body with a half-life of 3 to 7 hours, so a cup of coffee drunk at 2 pm is still about a third there at 10 pm. A 2023 meta-analysis of 24 sleep studies found the line that matters for sleep: a cup of coffee at least 8.8 hours before bed, a pre-workout at least 13.2 hours before. This calculator adds up your own drinks against both.

      How to use it

      Set your bedtime and the time you get up. Add each drink with its time: pick it from the list (the caffeine comes from USDA’s food database or the brand’s own figure) or type the milligrams from your label. Leave the speed on the middle unless you know you are a fast or slow clearer, and tick anything that changes it. The answer updates as you type: the caffeine still in you at bedtime, the curve through the night, and each drink checked against the published cut-off for its size.

      The numbers behind it

      • Half-life. “Caffeine has a relatively long half-life of 3–7 h in adults” (Temple et al., 2017). A 2023 meta-analysis puts the full spread across healthy adults at two to ten hours. The three speeds here are the two ends and the middle of 3–7 hours.
      • What changes it. From the same review: smoking “doubles the rate of caffeine clearance”, oral contraceptives “tend to double the half-life”, and in pregnancy the half-life “is on average 8.3 h longer … and may be as much as 16 h longer than usual”. Those are the only modifiers this calculator applies.
      • The sleep cut-offs. Gardiner et al. (2023) pooled 24 studies: caffeine cut total sleep time by 45 minutes and sleep efficiency by 7%. Their model’s cut-offs: “coffee (107 mg per 250 mL) should be consumed at least 8.8 h prior to bedtime and a standard serve of pre-workout supplement (217.5 mg) should be consumed at least 13.2 h prior to bedtime”, while a cup of black tea (47 mg) showed no cut-off at all.

      What this page does not do is invent a “safe” number of milligrams at bedtime — no study publishes one. Each drink is checked against the published line for its size: up to 47 mg no cut-off, up to 107 mg the coffee line, up to 217.5 mg the pre-workout line. Above 217.5 mg the analysis gives no number, and the page says that instead of making one up.

      What is left of one cup of coffee

      One 95 mg cup of brewed coffee, hours after you drink it
      Half-life2 h4 h6 h8 h10 h12 h24 h
      Fast, 3 h60 mg38 mg24 mg15 mg9 mg6 mg0 mg
      Middle, 5 h72 mg55 mg41 mg31 mg24 mg18 mg3 mg
      Slow, 7 h78 mg64 mg52 mg43 mg35 mg29 mg9 mg

      95 mg is USDA’s figure for an 8 fl oz cup of brewed coffee. The table assumes it is all absorbed at once; Temple et al. note absorption takes “less than 1 h”, so the first hour is really a rise.

      Worked examples

      • Two coffees, 8 am and 2 pm, bed at 10:30 pm. About 42 mg of the day’s 190 mg is still in you at bedtime at the middle speed. The 8 am cup clears the 8.8-hour line easily; the 2 pm cup is 8.5 hours before bed and misses it — the last coffee for a 10:30 pm bedtime is 1:42 pm.
      • A pre-workout at 5 pm, bed at 11 pm. 217.5 mg, six hours before bed, leaves about 95 mg in you when you lie down. The published line for that serve is 13.2 hours, which means before 9:48 am.
      • A noon coffee on the pill. The pill doubles the middle 5-hour half-life to 10 hours, so one 95 mg cup at noon still leaves about 46 mg at 10:30 pm.
      • Bed at 9 pm, up at 8 am. A pre-workout’s 13.2-hour line falls at 7:48 am — before you are up. There is no time in your day that meets it, and the calculator says so rather than printing a time in the past.

      Common mistakes

      • Thinking “I fall asleep fine” means caffeine is not working. The meta-analysis measured lost total sleep and lighter sleep, not only time to fall asleep.
      • Counting only coffee. Cola, tea, energy drinks, pre-workouts and chocolate all add to the same curve — add them.
      • Using the 400 mg daily figure as a bedtime rule. The FDA’s 400 mg is a daily amount for healthy adults, not a sleep line. The caffeine content chart adds your day up against it.
      • Forgetting the half-life changes. The pill and pregnancy slow clearance a lot; smoking speeds it up. Tick what applies.

      Frequently asked questions

      How long does caffeine stay in your system?

      Half of it is gone after one half-life — 3 to 7 hours for most adults, 5 in the middle. After five half-lives about 3% is left, so at the middle speed that is roughly 25 hours. A 95 mg coffee still leaves about 31 mg eight hours later.

      What is the half-life of caffeine?

      3 to 7 hours in adults (Temple et al., 2017), with a full range of 2 to 10 hours across healthy adults (Gardiner et al., 2023). Smoking roughly halves it, the pill roughly doubles it, and pregnancy adds about 8 hours on average.

      How long does caffeine last?

      You feel it within the first hour — it is absorbed in under an hour and peaks in saliva at about 45 minutes. The caffeine itself lasts much longer than the feeling: at a 5-hour half-life, a quarter of a morning coffee is still there ten hours later.

      When should I stop drinking coffee before bed?

      The 2023 meta-analysis says at least 8.8 hours before bedtime for a cup of coffee (107 mg) and 13.2 hours for a pre-workout serve (217.5 mg). For a 10:30 pm bedtime that is 1:42 pm and 9:18 am.

      How long does caffeine take to kick in?

      It is absorbed “in less than 1 h”, and concentrations peak in saliva about 45 minutes after you drink it (Temple et al., 2017). That is why the effect arrives within the hour and fades far faster than the caffeine does.

      Does caffeine affect sleep even if I fall asleep fine?

      Yes, on average. Across 24 studies caffeine reduced total sleep time by 45 minutes and sleep efficiency by 7%, and shifted sleep towards the lighter stages — changes you do not necessarily notice.

      Is tea okay before bed?

      In the meta-analysis a cup of black tea (47 mg) showed no cut-off time at all. A big mug or a strong brew can carry more than that, so check the milligrams.

      Read next

      This is not medical advice, and nothing here diagnoses or treats anything. Talk to your doctor or pharmacist about caffeine if you are pregnant or breastfeeding, have a heart condition or anxiety, or take medication — especially antidepressants, blood thinners or blood-pressure medicine. Some links on this site are affiliate links: I buy what I review at full price, and a commission never changes a verdict.