Sleep & Recovery

Caffeine Curfew Calculator

Enter your wake time, bedtime, and usual caffeine dose to see the latest you should have coffee — plus a simple daily timeline for morning light, screens, and wind-down that works with your body clock.

General sleep-hygiene education, not medical advice. Caffeine metabolism varies a lot between people, so treat these times as a starting point and adjust to how you sleep.

Your usual caffeine hit95 mg

Your caffeine curfew is 6:22 PM for a 11:00 PM bedtime.

Your caffeine curfew6:22 PM

Have your last 95 mg by 6:22 PM — about 4.6 hours before your 11:00 PM bedtime — to be near 50 mg residual by bed.

Prefer a cushion? The common rule of thumb is to stop 1:00 PM–3:00 PM (8–10 hours before bed).

Your day, optimized for sleep

7:00 AM wake11:00 PM bed
  1. 7:00 AMWake up
  2. 7:30 AMMorning light10–30 min outdoors, within 1 hour of waking
  3. 6:22 PMLast caffeineabout 4.6 h before bed
  4. 9:30 PMScreens offdim screens & bright lights
  5. 10:15 PMWind downrelax, dim the lights
  6. 11:00 PMBedtime

Caffeine still in your system

If your last 95 mg is at 6:22 PM, this is roughly how much remains — about 50 mg by bedtime (≈5-hour half-life).

050100~50 mgbed6:22 PM

General sleep-hygiene education, not medical advice. Caffeine metabolism varies a lot between people (genetics, smoking, pregnancy, and some medications change it) — treat these times as a starting point and adjust to how you feel.

This is an educational estimate, not medical advice. Consult a qualified professional.

Save & share your result

When should you stop drinking coffee before bed?

Caffeine has a half-life of roughly 5 hours in a typical adult — meaning about half of what you drink is still in your system 5 hours later, and a quarter after 10 hours. So an afternoon coffee can still be working at bedtime, even if you don’t feel wired.

This calculator works backward from your bedtime and your usual dose to find the latest you can have caffeine and still be near a low residual (~50 mg) when you turn the lights off. The bigger your dose, the earlier the cutoff. As a simpler backup, stopping 8–10 hours before bed suits most people.

How the caffeine curfew is calculated

Caffeine clears in a predictable first-order way: it halves about every 5 hours. Starting from your dose, the tool finds the time at which the amount left by your bedtime drops to around 50 mg — roughly the level unlikely to disrupt most people’s sleep — and shows you the full decay curve so you can see why.

Your own clearance can be faster or slower than average. A gene (CYP1A2) makes some people "fast" or "slow" metabolizers; smoking speeds clearance up; pregnancy, older age, and some medications slow it down. If caffeine hits you hard, cut off earlier than the estimate.

Timing light for your circadian rhythm

Your sleep-wake cycle is set by light. Getting 10–30 minutes of outdoor light within about an hour of waking anchors your body clock and helps you feel sleepy at the right time that night. In the evening, bright and blue-rich screen light does the opposite — it can delay your clock — so dimming screens 1–2 hours before bed and winding down in low light helps you fall asleep.

A simple evening routine

  • Morning: get outside light within an hour of waking.
  • Afternoon: have your last caffeine by your curfew time.
  • 1–2 hours before bed: dim screens and overhead lights.
  • ~45 minutes before bed: wind down — read, stretch, or relax away from screens.
  • Keep a consistent wake time, even on weekends, to stabilize your rhythm.

Frequently asked questions

When should I stop drinking caffeine before bed?

For most people, 8–10 hours before bed is a safe cutoff. This tool refines that to your dose: a small coffee may only need ~5 hours, while a large or double dose needs longer to fall to a low residual by bedtime.

How long does caffeine stay in your system?

About half clears in roughly 5 hours, and it takes around 10 hours or more to clear most of a dose — longer in slow metabolizers, during pregnancy, with older age, or with certain medications.

Does afternoon coffee really affect sleep?

It can. Controlled research found caffeine taken even 6 hours before bed measurably reduced total sleep, often without the person realizing their sleep had worsened.

What is a circadian rhythm calculator?

It times daily cues — light exposure and caffeine — to your personal sleep-wake schedule, so your body clock and your bedtime are working together rather than against each other.

Is morning sunlight really important for sleep?

Yes. Morning outdoor light is one of the strongest signals that sets your circadian clock, which in turn helps you feel sleepy at a consistent time at night.

Embed this calculator

Free to use on your own website, blog, or article — just copy the snippet below. It loads the live calculator and includes a small link back to HealthyLifeStyles.

Sources & references

  1. U.S. Food & Drug Administration. "Spilling the Beans: How Much Caffeine is Too Much?" (notes caffeine’s ~4–6 hour half-life).
  2. Drake C, Roehrs T, Shambroom J, Roth T. "Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed." J Clin Sleep Med. 2013;9(11):1195–1200.
  3. Clark I, Landolt HP. "Coffee, caffeine, and sleep: A systematic review." Sleep Med Rev. 2017;31:70–78.
  4. Blume C, Garbazza C, Spitschan M. "Effects of light on human circadian rhythms, sleep and mood." Somnologie. 2019.