Caffeine Calculator | Latest Time for Coffee, Amount Left at Bedtime, Clearance Time & Daily Limit (Half-Life, by Weight)

The caffeine calculator turns the amount and time of the coffee, green tea, gyokuro, black tea, energy drinks and stay-awake pills you had today into a one-day graph of the caffeine left in your body. It assumes a peak about 50 minutes after drinking and a halving every half-life (5 hours by default), and shows how many mg remain at bedtime and when you drop to the 50 mg guideline. It also works backward to answer “if I have one more cup, what is the latest time?” You can change the half-life for smokers (about 3 hours), women on low-dose birth control pills (about 10 hours) or late pregnancy (about 15 hours), and check the daily guidelines of 400 mg for healthy adults, 200 mg during pregnancy and 2.5 mg per kg of body weight for children, plus the 200 mg (3 mg/kg) single-dose guideline. Includes a quick-reference table of caffeine per drink and time to clear, and a half-life calculator showing how many mg remain after a given number of hours.

What you drank today

Enter what you drank, the amount and the time, and the caffeine left in your body is calculated hour by hour. Times earlier than your wake-up time (such as after midnight) are treated as drinks taken in the middle of the night.

ml

90mg Infusion 60mg/100ml (composition table)

ml

102mg Varies widely by product (roughly 50–60mg/100ml). Go by the can label

ml

24mg Infusion 20mg/100ml (composition table)

Add at current time

Wake-up time, bedtime & metabolism

Caffeine half-life (metabolism)

Time

健康な大人の平均的な値

Amount you can have left at bedtime

Daily limit guideline

kg

400 mg per day (Health Canada and EFSA), 200 mg per single dose (about 3 mg/kg, EFSA)

Results

Amount left at bedtime (23:30)

44mg

About 0.5 cups of drip coffee. At or below the 50mg guideline.

Time you drop to 50mg or below

22:30

25mg or below by next day 3:30

Daily total

216mg

184mg left until the guideline of 400mg

Peak time

129mg

Peak is 129mg around 13:45

54% of the daily guideline (400mg)

Caffeine remaining in your body (mg)
040801201609:0012:0015:0018:0021:00next day 0:00next day 3:00next day 6:00Guideline 50mgBed 23:30

● marks when you drank, the dotted line is the guideline amount for sleep, and the purple band is the time you are asleep. Touch the graph to see the amount at that time.

View hourly amounts in a table
Caffeine in your body by hour
TimeAmount in bodyVersus guideline
7:000mgBelow
8:0074mgAbove
9:0075mgAbove
10:0066mgAbove
11:0057mgAbove
12:0050mgBelow
13:0043mgBelow
14:00128mgAbove
15:00113mgAbove
16:0098mgAbove
17:00107mgAbove
18:0093mgAbove
19:0081mgAbove
20:0071mgAbove
21:0062mgAbove
22:0054mgAbove
23:0047mgBelow
next day 0:0041mgBelow
next day 1:0035mgBelow
next day 2:0031mgBelow
next day 3:0027mgBelow
next day 4:0023mgBelow
next day 5:0020mgBelow
next day 6:0018mgBelow
next day 7:0015mgBelow

If I have one more cup, by what time?

Works backward to find the time of the last cup that keeps the amount left in your body at bedtime (23:30) at 50mg or below.

If you have Drip coffee (90mg)

Skip it for today

Even if you drink it at your wake-up time (7:00), you will be over 50mg at bedtime.

To daily guideline

OK to drink

Total 306mg (guideline 400mg)

About the calculation

  • Half-life differs greatly between people, and even for the same person it changes with health and the medication they take. Use the results as a guide.
  • If you are pregnant or breastfeeding, or have a medical condition or take medication, consult a doctor or pharmacist. Include the amount in medicines that contain caffeine (cold medicine, headache medicine, stay-awake pills) in your total.
  • The “guideline amount at bedtime” is a reference value for thinking about the effect on sleep, not an official standard.

What you enter is saved only in this browser and is never sent to a server.

ABOUT

About Caffeine Calculator | Latest Time for Coffee, Amount Left at Bedtime, Clearance Time & Daily Limit (Half-Life, by Weight)

The caffeine calculator takes the amount and time of the coffee, tea, energy drinks and stay-awake pills you had today and graphs the caffeine left in your body hour by hour. It shows how many mg remain at bedtime, when you drop to the 50 mg guideline, and the latest time you can have one more cup. Besides the standard 5-hour half-life, you can switch to smoking (about 3 hours), low-dose birth control pills (about 10 hours) or late pregnancy (about 15 hours), and compare against the daily guidelines of 400 mg for healthy adults, 200 mg during pregnancy and 2.5 mg per kg of body weight for children.

How to use Caffeine Calculator | Latest Time for Coffee, Amount Left at Bedtime, Clearance Time & Daily Limit (Half-Life, by Weight)

  1. 1Enter what you drank today (drip coffee, canned coffee, gyokuro, green tea, energy drinks, etc.) with the amount and time. The button adds an entry at the current time
  2. 2Enter your wake-up time and bedtime
  3. 3Choose the half-life (your metabolism) and the amount you are comfortable having left at bedtime (25, 50 or 100 mg)
  4. 4Check how much clears by night using the “amount left at bedtime”, the “time you drop to 50 mg or below” and the graph
  5. 5Under “If I have one more cup, by what time?”, pick the next drink and see the latest time you can have it
  6. 6Use the per-drink reference table and the tab that calculates the remainder from the half-life alone as needed

Great for

  • Find out whether coffee in the late afternoon will clear before bedtime
  • Check whether afternoon coffee or green tea is the reason you cannot fall asleep
  • Work out the latest time to have an energy drink before a night shift or exam study and still sleep
  • Check how many cups of coffee fit within 200 mg a day during pregnancy or breastfeeding
  • Find a guideline for how much cola or green tea a child can have based on body weight
  • Compare the caffeine in gyokuro, matcha, black tea and oolong tea with coffee
  • Check whether coffee seems to linger into the night since you started low-dose birth control pills

Good to know

  • The amount in your body is calculated to peak about 50 minutes after drinking (absorption rate 4/hour) and then halve every half-life (a one-compartment model with first-order absorption).
  • In healthy adults the caffeine half-life ranges from about 2.5 to 10 hours, averaging about 5 hours. Smoking speeds up breakdown, oral contraceptives roughly double the half-life, and late pregnancy is said to extend it to around 15 hours at most.
  • Caffeine amounts for coffee and tea come from the infusion values in the Standard Tables of Food Composition in Japan (8th revision); espresso, cola and chocolate come from European Food Safety Authority (EFSA) data. Canned coffee, energy drinks, bottled drinks and tablets vary widely by product, so go by the package label first.
  • Daily guidelines are 400 mg for healthy adults (Health Canada, EFSA), 200 mg during pregnancy and breastfeeding (EFSA), and 2.5 mg per kg of body weight for children (Health Canada). Japan has no official upper limit.
  • The amount you are comfortable having left at bedtime (default 50 mg) is a reference value for thinking about the effect on sleep, not an official standard. One study found that 400 mg taken 6 hours before bed shortened sleep by about an hour, so the more you drink, the earlier it is safer to stop.
  • Drinks logged at a time earlier than your wake-up time (such as after midnight) are counted as drinks taken in the middle of that night.
  • What you enter is saved only in this browser’s localStorage and is never sent to a server.

Questions this tool answers

Use Caffeine Calculator | Latest Time for Coffee, Amount Left at Bedtime, Clearance Time & Daily Limit (Half-Life, by Weight) for searches like these:

  • I want to know how many hours before bed I should stop drinking coffee
  • I want to calculate how long it takes for caffeine to clear
  • I want to know how much of the coffee I drank in the evening is left at bedtime
  • I want to calculate the remaining caffeine from its half-life
  • I want to know my daily caffeine limit from my body weight
  • I want to know how many cups of coffee I can drink a day during pregnancy
  • I want to compare the caffeine in gyokuro, green tea and black tea
  • I want to know the latest time to drink an energy drink and still sleep

FAQ

How many hours before bed should I stop drinking coffee?
For a typical person with a 5-hour half-life who drinks only one cup of drip coffee (about 90 mg), it takes about 5 hours for the amount in the body to fall to 50 mg or below. If you have several cups in the afternoon, they add up into the night, so enter what you have had today in this tool and check “If I have one more cup, by what time?”. As a general rule, it is advised to avoid caffeine from 6 hours before bed.
How many hours does it take for caffeine to clear?
Caffeine in the body halves every half-life. With a 5-hour half-life, it is half after 5 hours, 1/4 after 10 hours and 1/8 after 15 hours. A 90 mg coffee still leaves about 22 mg after 10 hours. It never reaches exactly zero, so this tool looks at when it falls to a given number of mg or below.
Does the caffeine half-life differ from person to person?
Yes. Even among healthy adults it ranges from about 2.5 to 10 hours. It is shorter for smokers (about 3 hours), about double for women on low-dose birth control pills (about 10 hours), and said to stretch to around 15 hours in late pregnancy. If the same amount tends to linger into the night for you, set a longer half-life when calculating.
How many mg a day is safe?
For healthy adults, the guideline is up to 400 mg a day (about 4 cups of drip coffee) and 200 mg per dose (3 mg per kg of body weight) (Health Canada, EFSA). During pregnancy and breastfeeding it is 200 mg a day (EFSA), and for children 2.5 mg per kg of body weight a day. Because Japan has no official upper limit, values from overseas agencies are used.
Do gyokuro and green tea have more caffeine than coffee?
Per 100 ml, gyokuro has the most at 160 mg, about 2.7 times coffee (60 mg). Sencha, hojicha and oolong tea have 20 mg, black tea 30 mg, and bancha and genmaicha 10 mg. A serving of gyokuro is small, so per cup it is about 96 mg for 60 ml, roughly the same as a cup of coffee.
How many energy drinks a day are okay?
For a product with 80 mg per 250 ml, that is 5 cans up to the healthy adult guideline of 400 mg a day, but you need to count it together with coffee and other drinks. For a product with 142 mg per 355 ml, two cans is 284 mg. Do not drink several at once, so you stay under 200 mg per dose. Amounts differ by product, so check the label on the can.
Is decaf okay to drink at night?
Decaf (caffeine-free) coffee has had 90% or more of its caffeine removed. Even a cup of drip decaf has at most about 9 mg, so the effect before bed is thought to be small. Barley tea, rooibos tea and corn tea do not use tea leaves and contain no caffeine.