Choose a mode and enter the time you want to wake up (or the time you go to bed). Suggested bedtimes (or wake-up times) at the end of a sleep cycle are calculated for 1 to 7 cycles at once.
Table of Contents
-
What you can do on this page
-
What is this calculation used for?
-
How to Use
-
Formula
-
Symbols and terms
-
Good to know before you start
-
How to calculate it in Excel
-
How to calculate it in Google Sheets
-
How to calculate it in Python
-
How to write it in LaTeX and other math languages (copy and paste)
-
How to have ChatGPT do the calculation
-
DataChef Features
-
Related Features
-
NumberChef Calculators List
What you can do on this page
- Enter the time you want to wake up, such as 6:00 AM, and get suggested bedtimes that line up with the end of a sleep cycle, for 1 to 7 cycles at once
- It also works the other way: enter the time you go to bed, such as 11:00 PM, and get suggested wake-up times at the end of a cycle
- Based on the common idea that 4 to 6 cycles a night is a good amount, the rows for 5 and 6 cycles are marked "recommended"
- You can change the cycle length and the time it takes you to fall asleep to fit your own experience (defaults: 90-minute cycles, 15 minutes to fall asleep)
- A plain-language explanation of the formulas and copy-and-paste formulas for Excel, Google Sheets and Python are all on this page
What is this calculation used for?
On the night before a 5 AM alarm, it is easy to pick a bedtime by feel. With a 5:00 wake-up and 15 minutes to fall asleep, 6 cycles (9 hours of sleep) point to 19:45 (7:45 PM) the evening before, and 5 cycles (7 hours 30 minutes) point to 21:15 (9:15 PM).
The end of a cycle is said to be a time when sleep is light, so waking up then is thought to be easier. People differ, but working back from the wake-up time helps you build the habit of going to bed on purpose instead of staying up late without noticing.
Should you keep studying or go to bed early? When you are torn, you can work back from your wake-up time to see how much time you have. For a 6:30 AM wake-up, 5 cycles (7 hours 30 minutes of sleep) point to a 22:45 (10:45 PM) bedtime, and 4 cycles (6 hours) point to 0:15 (12:15 AM).
Sleep is said to help the brain sort and store memories, so planning backward from the sleep you need is a safer strategy than cramming all night.
When your start time changes from day to day, you have to think about when to sleep every time. Just enter a different wake-up time and recalculate to get that day's suggested bedtime right away.
The calculation is the same when you sleep during the day after a night shift. However, daytime sleep tends to be lighter because of the circadian rhythm (body clock), so treat the results as a guide only, and if you keep feeling unwell, consider talking to a doctor.
One idea is that a nap of one full cycle (about 90 minutes) makes it easier to wake up during light sleep. Use "find wake-up time" mode for one cycle to see when to set an alarm (for example, lie down at 13:00 (1:00 PM), take 15 minutes to fall asleep, and wake up around 14:45 (2:45 PM)).
On the other hand, another idea recommends a short nap of about 15 to 20 minutes, before you reach deep sleep. A long nap can make it harder to fall asleep at night, so choose what fits your own life.
Formula
Symbols and terms
Symbols
| \(B\) | bee | Bedtime - the time you get into bed. This is what the calculator finds in "find bedtime" mode. It is the first letter of "bedtime". |
| \(W\) | double-u | Wake-up time. It is an input in "find bedtime" mode and the answer in "find wake-up time" mode. It is the first letter of "wake". |
| \(F\) | ef | Time to fall asleep - the time from getting into bed until you actually fall asleep. The default in this calculator is 15 minutes. It is the first letter of "fall asleep". |
| \(n\) | en | The number of sleep cycles. This calculator works out and shows every case from \(n = 1\) to \(7\). |
| \(C\) | see | The length of one sleep cycle. The average is said to be about 90 minutes, which is also the default in this calculator. It is the first letter of "cycle". |
| \(S\) | ess | Sleep time - the length of time from falling asleep to waking up, found with \(S = n \times C\). It is the first letter of "sleep". |
Terms
| sleep cycle | One round of non-REM sleep followed by REM sleep, which repeat in turn while you sleep. The average is said to be about 90 minutes, but it can range from about 70 to 120 minutes depending on the person (and the night). Most people are said to go through about 4 to 6 cycles a night. |
| non-REM sleep | Sleep that rests the brain, with stages from light to deep. It comes first after you fall asleep, and growth hormone is said to be released most actively during deep non-REM sleep. |
| REM sleep | Light sleep in which the body rests but the brain is active, and vivid dreams are common. REM stands for "rapid eye movement", because the eyes move quickly under the eyelids. It comes in the second half of each cycle and tends to get longer toward morning. |
| circadian rhythm | The body's built-in rhythm in which body temperature, hormone release and more change on a cycle of about 24 hours. It is also called the "body clock". Jet lag happens when this rhythm is out of step with the local time. |
| sleep latency | The time it takes to actually fall asleep after you get into bed and try to sleep. It is the "time to fall asleep" in this calculator, and for healthy adults it is said to be about 10 to 20 minutes. |
Good to know before you start
Here is what helps you use the calculation on this page with real understanding, not just by pressing the button.
If you get stuck, going back over these points is the quickest way forward.
| Time and elapsed time (Grades 2–3) |
|
| The 24-hour clock (Grades 3–4) |
|
| Multiplication (Grades 3–4) |
|
| Converting minutes and hours (Grades 3–4) |
|
How to calculate it in Excel
| Wake-up time | 6:00 |
| Time to fall asleep (min) | 15 |
| Sleep cycle length (min) | 90 |
| Number of cycles | 5 |
| Bedtime | =MOD(B1-(B2+B3*B4)/1440,1) |
| Bedtime | 23:00 |
| Time to fall asleep (min) | 15 |
| Sleep cycle length (min) | 90 |
| Number of cycles | 6 |
| Wake-up time | =MOD(B1+(B2+B3*B4)/1440,1) |
| Sleep cycle length (min) | 90 |
| Number of cycles | 5 |
| Sleep time (min) | =B1*B2 |
| Sleep time (hours) | =B3/60 |
If the result in B5 shows as a number such as "0.927…", change the cell format to "h:mm" (time), or to "h:mm AM/PM" for the 12-hour clock. The answers in the third table are 450 (minutes) and 7.5 (hours). Just replace the numbers in column B with your own.
How to calculate it in Google Sheets
| Wake-up time | 6:00 |
| Time to fall asleep (min) | 15 |
| Sleep cycle length (min) | 90 |
| Number of cycles | 5 |
| Bedtime | =MOD(B1-(B2+B3*B4)/1440,1) |
| Bedtime | 23:00 |
| Time to fall asleep (min) | 15 |
| Sleep cycle length (min) | 90 |
| Number of cycles | 6 |
| Wake-up time | =MOD(B1+(B2+B3*B4)/1440,1) |
| Sleep cycle length (min) | 90 |
| Number of cycles | 5 |
| Sleep time (min) | =B1*B2 |
| Sleep time (hours) | =B3/60 |
If a result shows as a number such as "0.927…", you can change it to a time with "Format → Number → Time" in the menu.
How to calculate it in Python
from datetime import datetime, timedelta
wake_time = datetime(2026, 7, 13, 6, 0) # wake-up time (the date is a placeholder used to detect a change of day)
fall_asleep_minutes = 15 # time to fall asleep (minutes)
cycle_minutes = 90 # sleep cycle length (minutes)
for cycles in range(7, 0, -1):
bedtime = wake_time - timedelta(minutes=fall_asleep_minutes + cycles * cycle_minutes)
sleep_hours = cycles * cycle_minutes / 60 # sleep time (hours)
recommended = "(recommended)" if cycles in (5, 6) else "" # guide based on the 4-6 cycles a night idea
day = "previous day " if bedtime.date() < wake_time.date() else ""
print(f"{cycles} cycle{'s' if cycles > 1 else ''} ({sleep_hours:g} h of sleep): {day}{bedtime:%H:%M} {recommended}")
How to write it in LaTeX and other math languages (copy and paste)
B = W − F − n × C
B = W - F - nC
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<mi>B</mi><mo>=</mo>
<mi>W</mi><mo>−</mo>
<mi>F</mi><mo>−</mo>
<mi>n</mi><mo>×</mo><mi>C</mi>
</mrow>
</math>
B = W - F - n C
b = w - f - n*c
B := W - F - n*C;
B = W - F - n*C;
B = W - F - nC
S = n × C
S = nC
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<mi>S</mi><mo>=</mo>
<mi>n</mi><mo>×</mo><mi>C</mi>
</mrow>
</math>
S = n C
s = n*c
S := n*C;
S = n*C;
S = nC
How to have ChatGPT do the calculation
You are a calculation assistant for sleep cycles. Do the following calculation by actually running Python code, and base your answer only on the numbers from the execution result (do not answer by mental math or guessing). A person wants to wake up at 6:00 AM. It takes them 15 minutes to fall asleep, and one sleep cycle is 90 minutes long. For each number of cycles from 1 to 7, calculate the bedtime with "bedtime = wake-up time − time to fall asleep − number of cycles × cycle length". If the time goes back past midnight, move it to the previous day. Show a list of the bedtime (on both the 24-hour and 12-hour clock) and the sleep time for each number of cycles. Also add a note that this is a guide based on a general theory, not medical advice.
How to Use
-
1Enter your numbersType the numbers you want to calculate with into the input fields
-
2CalculatePress the "Calculate" button
-
3Check the resultThe result appears on the spot. The same page also explains the idea behind the calculation and the formula
DataChef Features
No technical knowledge required.
Intuitive and user-friendly operation.
Can be used without registering personal information.
Automatic file deletion by clicking "download".
and rapid file conversion.
No attribution required.
No need to contact us for commercial use permission.
