Sleep coach calculator for sleep-stage analysis (REM / Deep / Light), quality score, chronotype, and sleep optimization.
Four tabs: sleep-stage distribution, sleep quality score 0-100, chronotype quiz (lark / owl / hummingbird / dolphin), and caffeine cutoff time based on half-life.
Disclaimer: A screening tool, not a substitute for polysomnography. Consult a sleep doctor for serious sleep disorders.
Calculator information
๐ How to use this calculator
- Open the Sleep Stages tab: enter total sleep time (e.g., 7.5 hours) and the calculator distributes it automatically into Light (50%), Deep (20%), REM (25%), and Awake (5%).
- Sleep Quality Score tab: enter total duration, bed and wake times, number of awakenings, and morning refreshment score (1-10) for a 0-100 score.
- Chronotype tab: answer 6 questions about your most productive hours, natural wake time, and shift tolerance to be classified as Lion, Bear, Wolf, or Dolphin.
- Caffeine Cutoff tab: enter your target bedtime and assumed caffeine half-life (5-6 hours) to get your last-coffee deadline (ideally 8-10 hours before sleep).
- Log your score for 14 days to spot patterns (weekend vs weekday) before applying interventions.
- Tip: deep sleep is concentrated in the first third of the night, REM in the last third. Consistency matters more than total duration.
๐งฎ Sleep Quality Score and Caffeine Half-Life
Quality = (Duration_norm x 30) + (Efficiency x 30) + (Perception x 20) + (Consistency x 20); Caffeine_residual = Dose x (0.5)^(t/5.7)
- Duration_norm: 0-1 score, optimal range 7-9 hours for adults (NSF 2015)
- Efficiency: actual sleep time / time in bed, target >= 85%
- Perception: subjective morning refreshment (1-10 / 10)
- Consistency: variation <= 30 minutes from the weekly average schedule
- Caffeine half-life: average 5-6 hours (longer for slow CYP1A2 metabolizers, shorter for fast metabolizers)
Each sleep cycle is 90-110 minutes long, with 4-6 cycles per night. Deep sleep dominates cycles 1-2; REM dominates cycles 4-6.
๐ก Worked example: 32-year-old professional sleeping 7 hours
Given:- Sleep 11:30 PM, wake 6:30 AM (7 hours total)
- Time in bed 7.5 hours (93% efficiency)
- Woke once for a bathroom trip
- Refreshment perception 7/10
- Last coffee 3:00 PM (200 mg)
Steps:- Stage distribution: Light 3.5 h, Deep 1.4 h, REM 1.75 h, Awake 0.35 h
- Duration score: 7 hours = 27/30 (optimal 7-9)
- Efficiency 93%: 28/30
- Perception 7/10: 14/20
- Consistency (assumed regular): 18/20
- Total Sleep Quality Score: 87/100 (Good)
- Caffeine residual at bedtime (11:30 PM, 8.5 h gap): 200 x (0.5)^(8.5/5.7) = 200 x 0.356 = 71 mg still active
Result: Sleep score 87/100 (Good). Recommendation: move coffee cutoff earlier to 1:00 PM so residual caffeine is below 50 mg by bedtime.
โ Frequently asked questions
How much sleep do adults need?
The National Sleep Foundation (2015) recommends 7-9 hours for adults 18-64 and 7-8 hours for 65+. Consistently sleeping under 6 hours or over 10 hours is linked to increased mortality, type 2 diabetes, and heart disease. Quality (efficiency >85%) and timing consistency matter as much as total duration.
What is REM sleep and why is it important?
Rapid Eye Movement (REM) sleep is the stage where vivid dreaming occurs; the brain is highly active while body muscles are temporarily paralyzed. REM is important for procedural memory consolidation, emotional regulation, and creativity. REM dominates the final third of the night, so sleeping less than 6 hours disproportionately cuts REM. REM deficit is linked to mood disorders, anxiety, and impaired cognitive performance.
How long does caffeine stay in your system?
Caffeine's average half-life is 5-6 hours, meaning half the dose is still active after about 5.7 hours. It takes roughly 5 half-lives (~28 hours) to clear completely. Variability is large: fast CYP1A2 metabolizers clear in ~3 hours, slow ones up to 9 hours. Recommendation: stop caffeine 8-10 hours before bed. A 200 mg dose at 3:00 PM still leaves about 71 mg active at an 11:30 PM bedtime - enough to disrupt deep sleep.
What is the difference between lark, owl, and intermediate chronotypes?
Chronotype is a person's biological circadian preference. Larks (morning people, ~25% of the population) peak before 9 AM and feel sleepy before 10 PM. Owls (~25%) peak in the evening and struggle with early mornings. Intermediates (~50%) are flexible. Dolphin describes chronic light-sleeping insomniacs. Chronotype is largely set by genes such as PER3 and cannot be forced significantly, but it can be shifted by 1-2 hours with morning light exposure and a disciplined schedule.
Are consumer sleep trackers accurate?
Consumer trackers (Apple Watch, Fitbit, Garmin, Oura) combine accelerometer and heart rate signals to estimate stages. Total sleep time accuracy is ~85-90%, but stage classification (Deep/REM) is only 50-70% accurate compared with lab polysomnography (PSG). Diagnosing sleep apnea or clinical insomnia still requires PSG. Trackers remain useful for tracking consistency and weekly trends.
๐ Sources & references
Last updated: May 11, 2026