1. Home
  2. Calculators
  3. Caffeine Calculator

Caffeine Calculator

For coffee and energy drink fans who sleep badly: see what is still in your body at bedtime and the latest time for your next cup.

Free, no sign-up. Runs in your browser: nothing is uploaded.

Free workspace included. Docs, spreadsheets, notes and tasks that save on your device. No sign-up.Take a look

How to use Caffeine Calculator

  1. Enter your numbers, or press a sample to see an example.
  2. Read the results and the table under them.
  3. Copy the results or download the table as a CSV file.

Features

  • Six drinks with typical milligrams, or your own milligrams
  • Remaining caffeine at bedtime with a half-life you choose
  • Last time for one coffee, espresso or energy drink
  • Warning above the 400 mg a day that the FDA cites

Supported formats

Input

  • Typed text and numbers

You get

  • On-screen results
  • Copyable text
  • CSV table

Private by design

Everything you enter is processed by your browser on this device. Nothing is sent to openWorkstand or anyone else, so the Caffeine Calculator is safe for private and work data. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • Drink caffeine contents are typical values; real drinks vary a lot by brand and brewing.
  • Half-life varies between people and with pregnancy, medicines and smoking.
  • It gives general information and estimates and is not medical advice; ask a doctor, dietitian or other professional about your own health.
  • Everything runs in your browser; nothing you type is sent anywhere.

Guide

Caffeine half-life and bedtime: how much is left in your body at night and when to stop the last cup

Caffeine keeps you awake by blocking the receptors that tell the brain it is tired. It leaves the body slowly, and a coffee at four in the afternoon can still be active at bedtime. The calculator below adds up the caffeine from the drinks you list, estimates how much remains when you go to bed, and works out the latest time for one more cup if you want the amount at bedtime to stay under a limit of your choice.

How caffeine is cleared

The body removes caffeine in a roughly constant proportion each hour, which gives a half-life. After one half-life half of the dose is left, after two a quarter, and so on. The formula is dose times 0.5 raised to the hours divided by the half-life. The average half-life is around five hours in healthy adults, but it is closer to three in smokers and longer in pregnancy, with some medicines including certain oral contraceptives, and in liver disease. You can change it from 1.5 to 12 hours.

Listing what you drink

Enter one intake per line as time, drink or milligrams, and count. The drinks the tool knows are espresso (63 mg per shot), brewed coffee (95 mg for 240 mL), black tea (47 mg), green tea (28 mg), cola (34 mg per 355 mL) and energy drink (80 mg per 250 mL). These are typical values from food composition data, and real drinks vary widely, so a large coffee-shop cup may have two or three times more. For anything else, write the milligrams, such as 15:00, 100.

A worked example

Press the first sample: two coffees at 08:00, one at 13:30 and an energy drink at 16:00, with bedtime at 23:00 and a half-life of five hours. The total is 365 mg. By bedtime the morning coffees have fallen to 23.8 mg, the afternoon coffee to 25.5 mg and the energy drink to 30.3 mg, so 79.5 mg remains, which is 29.5 mg over a 50 mg limit. For one coffee of 95 mg the latest time is 18:22, for an espresso 21:20 and for an energy drink 19:37. The second sample is a single morning coffee, which leaves 11.9 mg at 22:30.

Changing the half-life

The third sample uses a slow metabolizer with a seven hour half-life and a 25 mg limit: 91 mg remains at bedtime, and one coffee would have to be drunk by 09:31. If you often feel wired in the evening, try a longer half-life in the box and see how much earlier your cut-off moves. You can also lower the limit if you wake in the night.

Daily totals and edge cases

The tool warns when the total goes above 400 mg a day, the amount the US Food and Drug Administration says is not generally linked with harm in healthy adults. Pregnant people are often advised to keep to about 200 mg. Lines must have a time between 00:00 and 23:59, and intakes after midnight are counted as the next morning relative to bedtime. A time after bedtime is treated as the previous day.

Limits

These are estimates built on typical figures and a single clearance curve. They do not describe how caffeine affects your sleep quality, which depends on sensitivity, habit and what else you do before bed. If you sleep badly, a doctor can look for other causes, and cutting caffeine earlier is only one of several useful steps.

Checked against the current version of the Caffeine Calculator on .

Frequently asked questions

What amount at bedtime is acceptable?

There is no agreed safe level, and sensitivity varies a lot. The box defaults to 50 mg because it is about half a cup of coffee, a figure many people tolerate. A sensitive sleeper may want 25 mg or less, and someone who sleeps well after an evening coffee may be fine with much more. Experiment and pick the level that suits you.

Does decaf count?

Decaffeinated coffee still contains a little caffeine, usually 2 to 15 mg per cup. Write it as a milligram figure if you want to include it, for example 20:00, 5, which is a line with a time and 5 mg.

How long does caffeine last?

The average half-life is about five hours in healthy adults, so half is gone after five hours and a quarter after ten. It is longer with pregnancy, oral contraceptives and some medicines, and shorter in smokers.

How much caffeine is too much?

The US Food and Drug Administration says about 400 milligrams a day is not generally associated with harm for healthy adults. Pregnant people are usually advised to keep under about 200 milligrams.

Keep working with the result

openWorkstand also includes a free workspace with documents, spreadsheets, tasks, projects and a calendar that save to a folder on your computer.