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.