CremaJoy
EN

Free tools that help you choose

Caffeine Planner: when to drink coffee for energy and good sleep

Plan your coffee day. Add your cups, and see how much caffeine is still in your body at bedtime, based on your body weight and the factors that speed up or slow down your liver enzymes.

An educational model using average half-lives from published research. Your real response depends on genes, medicines and health. Not medical advice.

How this caffeine calculator works

This caffeine calculator shows roughly how much caffeine is in your body at any moment of your day, and when your last cup should be if you want a good night's sleep. Add your drinks, your wake time and bedtime, and a few things that change how fast you clear caffeine. The curve updates as you type.

What the tool asks, and why

  • Wake time, bedtime and your drinks. Each drink has a typical caffeine amount: a single espresso about 63 mg and an 8 oz (237 ml) filter coffee about 95 mg, based on USDA food data. Real cups vary a lot, so treat these as averages.
  • Body weight. Used for the single-dose guide. EFSA considers single doses up to about 3 mg per kg (around 200 mg) safe for healthy adults.
  • Things that change caffeine half life. Smoking, oral contraceptives, pregnancy and two medicines that strongly slow caffeine breakdown. Your liver enzyme CYP1A2 handles about 95% of caffeine, and these factors speed it up or slow it down.

How the curve is calculated

The planner uses a one-compartment model, the simplest standard way to describe a drug in the body: caffeine is absorbed quickly and essentially completely, then cleared at a steady rate. The model uses an average half-life of 5 hours, which means half of the caffeine is gone after about 5 hours and a quarter remains after about 10. Studies report a typical caffeine half life of about 4 to 5 hours, but in one study of healthy young men it ranged from 2.7 to 9.9 hours.

The adjustments come from published studies. Smokers cleared caffeine faster (a half-life of 190 versus 276 minutes). Low-dose oestrogen contraceptives lengthened it (7.88 versus 5.37 hours). In the last weeks of pregnancy, clearance was only 39% of normal. Ciprofloxacin roughly doubled the half-life, and fluvoxamine stretched it from 4.9 to 56 hours. Your suggested last cup comes from a meta-analysis of 24 studies, which found that a regular coffee (about 107 mg) should be finished at least 8.8 hours before bed.

How to use your result and stay safe

Use the curve to move your last cup earlier or swap an afternoon drink for decaf. EFSA considers up to 400 mg a day safe for healthy adults and up to 200 mg a day in pregnancy and while breastfeeding. These limits do not fit everyone: people with heart rhythm problems, anxiety or panic disorder, and anyone taking medicines that interact with caffeine should ask a doctor or pharmacist. This is an educational model, not medical advice.

Want the science behind it? Read how long caffeine stays in your system, how your liver breaks caffeine down, how much caffeine is too much and the best time to drink coffee.

Frequently asked questions

What is the half-life of caffeine?

In healthy adults the caffeine half life is typically about 4 to 5 hours, so half of a dose is still in your body that long after drinking it. It varies widely, from about 2.7 to 9.9 hours in one study of healthy young men. Smoking shortens it, while oral contraceptives, late pregnancy and some medicines lengthen it.

How long does caffeine stay in your system?

With an average half-life of about 5 hours, a 95 mg cup of filter coffee at 8:00 still leaves roughly a quarter, around 24 mg, at 18:00, and smaller traces into the night. Slow clearers keep it much longer. The caffeine calculator draws this curve for your own drinks and the factors you select.

How much caffeine is too much in a day?

EFSA considers up to 400 mg a day, spread over the day, safe for healthy adults, and single doses up to about 200 mg. In pregnancy and while breastfeeding the guide is up to 200 mg a day. People with heart rhythm problems, anxiety or panic disorder, or who take interacting medicines may need less, so check with a doctor.

When should I stop drinking coffee before bed?

A meta-analysis of 24 studies found that a regular coffee of about 107 mg should be finished at least 8.8 hours before bedtime to avoid losing sleep. If you sleep at 23:00, that means your last regular cup around 14:00. Larger drinks and slower metabolism push the cut-off earlier, which the planner adjusts for.

How accurate is a caffeine calculator?

It gives a sensible estimate, not a measurement. Caffeine content per cup varies a lot between cafes and even between days, and half-lives differ several-fold between healthy people. The planner uses averages from published research, so use it to compare plans and spot late cups rather than as an exact reading. It is not medical advice.

More free tools