DozeClock › Methodology: how every number is calculated
Methodology: how every number is calculated
Updated October 3, 2026
Every number on this site comes from a formula you can check. This page lists them with the constants and where each constant comes from.
Bedtime and wake-up pages
bedtime = wake_time − (n × 90 min) − 15 min for n = 6, 5, 4 (and 3 in the table). alarm = bedtime + 15 min + (n × 90 min). The 90-minute cycle length and the 4–6 cycles per night come from NINDS "Brain Basics: Understanding Sleep"; the 70–120 minute range from AASM sleep education; the 15-minute sleep-onset allowance is the healthy-adult average (10–20 minutes). A result is labelled "within 7–9 h" when total sleep is between 420 and 540 minutes, the adult range from the NSF 2015 panel; "7 or more" is the AASM/SRS 2015 adult consensus.
Sleep needs and "is N hours enough"
Bands are taken verbatim from Hirshkowitz et al. 2015 (recommended; may be appropriate; not recommended) for nine age groups, with the AASM 2016 pediatric and 2015 adult figures shown beside them. A page's verdict is the band the stated number of hours falls in for that age group — no interpolation. Hours are per 24 hours and include naps for children under five.
Naps
Alarm time = start + 15 min + nap length. Stage reached and grogginess ratings come from Brooks & Lack 2006 (5/10/20/30-minute comparison), Rosekind et al. 1995 (NASA, 26-minute average nap: +34% performance, +54% alertness) and Tassi & Muzet 2000 (sleep inertia). The "eight hours before bed" gap is a sleep-hygiene rule of thumb, labelled as such.
Caffeine
remaining_mg = dose × 0.5^(hours ÷ 5). The 5-hour half-life is the healthy-adult average (Institute of Medicine 2001; range about 1.5–9.5 h); the FDA's stated 4–6 h band is drawn as a shaded area. Doses per serving are typical values from the FDA, USDA FoodData Central and Mayo Clinic's published table, with reported ranges shown. The "under 25 mg" line used in tables is an illustrative threshold chosen by us — about a quarter cup of coffee — not a clinical limit. The six-hour cutoff comes from Drake et al. 2013, a controlled trial in which 400 mg six hours before bed reduced total sleep by over an hour.
Sleep sounds
Noise colours are defined by spectral slope — white 0, pink −3, brown −6 dB per octave — from the Wikipedia article "Colors of noise" (CC BY-SA 4.0), plotted from 31 Hz to 16 kHz. Claims about sleep are limited to three cited studies and one systematic review, with sample sizes stated. The sound lists for natural scenes are taken from our own app.
Charts and sentences
All charts are rendered at build time from the data files as SVG; there are no stock chart images. Sentences on data pages are generated from templates with several phrasings per section, chosen by the page's own numbers, so that no two pages claim the same thing about different times. Data snapshot: 2026-10-03. Machine-readable list of pages: routes-index.json.
Where each constant comes from
The calculators use ten constants. Eight come straight from a publication; two are choices we made and label as ours. Follow any link to read the original.
| Constant | Value we use | Used on | Source |
|---|---|---|---|
| Length of one sleep cycle | 90 min (range 70–120) | bedtime, wake-up, nap and sleep-cycle pages | NINDS (NIH), Brain Basics; NHLBI (NIH); AASM Sleep Education |
| Cycles in a normal night | 4–6 | which bedtimes are offered (4, 5, 6 cycles) | NINDS (NIH), Brain Basics |
| Time to fall asleep | 15 min (typical 10–20) | added to every bedtime and nap | A planning allowance we chose inside the range usually quoted for healthy adults. It is not taken from one study; change it by moving your bedtime. |
| Adult sleep range | 7–9 h; "7 or more" | the "within 7–9 h" label | NSF panel, Hirshkowitz 2015; AASM/SRS consensus, Watson 2015 |
| Sleep needs by age (9 groups) | recommended / may be appropriate / not recommended | sleep-needs and "is N hours enough" pages | NSF panel, Hirshkowitz 2015; AASM pediatric consensus, Paruthi 2016; CDC |
| Nap length and grogginess | 10 / 20 / 26 / 30 / 45 / 60 / 90 min | nap pages and nap calculator | Brooks & Lack 2006; NASA, Rosekind 1995; Tassi & Muzet 2000 |
| Caffeine half-life | 5 h (range 1.5–9.5; FDA states 4–6) | caffeine curves and the last-coffee calculator | Institute of Medicine 2001; FDA |
| Caffeine per serving (12 drinks) | typical mg with reported range | caffeine-by-drink pages | Mayo Clinic; USDA FoodData Central; FDA |
| Six-hour caffeine cutoff | 400 mg, 6 h before bed: over 1 h less sleep | caffeine-cutoff pages | Drake 2013 |
| Under-25 mg line | 25 mg | latest-cup time in tables | Our own illustrative threshold (about a quarter cup of coffee). No source sets a "safe to sleep" dose. |
What the numbers cannot tell you
A 90-minute cycle is an average across people and across one night; yours may run 70 minutes early in the night and 110 later, which moves the "end of cycle" by half an hour or more by morning. Caffeine half-life differs about sixfold between people, and is longer in pregnancy and with some medicines and shorter in smokers, so the curve is a middle case. The age bands come from expert panels reading the evidence, not from a measurement of you. For these reasons every result is shown as a set of options or a range, and no page tells you what you personally should do.
Tables you can download
The full bedtime grid and the hour-by-hour caffeine table are published as CSV files with a citation line on the open data page.
Review and corrections
Formulas and sources were last reviewed on October 4, 2026. A review means re-running every calculator and data page against the data files with an independent script and re-opening the sources. What we changed, and when, is in the corrections log.