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).
How it works
The calculator counts back from your wake time in 90-minute cycles, then adds 14 minutes for falling asleep. Each cycle is drawn as a bar showing how much of it is light sleep, deep sleep and REM, with deep sleep front-loaded in the first cycles and REM growing through the later ones.
Example: Wake at 7:00 AM with 5 cycles: 5 Ã 90 min is 7 h 30 min, plus 14 min to fall asleep, gives a bedtime of 11:16 PM.
Show the formulaHide the 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's age band (under Fine-tune) sets the recommended cycle count and the guidance text; it does not yet rescale the stage proportions — 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.
How it works
Start from the wake time you enter, count back in 90-minute cycles, and add 14 minutes for falling asleep. Three bedtimes are shown, for 6, 5 and 4 cycles.
Example: Wake at 6:30 AM: 6 cycles gives 9:16 PM, 5 cycles gives 10:46 PM, 4 cycles gives 12:16 AM.
Show the formulaHide the 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).
How it works
Start from the bedtime you enter, add 14 minutes for falling asleep, then count forward in 90-minute cycles. Waking at the end of a cycle means waking from light sleep rather than deep sleep.
Example: Bed at 11:00 PM: 4 cycles gives 5:14 AM, 5 cycles gives 6:44 AM, 6 cycles gives 8:14 AM.
Show the formulaHide the 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).
How it works
The nap length comes from the stage of sleep you want to wake from: 20 minutes stays in light sleep, 60 minutes reaches deep sleep, 90 minutes completes a full cycle. The latest start time is your bedtime minus six hours minus the nap, so the nap does not use up the night's sleep pressure.
Example: Bedtime 11:00 PM and a 20-minute nap: 11:00 PM minus 6 hours minus 20 minutes puts the latest start at 4:40 PM.
Show the formulaHide the 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 Cutoff 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.
How it works
Caffeine halves in the body every half-life, which the calculator sets at 5, 7 or 9 hours depending on the sensitivity you pick. The cutoff is placed two half-lives before bedtime, the point at which a quarter of the peak dose is left.
Example: Bedtime 11:00 PM with the 7-hour half-life: two half-lives is 14 hours, so the cutoff lands at 9:00 AM. At bedtime, 25% of a 9:00 AM coffee would still be in the body.
Show the formulaHide the 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.
How it works
Each drink you log decays on its own curve, halving every half-life, and the curves are added together. Because half-lives differ so much between people, every figure is worked out twice, at the fast and slow ends of a band, and shown as a range rather than a single number.
Example: A 200 mg coffee at 8:00 AM, read at 6:00 PM, is 10 hours old. On a 5-hour half-life that is two halvings, leaving 50 mg; on a 7-hour half-life it is about 1.4 halvings, leaving about 74 mg. The tool reports roughly 50 to 74 mg.
Show the formulaHide the 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).
How it works
Debt is the gap between the nightly target for your age group and the hours you actually slept, added up across the nights you logged. Nights above target do not cancel earlier shortfalls. Recovery assumes one extra hour above target each night, and the attention estimate grows in a straight line with the debt until it caps at 50%.
Example: An adult (8-hour target) logging 6, 7, 6, 7 and 8 hours over five nights is 6 hours behind. That takes six nights of one extra hour to clear, and the model puts the attention loss at about 21%.
Show the formulaHide the 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.
How it works
The starting figure is the midpoint of the NSF range for your age band. Active exercise adds half an hour and high stress adds another half hour, so the adjustment never exceeds one hour.
Example: A 35-year-old starts at 8 hours. With regular training and a stressful job, the recommendation becomes 9 hours.
Show the formulaHide the 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).
How it works
The attention loss from your sleep debt (the same straight-line model as the Sleep Debt Calculator) is scaled by job type, then applied to an 8-hour workday to give hours lost. Multiplying by your hourly wage, if you enter one, gives a cost per day and per five-day week.
Example: A 7-hour debt gives a 25% reduction. In a cognitive job (Ã 1.2) that is 30%, or 2.4 hours of an 8-hour day. At $40 an hour, that is $96 a day and $480 a week.
Show the formulaHide the 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%).
How it works
Each of the eight questions scores 0 (best) to 3 (worst). Within each of the four areas, the points are turned into a 0 to 100 score, and the four area scores are blended with fixed weights: sleep efficiency counts most, then timing, daytime functioning and habits.
Example: Answering 1, 1 and 0 on the three efficiency questions gives 2 points out of a possible 9, so an efficiency score of 78. That score contributes 78 Ã 0.40, about 31 points, to the total.
Show the formulaHide the 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).
How it works
Twelve habit questions score 0 to 3 points each, 3 being the most sleep-supportive answer. The total out of 36 is scaled to 100. The four habit areas use the same scaling over their three questions.
Example: 27 points out of 36 scales to 75, which lands in the 'good' band.
Show the formulaHide the 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.
How it works
The range starts at 65°F, the centre of the 60 to 67°F consensus band, then moves by fixed steps: cooler if you run hot or use heavy bedding, warmer if you run cold, use light bedding or are over 65. The result is a 4°F window around that point, kept within 59 to 72°F.
Example: Someone who runs hot (â2°F) with heavy bedding (â2°F) centres on 61°F, giving a range of 59 to 63°F.
Show the formulaHide the 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).
How it works
The day is built as a chain: a wake window, then a nap, then another wake window, repeated for the number of naps typical at your baby's age, ending with bedtime. Window and nap lengths are the midpoints of the published range for that age band.
Example: A baby on two naps with a 3-hour wake window and 1-hour naps, waking at 7:00 AM: three wake windows (9 h) plus two naps (2 h) gives a bedtime of 6:00 PM.
Show the formulaHide the 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).
How it works
Sleep starts one hour after the shift ends and runs for seven hours. Light is avoided for the two hours before that sleep and sought on waking. For rotating patterns, the gap between the current and target bedtime is spread evenly over seven days.
Example: A shift ending at 6:00 AM gives a sleep window of 7:00 AM to 2:00 PM, with dim light from 5:00 AM. A rotation that needs bedtime to move 7 hours later moves it one hour a day.
Show the formulaHide the 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).
How it works
Same engine as the Shift Work Sleep Calculator: sleep begins one hour after the shift ends and lasts seven hours, with light avoided for the two hours before sleep and sought on waking.
Example: A 10:00 PM to 6:00 AM shift gives a 7:00 AM to 2:00 PM sleep window. The commute home falls inside the dim-light period.
Show the formulaHide the 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).
How it works
The time difference between the two cities sets the size of the shift, taken the short way round when it is more than 12 hours. Recovery is about one day per zone flying east and three-quarters of a day per zone flying west, because the body clock delays more easily than it advances. The plan moves bedtime by an equal step each day across that recovery period.
Example: New York to London is 5 zones east, so about 5 recovery days, and bedtime moves roughly an hour a day until it lines up with London time.
Show the formulaHide the 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.
How it works
Seven questions each score 0 (strong evening preference) to 4 (strong morning preference). The total out of 28 sets the type: 22 and above Lion, 15 to 21 Bear, 7 to 14 Wolf, under 7 Dolphin. It is also scaled to 0 to 100 for display.
Example: Answers totalling 18 out of 28 give a Bear and a scaled score of 64.
Show the formulaHide the 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).
How it works
The calculator measures how far your bedtime needs to move, then divides by a daily step. The step you pick is capped at what the body clock can manage: about 30 minutes a day when moving earlier and about 60 minutes a day when moving later. The result is the number of nights the shift takes.
Example: Moving bedtime from 1:00 AM to 11:00 PM is a 2-hour advance. At the 30-minute cap that takes 4 nights, even if a faster step is selected.
Show the formulaHide the 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.
How it works
Melatonin onset is estimated as two hours before your usual sleep time, since that is when the body's own melatonin typically begins to rise. The timing windows shown are then placed relative to that estimate, following the protocols used in the cited studies for each goal. The calculator describes what the research did; it is not a dosing instruction, and whether and when to use melatonin is a question for a clinician.
Example: Usual sleep onset 11:30 PM gives an estimated melatonin onset of 9:30 PM. For the phase-advance protocol, the window studied is five hours before that, 4:30 PM.
Show the formulaHide the 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.
How it works
Blood alcohol is estimated with the Widmark formula: the alcohol in your drinks divided by your body water, then falling at 0.015% per hour. The REM loss estimate is 9.3 minutes for every 0.01% of blood alcohol still present at bedtime, capped at about 50 minutes.
Example: Two standard drinks for an 80 kg man: 28 g ÷ (80 à 0.68 à 10) gives a peak near 0.051%. Three hours later that is roughly 0.006%, so the model predicts about 6 minutes of REM lost if bedtime is then.
Show the formulaHide the 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.
How it works
Wake time is the school start minus prep and commute time. Actual sleep is the gap between the natural sleep onset for the teen's age, which shifts later through puberty, and that wake time. The shortfall against the NSF minimum is the nightly debt, multiplied by 180 school days for the yearly figure.
Example: School at 8:00 AM with 60 minutes of prep means waking at 7:00 AM. A 16-year-old whose natural sleep onset is 11:30 PM gets 7.5 hours, half an hour under the 8-hour minimum, which is 90 hours over a school year.
Show the formulaHide the 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.
How it works
Banked sleep is the extra hours per night multiplied by the number of banking nights. The restriction's projected debt is the nightly shortfall times its length. Each banked hour is credited with about 0.65 days of protection, rounded down and never more than the restriction itself lasts.
Example: Five nights of one extra hour banks 5 hours, which covers about 3 days of a restriction (5 Ã 0.65 is 3.25, rounded down).
Show the formulaHide the 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).
How it works
Each device has a base buffer before bed: 90 minutes for a phone or tablet, 75 for a laptop, 45 for a TV. Lower brightness and a warm-light filter each shrink that buffer by a fixed factor. The result is shown as a 15-minute range either side.
Example: A phone at medium brightness with night mode on: 90 min à 0.8 à 0.8 is about 58 minutes, so with an 11:00 PM bedtime the screen-off window is roughly 9:45 to 10:15 PM.
Show the formulaHide the 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).
How it works
Mid-sleep is the clock time halfway through a night's sleep. The calculator finds it for workdays and for free days, and the difference between the two is your social jet lag.
Example: Workdays 11:00 PM to 6:30 AM put mid-sleep at 2:45 AM. Free days 1:00 AM to 10:00 AM put it at 5:30 AM. The difference is 2 h 45 min, in the moderate band.
Show the formulaHide the formula
Sources