Track a day's caffeine

Two coffees and a tea — how much is that, and when does it leave your system enough to sleep?

Tools used in this guide

The job

Caffeine hides in different cups at different strengths — coffee ~95 mg, espresso ~63 mg per shot, black tea ~47 mg, energy drinks ~80 mg per can. The job is adding them up honestly, then asking when the level drops low enough for bed.

Doses, half-life, threshold

There is no drink list or weight input — caffeine is entered directly in milligrams. Add each dose with how many hours ago you took it (up to 12; negative hours plan a dose ahead), then set the half-life (default 5 h, adjustable 1–24) and the mg level you want to be under before bed.

Worked example

Two coffees at 08:00 and an espresso at 15:00, checked at 23:00: enter 95 mg 15 hours ago twice and 63 mg 8 hours ago once. At the default 5-hour half-life about 45 mg is still active; against the default 40 mg sleep threshold the tool reports roughly 45 minutes to go. A stricter threshold stretches that out.

Where it stops

Serving sizes and brew strength vary widely, and converting a drink into mg is on you — a double-shot latte is ~126 mg, not one 'coffee'. The half-life is a population average; genetics, pregnancy, and medication stretch or shrink it. It is not medical advice.