Methodology
How SleepTools calculators work.
Every formula on this site is attributed to a published source. This page lists what each calculator does, the science it's built on, and what it doesn't try to do.
Created and maintained by Reede Taylor. Last reviewed May 5, 2026.
Editorial principles
- Every calculator is built on peer-reviewed sleep research, or a consensus guideline from the NSF, AAP, AASM, or CDC.
- When the research gives a range (caffeine half-life is 5 to 9 hours, for example), the variable is exposed in the calculator so you can match it to your own metaboliser type.
- Calculators do not diagnose sleep disorders. Any page that gives timing guidance carries a "Not medical advice" footer.
- All calculations run in the browser. No data leaves your device, and no account is required.
Timing calculators
Sleep Calculator
Sleep cycle math uses the 90-minute cycle (Dement & Kleitman, 1957; Carskadon & Dement, 2011) plus a 14-minute average sleep-onset latency (Ohayon et al., 2004). The visualisation also models per-cycle stage progression: N3 deep sleep dominates cycles 1–2 (physical restoration, glymphatic clearance per Xie et al. 2013), while REM lengthens through cycles 4–6 (memory and emotional processing per Walker et al. 2002).
Formula
- T = clock time, in minutes since midnight
- n = number of complete sleep cycles. The visualizer accepts n ∈ {4, 5, 6}; values below 4 (under NSF adult minimum) are not surfaced in the UI.
- 90 min = mean cycle length (Dement & Kleitman, 1957; Carskadon & Dement, 2011). Individual cycles range 80–110 min.
- 14 min = mean sleep-onset latency (Ohayon et al., 2004)
- Per-cycle stage proportions (healthy adult, % of 90-min cycle):
- Cycle 1 — N1 5%, N2 30%, N3 55%, REM 10% (deep sleep dominant)
- Cycle 2 — N1 5%, N2 40%, N3 35%, REM 20%
- Cycle 3 — N1 5%, N2 45%, N3 20%, REM 30%
- Cycle 4 — N1 5%, N2 50%, N3 5%, REM 40%
- Cycle 5 — N1 5%, N2 50%, N3 0%, REM 45% (REM dominant)
- Cycle 6 — N1 5%, N2 50%, N3 0%, REM 45%
- Aggregate over a 5-cycle (7.5h) night: ≈ 50% N2, ≈ 22% N3, ≈ 18% REM, ≈ 5% N1 — consistent with the Carskadon & Rechtschaffen (2005) adult-architecture consensus.
- These proportions model a healthy ~30-year-old adult. N3 compresses with age (Ohayon et al., 2004; teens ~20–25%, 60+ ~5–10%); the visualizer does not yet expose age as an input — that adjustment is a planned follow-up.
Sources
- Dement & Kleitman, 1957: Cyclic variations in EEG during sleep and their relation to eye movements, body motility, and dreaming (the 90-minute sleep cycle)
- Aserinsky & Kleitman, 1953: Regularly occurring periods of eye motility (REM discovery)
- Carskadon & Dement, 2011: Normal human sleep, an overview (Principles and Practice of Sleep Medicine, 5th ed.)
- Carskadon & Rechtschaffen, 2005: Monitoring and staging human sleep
- Ohayon et al., 2004: Meta-analysis of quantitative sleep parameters from childhood to old age
- Walker et al., 2002: Practice with sleep makes perfect — sleep-dependent motor skill learning (REM and memory)
- Xie et al., 2013: Sleep drives metabolite clearance from the adult brain (glymphatic system in N3)
Bedtime Calculator
Bedtime targets are computed back from a desired wake time using the 90-minute cycle (Carskadon & Dement, 2011) and a 14-minute sleep-onset latency buffer (Ohayon et al., 2004), then cross-referenced with NSF 2015 age-based duration guidelines.
Formula
- T = clock time, in minutes since midnight
- n = number of complete cycles. Results are surfaced for n = 6, 5, 4 (9 h, 7.5 h, 6 h). The 3-cycle (4.5 h) option exists in the underlying lib but is filtered out of the UI as below NSF adult minimum.
- 90 min cycle (Carskadon & Dement, 2011), 14 min sleep-onset latency (Ohayon et al., 2004)
- 5 cycles (7.5 h) is rated 'best' as the median NSF 7–9 h adult target; 6 (9 h) and 4 (6 h) are rated 'good' — within range but not the prescriptive default.
Sources
- Carskadon & Dement, 2011: Normal human sleep, an overview (Principles and Practice of Sleep Medicine, 5th ed.)
- Ohayon et al., 2004: Meta-analysis of quantitative sleep parameters from childhood to old age
- National Sleep Foundation, 2015: age-based sleep duration consensus
Wake-Up Time Calculator
Wake-time targets are end-of-cycle markers based on the 90-minute cycle (Carskadon & Dement, 2011), so you wake from light NREM rather than mid-cycle deep sleep. That is the model behind reduced sleep inertia (Tassi & Muzet, 2000).
Formula
- T = clock time, in minutes since midnight
- n = number of complete cycles. Results are surfaced for n = 4, 5, 6 (6 h, 7.5 h, 9 h). The 3-cycle option is filtered out of the UI as below NSF adult minimum.
- Wake aligns with the end of cycle n (light NREM), reducing sleep inertia (Tassi & Muzet, 2000)
- 5 cycles (7.5 h) is rated 'best' as the median NSF 7–9 h adult target; 6 (9 h) and 4 (6 h) are rated 'good'.
Sources
- Carskadon & Dement, 2011: Normal human sleep, an overview (Principles and Practice of Sleep Medicine, 5th ed.)
- Ohayon et al., 2004: Meta-analysis of quantitative sleep parameters from childhood to old age
- Tassi & Muzet, 2000: sleep inertia review
Nap Calculator
Nap durations are tied to sleep-stage progression (Carskadon & Rechtschaffen, 2005): power naps end before N3 onset at ~20 minutes (Dinges, 1992; Lovato & Lack, 2010); 90-minute cycle naps complete a full cycle including REM (Mednick et al., 2002). The latest-safe-start cutoff uses a 6-hour-before-bed buffer to preserve evening sleep pressure (Monk, 2005).
Formula
- d_nap = recommended duration, selected by desired outcome (alert / memory / recovery)
- T_latest = latest safe nap start to preserve evening sleep pressure
- 6-hour buffer per Monk (2005) and Dinges (1992)
Sources
- Mednick et al., 2002: Nap stage composition and cognitive benefits
- Lovato & Lack, 2010: Sleep inertia and nap length
- Monk, 2005: Circadian post-lunch dip and nap timing
- Dinges, 1992: Power naps and alertness
- Carskadon & Rechtschaffen, 2005: Normal human sleep — stages reference
Caffeine Calculator
Caffeine cutoff times are derived from caffeine's pharmacokinetic half-life: 5 to 7 hours in normal CYP1A2 metabolizers, extending to 9 or more hours in slow metabolizers (Nehlig et al., 1992). Drake et al. (2013) found that caffeine taken 6 hours before bed reduced sleep by about an hour.
Formula
- C(t) = caffeine remaining t hours after intake, in mg
- C₀ = peak dose, in mg
- t₁/₂ = elimination half-life: 5 h (fast), 7 h (normal), 9 h (slow / sensitive CYP1A2)
- Target: ≤ 25% of peak remaining at bedtime; this is reached at exactly 2·t₁/₂ hours after intake
Sources
- Drake et al., 2013: Caffeine effects on sleep taken 0, 3, or 6 h before going to bed
- Nehlig et al., 1992: Caffeine and the central nervous system (pharmacokinetics)
caffeine-half-life-calculator
Current caffeine levels are computed by exponential decay applied to each logged drink and summed. Because caffeine's elimination half-life varies widely between people (Institute of Medicine, 2001, reports a mean near 5 hours and a range of 1.5 to 9.5 hours, driven largely by CYP1A2 activity per Sachse et al., 1999), every level is evaluated at both ends of a half-life band and reported as a range. The sleep-relevant residual line follows Drake et al. (2013), who found caffeine 6 hours before bed still cut objectively measured sleep by over an hour.
Formula
- C(t) = combined caffeine at clock time t, in mg; drinks not yet consumed contribute nothing
- C_i = dose i in mg, taken at time t_i
- t₁/₂ = elimination half-life. Working bands: fast 4 to 5 h, average 5 to 7 h, slow 7 to 9.5 h
- Every output is the pair [C_low, C_high]: the fast end of the band always reads lower, so the answer is a range, never a single mg figure
- The band union (4 to 9.5 h) sits inside the 1.5 to 9.5 h reported population range (Institute of Medicine, 2001); the extremes are rare enough that defaulting to them would mislead
- C_thr = 50 mg, the round sleep-relevant residual line shared with the Caffeine Cutoff Calculator
- T_below is solved separately at h_min and h_max, giving the earliest and latest plausible clearance times. After the final drink the stacked sum is a single exponential, so this closed form is exact
- Half-life modifiers are descriptive, not applied automatically: smoking accelerates clearance, oral contraceptive use can double the half-life (Institute of Medicine, 2001), and pregnancy raises it from a mean of about 3.4 h to about 10.5 h in the final weeks, with individual values up to 16 h (Knutti et al., 1981)
Sources
- Institute of Medicine, 2001: Caffeine for the Sustainment of Mental Task Performance, ch. 2 Pharmacology of Caffeine (mean plasma half-life about 5 h, range 1.5 to 9.5 h; smoking and oral contraceptive effects)
- Sachse et al., 1999: Functional significance of a C to A polymorphism in intron 1 of the CYP1A2 gene tested with caffeine
- Knutti, Rothweiler & Schlatter, 1981: Effect of pregnancy on the pharmacokinetics of caffeine
- Drake et al., 2013: Caffeine effects on sleep taken 0, 3, or 6 h before going to bed
- Nehlig et al., 1992: Caffeine and the central nervous system (mechanism and pharmacokinetics)
- U.S. Food and Drug Administration: Spilling the Beans, How Much Caffeine is Too Much (400 mg/day for healthy adults)
Health calculators
Sleep Debt Calculator
Sleep debt is the cumulative deficit between actual sleep and the age-appropriate target (NSF, 2015). Recovery uses the rule of about one extra hour per night above target until cleared (Banks & Dinges, 2007). Predicted attention loss follows a simplified linear approximation of Van Dongen et al. (2003).
Formula
- D = total sleep debt over the logged period, in hours; floored at 0 (surplus is not banked)
- T = nightly sleep target by age group: 9 h (teen), 8 h (adult), 7.5 h (older) — NSF (2015)
- N = number of nights logged; h_i = hours slept on night i
- R = recovery time in nights, assuming +1 h above target each night (Banks & Dinges, 2007)
- P = predicted sustained-attention reduction; simplified linear approximation of Van Dongen et al. (2003), capped at 50%
Sources
- National Sleep Foundation, 2015: sleep duration recommendations
- Banks & Dinges, 2007: Behavioral and physiological consequences of sleep restriction
- Van Dongen et al., 2003: Cumulative cost of additional wakefulness — dose-response of sleep loss on neurobehavioral functions
- Dinges, 1995: An overview of sleepiness and accidents (cumulative debt and performance)
How Much Sleep Do I Need
Age-band recommendations come from the NSF 2015 consensus statement (Hirshkowitz et al., 2015), cross-referenced with the CDC and the American Academy of Pediatrics. Lifestyle modifiers (active exercise, high stress) lean the recommendation toward the upper end of the band, per AASM practitioner guidance.
Formula
- H_age(a) = NSF 2015 midpoint for the age band a
- Age bands (hours/night): newborn 16, infant 14, toddler 12.5, preschool 11, school-age 10, teen 9, adult 8, older adult 7.5
- Δ_lifestyle = +0.5 h if active exercise + +0.5 h if high stress (max +1 h adjustment)
Sources
- Hirshkowitz et al. (NSF), 2015: National Sleep Foundation's sleep time duration recommendations
- Centers for Disease Control and Prevention: sleep duration by age
- American Academy of Pediatrics: pediatric sleep guidance
- American Academy of Sleep Medicine: clinical practice guidelines on adult sleep duration
Sleep Deprivation Cost Calculator
Productivity loss is modelled with the simplified linear approximation of Van Dongen et al. (2003): each 7 h of accumulated debt corresponds to roughly 25% reduction in sustained attention, capped at 50%. Job type adjusts the multiplier (cognitive 1.2x, physical 0.8x). BAC-equivalent framing comes from Williamson & Feyer (2000); the population-level cost context is Hafner et al. (RAND, 2017).
Formula
- D = sleep debt, in hours
- ρ = effective performance reduction (0–0.5); linear approximation of Van Dongen et al. (2003)
- m = job-type multiplier: 1.2 cognitive, 1.0 mixed, 0.8 physical
- H_lost = productive hours lost per 8-h workday
- w = hourly wage (optional input)
- BAC-equivalent framing: ~17 h awake ≈ 0.05% BAC, ~24 h ≈ 0.10% (Williamson & Feyer, 2000)
Sources
- Van Dongen et al., 2003: Cumulative cost of additional wakefulness — dose-response of sleep loss on neurobehavioral functions
- Williamson & Feyer, 2000: Moderate sleep deprivation produces impairments equivalent to alcohol intoxication
- Hafner et al., 2017 (RAND): Why sleep matters — the economic costs of insufficient sleep (population-level context)
Sleep Quality Score
The score is calibrated against the Pittsburgh Sleep Quality Index (Buysse et al., 1989), with the subdomain structure adapted from the NSF Sleep Health Index (2014) and the daytime-functioning domain informed by the Insomnia Severity Index (Morin et al., 2011). Eight Likert-style questions feed four subdomains: sleep efficiency (40%), timing and restedness (25%), daytime functioning (20%), and sleep hygiene (15%).
Formula
- S_d = subdomain score (0–100); d ∈ {efficiency, timing, daytime, hygiene}
- a_q ∈ {0, 1, 2, 3} = answer to question q on a Likert scale (0 = best, 3 = worst)
- |d| = number of questions in subdomain d (3, 2, 1, 2 respectively)
- w_d = subdomain weight: 0.40 efficiency, 0.25 timing, 0.20 daytime, 0.15 hygiene
- Calibration: S_total < 65 corresponds to PSQI > 5 (poor-sleeper threshold from Buysse et al., 1989)
Sources
- Buysse et al., 1989: The Pittsburgh Sleep Quality Index (PSQI)
- Morin et al., 2011: The Insomnia Severity Index — psychometric indicators
- National Sleep Foundation, 2014: Sleep Health Index methodology
sleep-hygiene-quiz
Scoring is an original 12-item composite built from the behaviours with the strongest evidence in Irish et al.'s 2015 systematic review of sleep hygiene (schedule regularity, light exposure, caffeine and alcohol timing, screens, and pre-bed routine), following the clinical framing of Stepanski & Wyatt (2003) and AASM healthy-sleep guidance. It is a self-assessment of habits, not a validated clinical instrument, and deliberately does not reproduce the copyrighted Sleep Hygiene Index (Mastin et al., 2006).
Formula
- p_i = points for item i (0 = least sleep-supportive frequency, 3 = most)
- 12 items across 4 domains: schedule regularity, light & environment, substance timing, pre-bed behaviour (3 items each)
- S = overall score 0–100; domain subscores use the same normalisation over their 3 items
- Bands: 80+ strong, 65–79 good, 50–64 fair, <50 needs attention — descriptive labels, not diagnostic categories
Sources
- Irish et al., 2015: The role of sleep hygiene in promoting public health — a review of empirical evidence
- Stepanski & Wyatt, 2003: Use of sleep hygiene in the treatment of insomnia
- American Academy of Sleep Medicine: Healthy sleep habits guidance
- Mastin, Bryson & Corwyn, 2006: Assessment of sleep hygiene using the Sleep Hygiene Index (referenced for construct scope only; items and scoring are original)
sleep-temperature-calculator
The recommended bedroom range starts from the 60–67°F (15.6–19.4°C) consensus band grounded in thermal-environment research (Okamoto-Mizuno & Mizuno, 2012) and is adjusted for how warm you sleep, bedding weight, and age. The mechanism: sleep onset follows the evening drop in core body temperature of roughly 1°C, driven by heat loss through the skin (Harding, Franks & Wisden, 2019; Lack et al., 2008), and a cool room supports that drop.
Formula
- C = 65°F (18.3°C), centre of the 60–67°F consensus band
- m_j = adjustments: runs hot −2°F, runs cold +2°F, heavy bedding −2°F, light bedding +1°F, age 65+ +2°F
- w = 2°F half-width, giving a personalised ~4°F range; results clamp to 59–72°F
- Output is shown in °F and °C; infant sleep-space guidance is out of scope and deferred to pediatric sources
Sources
- Okamoto-Mizuno & Mizuno, 2012: Effects of thermal environment on sleep and circadian rhythm
- Harding, Franks & Wisden, 2019: The temperature dependence of sleep
- Lack et al., 2008: The relationship between insomnia and body temperatures
- Haskell et al., 1981: The effects of high and low ambient temperatures on human sleep stages
Life-situation calculators
Baby Sleep Calculator
Wake windows, nap counts, and total sleep needs follow NSF 2015 (Hirshkowitz et al.) and AAP/AASM 2016 (Paruthi et al.) age-based guidance, with the 2-to-1 and 1-to-0 nap transitions framed by Jenni & O'Connor (2005). Sample schedules are built by alternating the midpoint wake window with the midpoint nap duration from each age band. Safe-sleep callouts (back-to-sleep, firm surface, room-sharing, no soft bedding) are surfaced for under-12-month inputs per the AAP Safe Sleep policy statement (Moon et al., 2022).
Formula
- T_wake = morning wake time (input); T_bed = recommended bedtime
- N_naps = age-band nap count (5 newborn → 0 by ~3 y); see BABY_SPECS table in lib
- W = age-band wake window midpoint (~45 min newborn → ~360 min preschool)
- d_n = age-band nap duration midpoint (~60 min newborn → 0 once napping ends)
- Schedule alternates: wake → nap → wake → nap → ... → wake → night sleep
- Total sleep ranges by age band: 0-3 mo 14-17h (NSF), 4-11 mo 12-16h (AAP/AASM), 1-2 y 11-14h, 3-5 y 10-13h.
- For ages 0 to about 3 months the 'night sleep' figure is the *aggregate* across multiple 2 to 4 hour stretches, not a single consolidated block. The calculator labels this as 'Total night sleep' and notes consolidation typically begins around 3 to 4 months.
- Spec age bands are non-overlapping [minMonths, maxMonths) so a baby at any month maps to exactly one age band.
Sources
- Hirshkowitz et al. (NSF), 2015: National Sleep Foundation sleep duration recommendations
- Paruthi et al. (AAP/AASM), 2016: Recommended amount of sleep for pediatric populations
- Moon et al. (AAP), 2022: Sleep-Related Infant Deaths. Updated 2022 Recommendations for Reducing Infant Deaths in the Sleep Environment
- Jenni & O'Connor, 2005: Children's sleep, an interplay between culture and biology (nap transitions)
- Huckleberry: published age-based wake-window data
Shift Work Sleep Calculator
Sleep is anchored 1 hour after shift end with a 7-hour window. Light timing follows Boivin & James (2002): avoid light 2 h before sleep onset, seek bright light at sleep offset. Rotating shifts use a gradual 7-day re-entrainment with daily ~2 h bedtime shifts; forward (clockwise) rotations are biologically easier than backward rotations (Smith et al., 1999), per AASM guidance (Sack et al., 2007). Full circadian re-entrainment to night work takes 5–7 days (Czeisler et al., 1990).
Formula
- Sleep onset 1 h after shift end (wind-down period)
- Sleep duration = 7 h (lib anchor; circadian misalignment may require longer in practice)
- Δ_day = nightly bedtime shift, distributed linearly over 7 days for rotating workers
- Light avoidance: 2 h before sleep onset (Boivin & James, 2002)
- Light seeking: at sleep offset on waking
- Forward rotation (day → evening → night) is easier than backward (Smith et al., 1999)
Sources
- Czeisler et al., 1990: Exposure to bright light and darkness to treat physiologic maladaptation to night work
- Smith et al., 1999: Forward vs backward shift rotation
- Boivin & James, 2002: Light treatment and circadian adaptation to shift work
- Sack et al., 2007 (AASM): Circadian rhythm sleep disorders — clinical practice guidelines
Night Shift Sleep Schedule
Same engine as the Shift Work Sleep Calculator, presented night-first: sleep is anchored 1 hour after shift end with a 7-hour window (a 10pm–6am shift yields roughly 7am–2pm), because morning sleep still overlaps the tail of the biological night when melatonin is elevated. Light timing follows Boivin & James (2002): avoid bright light 2 h before sleep onset (including the commute home), seek bright light at wake. Consistency across days off is the dominant factor in adaptation (Czeisler et al., 1990); full re-entrainment takes 5–7 days, per AASM guidance (Sack et al., 2007).
Formula
- Sleep onset 1 h after shift end (wind-down period)
- Sleep duration = 7 h (lib anchor; daytime sleep often runs shorter in practice, tracked as sleep debt)
- Light avoidance: 2 h before sleep onset, including the morning commute (Boivin & James, 2002)
- Light seeking: at sleep offset on waking
- Full circadian re-entrainment to night work takes 5–7 days of consistent scheduling (Czeisler et al., 1990)
Sources
- Czeisler et al., 1990: Exposure to bright light and darkness to treat physiologic maladaptation to night work
- Boivin & James, 2002: Light treatment and circadian adaptation to shift work
- Sack et al., 2007 (AASM): Circadian rhythm sleep disorders — clinical practice guidelines
- Smith et al., 1999: Forward vs backward shift rotation
Jet Lag Calculator
Recovery uses the asymmetric adaptation rate from Eastman & Burgess (2009) and Waterhouse et al. (2007): ~1.0 day per time zone eastward (phase advance is biologically harder) and ~0.75 days per zone westward (phase delay matches the body clock's natural drift). Light-exposure timing follows the Cochrane review by Herxheimer & Petrie (2002) and the NEJM clinical review by Sack (2010).
Formula
- Δz = signed time-zone difference (positive = eastward); shorter route taken when |Δz| > 12
- R = recovery days (rounded); reflects direction asymmetry per Eastman & Burgess (2009)
- T_body = body clock's bedtime expressed in destination local time
- T_target = desired local bedtime at destination
- δ_day = recommended daily bedtime shift to gradually phase-shift body clock to local time
Sources
- Eastman & Burgess, 2009: How to travel the world without jet lag
- Sack, 2010: Jet lag (NEJM clinical review)
- Herxheimer & Petrie, 2002: Melatonin for the prevention and treatment of jet lag (Cochrane review)
- Waterhouse et al., 2007: Jet lag — trends and coping strategies
Circadian & chronotype calculators
Chronotype Quiz
Scoring uses a 7-question simplified Morningness-Eveningness Questionnaire (Horne & Östberg, 1976), with the four-type Lion / Bear / Wolf / Dolphin classification described in Breus (2016). Social jet lag is computed in the spirit of the Munich Chronotype Questionnaire (Roenneberg et al., 2003) as the difference between mid-sleep on free days and mid-sleep on workdays.
Formula
- a_i = answer to question i on a 5-point scale (0 = strong evening preference, 4 = strong morning)
- S_raw range: 0–28; S_norm normalised to 0–100
- Type cutoffs are calibrated to the Breus (2016) Lion/Bear/Wolf/Dolphin framework, not the original MEQ thresholds
- Social jet lag = |mid-sleep_free − mid-sleep_workday| (Roenneberg et al., 2003 MCTQ)
Sources
- Horne & Östberg, 1976: A self-assessment questionnaire to determine morningness-eveningness
- Roenneberg et al., 2003: Life between clocks — daily temporal patterns of human chronotypes (MCTQ)
- Breus, 2016: The Power of When (Lion/Bear/Wolf/Dolphin classification)
Sleep Schedule Fixer
Schedule shifts apply the gradual circadian advance/delay protocol from Czeisler et al. (1981), capped at the physiological maxima of ≈30 min/day for advances (the harder direction) and ≈60 min/day for delays. Low-dose melatonin can amplify advances when taken 5 hours before DLMO (Lewy et al., 1984; Mundey et al., 2005).
Formula
- ΔT = total bedtime shift required, in minutes
- r_user = user-selected daily shift rate (15, 30, or 60 min/day)
- r_max = physiological cap; advance is biologically harder than delay (Czeisler et al., 1981)
- N_days = nights to reach target at the effective rate
- For advances, morning bright light is the strongest signal; melatonin 5 h before DLMO amplifies the effect (Mundey et al., 2005)
- For delays, evening bright light reinforces the later schedule
Sources
- Czeisler et al., 1981: Bright light induction of strong (type 0) resetting of the human circadian pacemaker
- Lewy et al., 1984: Melatonin shifts human circadian rhythms according to a phase-response curve
- Mundey et al., 2005: Phase-dependent treatment of delayed sleep phase syndrome with melatonin
- American Academy of Sleep Medicine: circadian rhythm sleep–wake disorder guidelines
Melatonin Timing Calculator
Dim-light melatonin onset (DLMO) is estimated as habitual sleep onset minus 2 hours (Lewy et al., 1992 / 1998 / 2006). For phase advance, the evidence-backed protocol is 0.5 mg taken 5 hours before DLMO (Mundey et al., 2005). The standard 3–10 mg doses common at retail are pharmacological — they sedate but don't phase-shift well — per the Brzezinski et al. (2005) meta-analysis.
Formula
- T_DLMO ≈ habitual sleep onset − 120 min (Lewy et al., 1999/2006)
- Phase advance: take 5 h before DLMO at 0.5 mg low dose (Mundey et al., 2005)
- Standard 3–10 mg doses cause an exogenous melatonin spike that wears off quickly and can leave excess melatonin disrupting later sleep stages (Brzezinski et al., 2005)
- Westward jet lag responds modestly to melatonin; bright morning light at destination is the primary lever
Sources
- Lewy et al., 2006: The dim-light melatonin onset (DLMO) as a marker of circadian phase
- Lewy et al., 1992 / 1998: Melatonin phase-shifting and DLMO foundational research
- Mundey et al., 2005: Phase-dependent treatment of delayed sleep phase syndrome with melatonin
- Brzezinski et al., 2005: Effects of exogenous melatonin on sleep — a meta-analysis
Alcohol and Sleep Calculator
BAC is computed via the Widmark formula (1932), still the standard in forensic toxicology (Searle, 2015). REM suppression scales with bedtime BAC at ≈9.3 minutes per 0.01% (Colrain et al., 2014; Ebrahim et al., 2013), consistent with the sleep-architecture review by Roehrs & Roth (2001): SWS-heavy first half, fragmented second half.
Formula
- BAC(t) = blood alcohol concentration t hours after first drink, in percent w/v (Widmark, 1932)
- D = number of standard US drinks (14 g ethanol each)
- w = body weight in kg
- r = volume-of-distribution factor: 0.68 (male), 0.55 (female) — Widmark (1932)
- 0.015 %/h = mean ethanol elimination rate
- ΔREM = REM minutes lost, capped at one first-cycle's worth (~50 min); 9.3 min per 0.01% BAC (Colrain et al., 2014)
Sources
- Widmark, 1932: Formula for blood alcohol concentration estimation
- Searle, 2015: Alcohol calculations and their uncertainty (modern Widmark validation)
- Roehrs & Roth, 2001: Sleep, sleepiness, and alcohol use
- Ebrahim et al., 2013: Alcohol and sleep I — effects on normal sleep (meta-analysis)
- Colrain et al., 2014: Alcohol and the sleeping brain
Teen Sleep Calculator
Targets reflect the puberty-driven circadian phase delay documented by Carskadon et al. (1998, 2002): DLMO shifts 1.5–2.5 hours later in adolescents, making pre-11 p.m. sleep onset biologically difficult. Wolfson & Carskadon (1998) tied this directly to school-schedule sleep debt. The 8–10 hour recommendation for ages 13–17 comes from NSF (2015); the AAP (2014) policy statement recommends school start no earlier than 8:30 a.m.
Formula
- T_prep = morning prep + commute (default 60 min)
- T_bed,natural(age) = age-band natural sleep onset reflecting pubertal circadian delay (Carskadon et al., 1998/2002): ~22:00 ages 11–12, ~23:00 ages 14–15, ~23:30 ages 16–17
- S_min(age) = NSF 2015 minimum recommended hours: 9 h ages 11–12, 8 h ages 13–18
- D_nightly is floored at 0 (no negative debt), D_annual assumes a 180-day school year
- AAP (2014) policy: secondary schools should start no earlier than 8:30 a.m.
Sources
- Carskadon et al., 1998 / 2002: Adolescent circadian phase delay and pubertal sleep regulation
- Wolfson & Carskadon, 1998: Sleep schedules and daytime functioning in adolescents
- Hirshkowitz et al. (NSF), 2015: sleep duration recommendations
- American Academy of Pediatrics, 2014: School start times for adolescents (policy statement)
Sleep Banking Calculator
Banking schedules follow the Rupp et al. (2009) protocol: extending sleep by 1–2 hours per night for 5–7 nights before a planned sleep restriction provides meaningful protection during the subsequent restriction period. Each banked hour confers approximately 0.65 days of effective protection (conservative estimate calibrated to Rupp's 2009 trial). Mah et al. (2011) showed similar benefits in athletic-performance contexts; Belenky et al. (2003) provides the underlying dose-response model of restriction.
Formula
- B_total = total banked sleep hours
- n_bank = banking nights (typically 5–7); Δh = extra sleep per banking night (1.0–2.0 h, depending on purpose)
- D_projected = sleep debt the planned restriction will accrue, in hours
- N_eff = effective protection days; protection degrades after ~2–3 days of restriction (Rupp et al., 2009)
- Banking shows diminishing returns beyond ~7 nights and is preparation, not a substitute for adequate rest
Sources
- Rupp, Wesensten & Balkin, 2009: Banking sleep — realization of benefits during subsequent sleep restriction and recovery
- Mah et al., 2011: The effects of sleep extension on athletic performance
- Belenky et al., 2003: Patterns of performance degradation during sleep restriction (dose-response model)
screen-time-cutoff-calculator
The screen-off window is modelled on light-dose research: Chang et al. (2015, PNAS) showed evening use of a bright light-emitting reader suppressed melatonin by around 55% and delayed circadian phase by about 1.5 hours, with brighter, closer, bluer screens producing larger effects (Gringras et al., 2015). The calculator scales a base buffer by device type, brightness, and warm-light filtering, and presents a range rather than a single dogmatic number because individual light sensitivity varies widely (Phillips et al., 2019).
Formula
- b_device = base buffer: phone/tablet at close range 90 min, laptop/monitor 75 min, TV at distance 45 min
- f_brightness = 1.0 at full brightness, 0.8 medium, 0.65 low
- f_filter = 0.8 with warm/night filtering enabled, 1.0 without — filters reduce but do not eliminate the effect (Gringras et al., 2015)
- Displayed as a ±15-minute range around T_off; minimum surfaced buffer is 30 min
Sources
- Chang, Aeschbach, Duffy & Czeisler, 2015: Evening use of light-emitting eReaders negatively affects sleep, circadian timing, and next-morning alertness (PNAS)
- Gringras et al., 2015: Bigger, brighter, bluer-better? Current light-emitting devices — adverse sleep properties and preventative strategies
- Gradisar et al., 2013: The sleep and technology use of Americans — findings from the National Sleep Foundation's 2011 Sleep in America poll
- Phillips et al., 2019: High sensitivity and interindividual variability in the response of the human circadian system to evening light
Limitations
These tools model averaged sleep physiology for healthy adults, or for healthy children where applicable. Individual sleep cycles run 80 to 110 minutes. Caffeine half-life varies more than threefold by metaboliser type, age, hormonal contraceptive use, and pregnancy. Melatonin DLMO can shift by several hours depending on chronotype. The calculators expose these variables wherever they change the result enough to matter.
SleepTools does not diagnose insomnia, delayed sleep phase syndrome, shift work disorder, or any other sleep disorder. If you have persistent sleep difficulties, see a board-certified sleep medicine physician.
How this page is maintained
When a calculator's formula changes, the corresponding entry in lib/content/citations.ts is updated in the same commit. That single source feeds this page, the "Built on" footer on each calculator, and the /llms.txt file that AI search engines read.
These tools are for informational purposes only and are not a substitute for medical advice. For sleep disorders or persistent sleep difficulties, consult a healthcare provider.
social-jet-lag-calculator
Social jet lag is computed exactly as defined in the Munich ChronoType Questionnaire literature: the absolute difference between mid-sleep on free days (MSF) and mid-sleep on workdays (MSW) (Wittmann et al., 2006; Roenneberg et al., 2003). Chronic social jet lag of two or more hours is associated with higher BMI and metabolic risk in population studies (Roenneberg et al., 2012).
Formula
Sources