Design principles
- Enough sleep comes first. Cycle timing never overrides the regular minimum recommended for healthy adults.
- Windows over false precision. We show a range when biological variation makes an exact minute misleading.
- Adjustable inputs. Your sleep latency, target, and planning-cycle length can be changed.
- Local and inspectable. Calculations run in your browser; no account or remote sleep profile is required.
Default parameters
| Parameter | Default | Allowed range |
|---|---|---|
| Sleep target | 8 hours | 7–9 hours |
| Time to fall asleep | 20 minutes | 0–60 minutes |
| Planning cycle | 90 minutes | 80–110 minutes |
| Displayed planning window | ±10 minutes | Fixed display rule |
| Caffeine half-life | 5 hours | 4–7 hours in tool |
| Caffeine bedtime threshold | 25 mg | Planning rule, not a safety limit |
Sleep duration
Time in bed = wake date/time − bed date/time. If the clock wake time is earlier than bedtime, the calculator treats it as the next day. Estimated time asleep = time in bed − sleep latency − reported awake time.
Estimated cycles divide time asleep by your planning-cycle length. Estimated sleep efficiency divides time asleep by time in bed. Neither value measures sleep stages.
Bedtime and wake-up windows
The center of a wake option is bedtime + latency + (cycle length × cycle count). A bedtime center works backward from the alarm using the same values.
To avoid presenting a falsely exact minute, we show a 20-minute window centered on each estimate. The “best fit” is the option whose estimated sleep duration is closest to your saved target. The width is a practical interface rule, not a claim that biological timing stays inside those exact bounds.
The cycle window is a product design rule, not a validated predictor of an individual’s sleep architecture. NIH states that cycles commonly restart every 80–100 minutes and that true stages are classified using sensor measurements.
Weekly sleep deficit
For each of seven nights, the tool calculates max(target − reported hours, 0), then adds those shortfalls. Time above the target is shown separately as “longer-night surplus.” It does not automatically cancel the deficit because recovery is not known to be a precise hour-for-hour transaction.
Caffeine cutoff
Remaining caffeine uses exponential decay: dose × 0.5(elapsed hours ÷ half-life). The displayed cutoff works backward from bedtime to the point at which the entered dose would decay to about 25 mg.
Caffeine half-life can vary far beyond our UI range. The output does not account for repeated doses, active metabolites, drug interactions, pregnancy, smoking, genetics, or medical conditions.
Nap timing
Alarm time is lie-down time + expected latency + selected sleep duration. Quick options use 20 and 30 minutes asleep; the longer option uses a 90-minute planning estimate. These are convenient choices, not a guarantee of a particular stage on waking.
What this site cannot know
A clock-time tool cannot determine when you enter REM or deep sleep, whether you have sleep apnea, how much sleep you biologically need, or why you feel tired. It does not read a wearable and is not validated as a medical device.
See the source list and medical disclaimer.