How much caffeine is in your body at bedtime?

Enter what you drank today — see the caffeine curve, what's left at bedtime and the latest safe cup.

{{ __t('intake_section') }}
{{ __t('settings_section') }}
{{ __t('half_life_hint') }}
{{ __t('threshold_hint') }}

{{ __t('caffeine_at_bedtime') }}
{{ result.atBedtimeMg.toFixed(0) }} mg
{{ __t('at_time') }} {{ bedtime }}
{{ __t('peak_today') }}
{{ result.peakMg.toFixed(0) }} mg
{{ __t('total_consumed') }}: {{ result.totalMg }} mg
{{ __t('latest_safe_intake') }}
{{ result.latestSafeTime || '—' }}
{{ __t('for_single_dose') }}: {{ result.singleDose }} mg
⚠ {{ __t('warning_too_high_title') }}
{{ __t('warning_too_high_text') }}
✓ {{ __t('safe_for_sleep') }}
{{ __t('safe_for_sleep_text') }}

How does caffeine half-life work?

Caffeine is metabolized exponentially. Its half-life is the time after which half of a dose remains active. For most adults it's between 4–6 hours — shorter for smokers, much longer during pregnancy or while on the contraceptive pill. Concretely: drinking 100 mg at 3 pm leaves ~50 mg in your body at 8 pm, ~25 mg at 1 am.

How late can you still drink coffee?

Rule of thumb: no caffeine 6–8 hours before bed. A more precise approach uses the half-life: if your threshold is ~100 mg and you drink 200 mg, you need one half-life to get below — i.e., 5 hours before bed at a 5h half-life. For 400 mg you need two half-lives = 10 hours.

Tips for better sleep despite caffeine

  • Espresso tastes strong but often contains less caffeine per cup than filter coffee.
  • Decaf still contains ~2–5 mg per cup — matters for very sensitive people.
  • Caffeine can hurt sleep quality even if you fall asleep fine — deep sleep takes the hit.