Calculate optimal wake-up times by sleep cycle
This sleep-cycle wake-time calculator turns a planned bedtime into a practical list of possible alarm times.
Run — free
Enter when you expect to go to bed, your average cycle length, and the number of minutes you usually need to fall asleep. The calculator adds that settling time first, then advances by complete sleep cycles so every result falls on a cycle boundary. It is a planning aid rather than a promise about sleep quality, and it does not replace personal medical advice.
Start with the time you actually plan to go to bed
Use bedtime for the moment you expect to get into bed, written as a 24-hour HH:MM value such as 22:30 or 00:15. The calculator does not assume that sleep begins immediately. It first adds fall_asleep_minutes, which defaults to fifteen minutes but can be changed to match your usual routine. A bedtime of 22:30 with fifteen minutes to fall asleep therefore produces an estimated sleep start of 22:45. Every wake-up option is measured from that point, not from the moment you lie down. This distinction matters because ignoring sleep latency shifts every alarm earlier than the intended cycle boundary. The response includes both the normalized bedtime and sleep_starts_at, making the assumption visible when you save the result, display it in an application, or compare different evening routines. Times that pass midnight wrap into the next day automatically. Since the input is only a clock time, the result shows clock values rather than calendar dates; interpret an early-morning result as occurring after the supplied bedtime.
Choose a realistic average cycle length
Sleep cycles are often summarized as roughly ninety minutes, so cycle_minutes defaults to 90, but this calculator deliberately lets you provide another average. The value must be a finite positive number because a zero or negative cycle cannot define a forward wake-time boundary. For each option, the algorithm multiplies cycle_minutes by a whole cycle count, adds that duration to the estimated sleep start, and formats the result as HH:MM. Fractional cycle lengths are accepted, while the displayed clock time is rounded to the nearest minute. The response preserves the computed sleep_minutes for each option so automated clients can see the duration behind the clock value. Treat the length as a planning estimate rather than a biological measurement that remains exact every night. Stress, illness, age, environment, and normal variation can all affect sleep architecture. If you have observations from a wearable or sleep diary, an average derived across several representative nights is generally more useful here than a single unusual reading. The calculator performs arithmetic on your chosen average; it does not diagnose sleep stages or verify that a boundary truly occurred.
Read the options and select enough total sleep
The wake_up_times array is ordered from one completed cycle through max_cycles, which defaults to six and can be set from one to twelve. Each entry reports the cycle count, total sleep minutes after falling asleep, and corresponding wake_time. This makes the list useful for exploring the arithmetic, but an early option is not automatically a healthy recommendation. A one-cycle result may help illustrate a short nap boundary, whereas an overnight plan normally requires enough total sleep for your circumstances. Look first at the total duration, then choose among cycle-aligned times that also fit your obligations. The calculation is deterministic: it never reads the current date, local time zone, or system clock, and it uses no network service. The same inputs therefore always return the same output in the browser and API. Midnight rollover is handled with clock arithmetic, so a bedtime late in the evening can yield alarms after midnight without extra configuration. If sleep problems, severe daytime tiredness, breathing interruptions, or other concerning symptoms persist, use this schedule only as a record for a conversation with a qualified health professional, not as a substitute for assessment.
What you can do with it
Plan an alarm before bed
Compare several whole-cycle alarm times after adding the minutes you normally need to fall asleep.
Build a sleep-planning feature
Return a deterministic schedule of cycle counts, durations, and clock times inside a wellness app or personal dashboard.
Explore a personalized cycle average
Replace the typical ninety-minute estimate with an average from your own observations and compare the resulting boundaries.
FAQ
What does the calculator cost?
The browser calculator is free to use on this page. API requests start at $0.002.
Why is time to fall asleep added before the cycles?
Sleep cycles begin after you fall asleep, so latency is added to bedtime before any complete-cycle duration is counted.
Must a cycle be exactly 90 minutes?
No. Ninety minutes is the default, but cycle_minutes accepts any finite positive number.
What happens if a wake time crosses midnight?
It wraps to a valid 24-hour clock value. An early-morning result should be read as occurring after the supplied bedtime.
Does a cycle boundary guarantee I will feel rested?
No. The result is a mathematical planning estimate, and adequate total sleep and individual health factors still matter.
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/final3/sleep-cycle-wake-time-calc \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"bedtime":"22:30"}'const res = await fetch("https://api.kit.forhosting.com/final3/sleep-cycle-wake-time-calc", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"bedtime": "22:30"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/final3/sleep-cycle-wake-time-calc",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"bedtime": "22:30"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/final3/sleep-cycle-wake-time-calc", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"bedtime":"22:30"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"bedtime":"22:30"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/final3/sleep-cycle-wake-time-calc", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"bedtime": "22:30"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "final3.sleep_cycle_wake_time_calc",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |