Home › Everyday Life › Sleep Cycle Calculator
Sleep Cycle Calculator
Suggests bedtimes for a given wake-up time, or wake-up times for a given bedtime, so that sleep ends at the boundary of a full sleep cycle (default 90 minutes) after a typical time to fall asleep (default 14 minutes).
When to use
You want to pick a bedtime or alarm time that completes 3–6 whole sleep cycles instead of waking mid-cycle.
Do not use when: You have a sleep disorder or shift-work schedule needing clinical advice; cycle length varies between people and through the night, so treat the times as approximations.
Formula
wake_up_at: bedtime = time − fall_asleep_minutes − n × cycle_minutes; go_to_bed_at: wake time = time + fall_asleep_minutes + n × cycle_minutes; n = 3…6 (4.5–9 h of sleep at 90-minute cycles)
A night's sleep consists of 4–6 cycles of roughly 90 minutes that progress through light, deep and REM sleep; waking at the end of a cycle tends to feel less groggy. Adults are advised to sleep 7–9 hours, i.e. 5–6 cycles.
Inputs
| Parameter | Type | Unit | Required | Description |
|---|---|---|---|---|
mode | enum: wake_up_at | go_to_bed_at | yes | Whether the given time is the wake-up time or the time you go to bed. | |
time | string | yes | The known wake-up time or bedtime, 24-hour HH:MM. | |
fall_asleep_minutes | integer | min | default 14 | Average sleep-onset latency; 10–20 minutes is typical for healthy adults. Range: ≥ 0, ≤ 120 |
cycle_minutes | integer | min | default 90 | Length of one sleep cycle; 90 minutes is the usual average (range about 70–120). Range: ≥ 60, ≤ 120 |
Outputs
| Output | Type | Unit | Description |
|---|---|---|---|
suggested_times | string_list | Bedtimes (for wake_up_at, earliest first: 6, 5, 4, 3 cycles) or wake-up times (for go_to_bed_at: 3, 4, 5, 6 cycles), HH:MM. | |
sleep_cycles | number_list | Number of full cycles for each suggested time, in the same order. | |
sleep_hours | number_list | h | Hours of actual sleep for each suggested time. |
schedule | list | Objects with cycles, time and sleep_hours for each suggestion. |
Example
Wake up at 06:30: {"mode":"wake_up_at","time":"06:30"} → {"suggested_times":["21:16","22:46","00:16","01:46"],"sleep_cycles":[6,5,4,3],"sleep_hours":[9,7.5,6,4.5]}
Go to bed at 23:00: {"mode":"go_to_bed_at","time":"23:00"} → {"suggested_times":["03:44","05:14","06:44","08:14"],"sleep_cycles":[3,4,5,6],"sleep_hours":[4.5,6,7.5,9]}
GET https://tttkmbb.com/api/v1/calculate/sleep-cycles?mode=wake_up_at&time=06%3A30
Machine access
- API:
GET https://tttkmbb.com/api/v1/calculate/sleep-cycles(query parameters) orPOSTwith a JSON body{"inputs": {...}} - Schema: https://tttkmbb.com/api/v1/calculators/sleep-cycles · Markdown: https://tttkmbb.com/everyday/sleep-cycles.md · JSON definition: https://tttkmbb.com/everyday/sleep-cycles.json
- MCP: server
https://tttkmbb.com/mcp, toolrun_calculator with calculator_id="sleep-cycles" - OpenAPI operationId:
calculate_sleep_cycle_times - Freshness:
static. Authentication: none. Rate limit: fair use (see rate limits).
Sources
- NIH NINDS – Brain Basics: Understanding Sleep (government)
- Sleep cycle (Wikipedia) (reference)
FAQ
Which suggestion should I choose?
Prefer 5 or 6 cycles (7.5–9 h); 3–4 cycles is a fallback for a short night, not a healthy routine.
Are sleep cycles really 90 minutes?
On average. Individual cycles range from about 70 to 120 minutes and lengthen through the night, so the suggested times are estimates to be fine-tuned by how you feel on waking.
Related calculators
- Time Duration Calculator — Hours between bedtime and wake-up time.