Sleep Pattern Calculator: Spot Social Jet Lag & Fix It
Enter your sleep and wake times for each day to analyse your pattern, detect social jet lag, and get a personalised fix.
Built by Adil Sattar · Educational tool, not medical advice
Mon
Tue
Wed
Thu
Fri
Sat Weekend
Sun Weekend
The exact formula this calculator uses
From a bed and wake time for each day of the week, computes average sleep duration, average bed and wake clock times, social jet lag (weekend vs weekday wake difference), wake-time consistency and a weekly shortfall against 7 hours.
Formula
Nightly duration
Dur = Wake − Bed in minutes; if Wake ≤ Bed, add 1440Identical bed and wake times count as 24h (1440 min).
Average duration
AvgDur = mean of the 7 durations; shown as Xh Ym from Math.round(AvgDur) minutesAverage bedtime
Bed' = Bed − 1440 if Bed > 720 (12:00) else Bed; AvgBed = mean(Bed'); if negative add 1440; shown HH:MM (24h, minutes floored)So evening bedtimes are treated as negative minutes before midnight and averaged with after-midnight bedtimes.
Average wake time
AvgWake = mean of the 7 wake times in minutes after midnight; shown HH:MM (24h)Wake times are not wrap-adjusted, so wake times either side of midnight would average oddly.
Social jet lag
SJL (h) = |mean(Sat,Sun wake) − mean(Mon–Fri wake)| ÷ 60; shown rounded to 1 decimalBased on wake times only, not sleep midpoint (the FAQ describes it as a midpoint shift). Absolute value, so waking earlier on weekends also counts.
Wake-time variability
SD (h) = sqrt( Σ (Wake_i − AvgWake)² ÷ 7 ) ÷ 60Population standard deviation (divides by 7).
Weekly sleep debt
Debt (h) = max(0, (420 − AvgDur) × 7 ÷ 60); shown rounded to 1 decimalUses a fixed 7-hour (420 min) target per night; there is no input for personal need.
Inputs
| Input | Meaning | Range / options |
|---|---|---|
| Bed (×7) | Bedtime for Mon..Sun | time inputs, default 23:00 each |
| Wake (×7) | Wake time for Mon..Sun | time inputs, default 07:00 each |
Constants and where they come from
- Sleep target for debt: 7 hours (420 min). rule-of-thumb used by this tool; FAQ cites 7–9 h for adults
- PM bedtime cutoff: 720 min (12:00). bedtimes after noon are treated as the previous evening
- Weekend days: Sat and Sun (last two rows). fixed in code
Cutoffs and labels
- Consistency (by wake SD): < 0.33 h → Excellent; < 0.66 h → Good; < 1 h → Fair; ≥ 1 h → Poor
- Social jet lag box turns red when rounded SJL ≥ 1h; weekly debt box red when > 2h
- Advice: SJL ≥ 2 → 'clinically significant' message; 1 ≤ SJL < 2 → mild message; AvgDur < 420 min → move bedtime earlier; weekly debt > 5h → recovery planner message; consistency Poor → high variability message; AvgDur ≥ 420 and SJL < 1 and consistency ≠ Poor → 'healthy pattern' message
- Results only appear after pressing the Analyse button (not live)
Worked example
Inputs: Mon–Fri bed 23:00 wake 06:30; Sat bed 00:30 wake 09:00; Sun bed 23:30 wake 08:00
- Durations (min): 450, 450, 450, 450, 450, 510, 510 → mean 467.14 → 467 min = 7h 47m
- Bed' minutes: -60, -60, -60, -60, -60, 30, -30 → mean -42.86 → 23:17
- Wake minutes mean = 424.29 → 07:04
- Weekday wake mean 390 (06:30), weekend mean 510 (08:30) → SJL = 2.00 → 2h
- Wake SD = 0.942 h → Fair
- Debt = max(0, (420 − 467.14) × 7 ÷ 60) = 0.00 → 0h
Result: Avg 7h 47m, avg bed 23:17, avg wake 07:04, SJL 2h, consistency Fair, weekly debt 0h
Descriptive statistics of one self-entered week, not a diagnosis. Weekly sleep debt is the shortfall of the 7-day average below 7h/night times 7, so nights above 7h offset short nights; empty time fields are skipped (all empty gives NaN).
Formula checked against the calculator's code: November 2026. Written out by Adil Sattar. Found a mistake? Tell us.
Frequently asked questions
What is social jet lag?+
Social jet lag is the discrepancy between your biological clock and your social schedule — specifically the difference in sleep timing between weekdays and free days. Even a 1-hour difference is associated with metabolic disruption, mood issues, and elevated cardiovascular risk. A 2-hour+ weekend shift is considered clinically significant.
How does sleep schedule inconsistency affect health?+
Irregular sleep timing disrupts circadian rhythms independently of total sleep duration. A 2019 study of 1,992 adults found that greater irregularity in sleep timing was associated with a 2.2× higher risk of metabolic syndrome, obesity, hypertension, and diabetes — even after controlling for total sleep duration and quality.
What is the ideal sleep schedule?+
The ideal sleep schedule has the same wake time every day (including weekends), bedtime variation of less than 30 minutes, total sleep duration meeting age-appropriate targets (7–9 hours for adults), and timing aligned with your chronotype (early birds sleeping 9 PM–5 AM, night owls sleeping 12–8 AM).
How long does it take to fix an irregular sleep schedule?+
With consistent effort — particularly a fixed wake time applied daily — significant improvement in circadian stability is typically seen within 1–2 weeks. Full re-entrainment of the circadian clock to a new consistent schedule takes approximately 2–4 weeks depending on the magnitude of the shift.
Should I sleep in on weekends to catch up?+
Sleeping in on weekends partially repays acute sleep debt but shifts your circadian clock later, making Monday morning harder and creating a weekly cycle of social jet lag. The better approach: maintain the same wake time, go to bed 30–60 minutes earlier on weekends if you need more sleep.
What is sleep fragmentation?+
Sleep fragmentation refers to frequent interruptions to sleep — brief awakenings or transitions to lighter sleep stages — even if the person doesn't fully wake. Fragmented sleep produces poor subjective quality and daytime impairment disproportionate to total sleep time. Common causes are sleep apnea, UARS, GERD, pain, and environmental noise.
Want the plain-language definition? See this term in the Sleep Science Glossary →
Related calculators
Sleep Debt Calculator: How Many Hours of Sleep Do You Owe?
Sleep debt calculator: find out how many hours of sleep you owe your body and get a step-by-step plan to repay it.
OpenCircadian Rhythm Calculator: Find Your Body Clock Schedule
Circadian rhythm calculator: discover your ideal sleep-wake window and peak performance times by chronotype.
OpenSleep Recovery Planner: Day-by-Day Plan to Repay Sleep Debt
Sleep recovery planner: get a multi-day, science-based plan to recover from accumulated sleep debt.
OpenSleep Score Calculator: Rate Your Sleep Quality (0–100)
Sleep quality score calculator: get a personalized score for how restorative your sleep really is.
OpenWeekly Sleep Planner: Build a 7-Day Sleep Schedule
Weekly sleep planner: build a 7-day sleep schedule that actually matches your life and goals.
OpenSleep Efficiency Calculator: Is Your Score Normal?
Sleep efficiency calculator: find your sleep efficiency percentage, the gold-standard sleep quality metric.
Open