Cycles, not hours
The reason a sleep calculator exists at all is that total hours are the wrong variable. Seven and a half hours of sleep and eight hours of sleep are not simply a bit different in quantity; if the alarm lands in the middle of a cycle rather than at the end of one, the extra half hour can leave you feeling worse.
The widely cited model puts a full cycle at about ninety minutes. So the useful question is not how many hours you can get but how many complete cycles fit before the alarm, which is why the report gives you four options rather than one number.
Six cycles is nine hours, five is seven and a half, four is six, and three is four and a half. They are listed most sleep first, because that is usually the preferred option, and the shorter ones are there because sometimes it is already one in the morning.
Working out tonight’s bedtime
- Leave What do you want to calculate? on the wake-up option to work backward from an alarm, or switch to the other to work forward from a bedtime.
- Enter the hour into Hour, 24-hour clock 0-23 (your wake-up time in “wake up at” mode, or your bedtime in “going to bed” mode). For a seven in the morning alarm, that is 7.
- Enter the minutes into Minute, 0-59 (same time as the Hour field above).
- Adjust Minutes it typically takes you to fall asleep after getting into bed if fifteen is not right for you. The range is 0 to 60.
- In the going-to-bed mode only, you can tick the current time checkbox to use your device clock instead of the two fields.
- Click Sleep Calculator, then read the four suggested times.
- Copy to clipboard takes the whole report. Generate more returns you to the fields.
The two number fields are shared between the modes. In one mode they mean your wake-up time and in the other your bedtime, which is what their labels spell out, and the mode you are not using simply does not read them.
A worked example, both ways
Ask for a seven in the morning wake-up with the default fifteen minute buffer. The report gives 9:45 in the evening for six cycles, quarter past eleven for five, quarter to one for four and quarter past two for three. The first two are labelled as falling on the previous night, because from the point of view of a seven o’clock alarm they do.
Now go the other way. Enter half past eleven at night as a bedtime with the same buffer, and the wake-up times come back as quarter to nine, quarter past seven, quarter to six and quarter past four, all labelled as the next day.
Notice the buffer in both. The bedtime suggestions are times to be in bed, not times to be asleep, and the wake-up suggestions already account for the fifteen minutes you will spend getting there.
Midnight is where these calculators break
Almost every arithmetic bug in a tool like this lives at the day boundary. Subtract nine and a quarter hours from a morning wake-up and you land on the previous evening; add nine hours to a late bedtime and you land on the following morning.
The approach here is to avoid dates entirely. Every time is held as a plain count of minutes since midnight, and the wraparound is done with modular arithmetic that is explicitly written to behave correctly for negative values, which is the exact place naive code goes wrong. Alongside the wrapped clock time, the calculation also reports whether the result fell on the previous day, the same day or the next one.
That day label is not decoration. A bare bedtime of 9:45 with no indication that it means the previous evening is genuinely ambiguous, and the report never leaves you to work it out.
There is exactly one place the real clock is consulted, which is the current time checkbox. It reads your device’s local hour and minute once, and everything after that is plain integer arithmetic.
What the model is and is not
Ninety minutes is an average drawn from sleep research and repeated by every calculator of this kind. It is not a measurement of your own cycles, which vary between people, across a night, and with age. Early cycles tend to be shorter than later ones.
The report carries that caveat itself rather than leaving it to this page, along with a plain statement that none of this is medical advice. The honest use is comparative. If you are choosing between going to bed now and finishing one more episode, knowing that the later option costs you a whole cycle rather than forty minutes is a genuinely useful thing to know.
For persistent sleep problems, a calculator is not the answer.
Tools for the rest of the routine
Binaural Beats Generator and White Noise Generator both run in a tab overnight if background sound helps you get to sleep. Online Timer covers a nap rather than a night.
For the other side of the day, Golden Hour Calculator works out sunrise and sunset at your location, which is the input most people actually want when adjusting a sleep schedule. Heart Rate Zone Calculator and BMI Calculator are the neighbouring health estimates, each with its own honest caveats. The rest is on the calculators hub.

