Sleep Calculator

The Sleep Calculator computes sleep from the relation cycles = floor((hours_in_bed x 60 - fall_asleep_minutes) / cycle_minutes). It takes 3 inputs (hours available in bed in hours, minutes to fall asleep in min, length of one sleep cycle in min) and returns the sleep. Because this is a pure mathematical or physical formula rather than a jurisdiction-specific rule, the result never changes over time: the same inputs always produce the same answer, so you can rely on it whether you are checking homework, sizing a design, or sanity-checking another tool. Enter your values in the fields below and the result updates instantly; you can also share a permalink that pre-fills the exact calculation, which is useful for teaching, reports, or collaboration. For example, with hours available in bed = 9 hours, minutes to fall asleep = 15 min, length of one sleep cycle = 90 min, the sleep works out to 5, and the worked example further down the page shows every step so you can follow the arithmetic and reproduce it by hand. The method is the standard form documented by CDC Sleep and Sleep Disorders, and the figure above each result carries the date it was last verified. This tool is general information and is not a substitute for professional engineering, medical, financial, or scientific advice; always check critical results against the primary source and your own judgement.

With Hours available in bed = 9 hours, Minutes to fall asleep = 15 min, Length of one sleep cycle = 90 min, the result is 5.

Formula: cycles = floor((hours_in_bed x 60 - fall_asleep_minutes) / cycle_minutes). Source: CDC Sleep and Sleep Disorders, as at 2026-06-23.

Sleep5

Applies to: any numeric inputs. Method source: CDC Sleep and Sleep Disorders, checked 2026-06-23.

The formula

cycles = floor((hours_in_bed x 60 - fall_asleep_minutes) / cycle_minutes)

Worked example

With Hours available in bed = 9 hours, Minutes to fall asleep = 15 min, Length of one sleep cycle = 90 min:

  1. Sleep minutes = 9 x 60 - 15 = 525
  2. Complete cycles = floor(525 / 90) = 5
  3. Sleep = 5

This worked example is one of the automated golden-value tests this calculator must pass before it can publish.

What this assumes

  • Inputs are real numbers in the units shown.
  • The result is the exact value of cycles = floor((hours_in_bed x 60 - fall_asleep_minutes) / cycle_minutes); general information, not professional advice.

Frequently asked questions

What formula does this use?

cycles = floor((hours_in_bed x 60 - fall_asleep_minutes) / cycle_minutes), the standard form documented by CDC Sleep and Sleep Disorders.

Does the result ever change over time?

No. This is a pure formula with no external rate, so the same inputs always give the same result.

Official sources and verification

Reviewed by the CalculatorHub team, edited by James Graham, 2026-06-23. See our methodology. General information, not professional advice.