CBT-I Sleep Window Calculator
Plan a CBT-I sleep window from diary sleep and a fixed wake time, with bedtime shift checks, safety floors, and weekly review cues.Starting window
| Window | Bedtime | Projected SE | Goal gap | Shift vs current | Projected review band | Copy |
|---|---|---|---|---|---|---|
| {{ row.window_label }} | {{ row.bedtime }} | {{ formatPercent(row.projected_efficiency) }} | {{ formatSignedPercent(row.goal_gap) }} | {{ row.shift_label }} | {{ row.review_band_label }} |
| Priority | Checkpoint | Action | Trigger | Next window | Bedtime | Copy |
|---|---|---|---|---|---|---|
| {{ row.priority }} | {{ row.checkpoint }} | {{ row.action }} | {{ row.trigger }} | {{ row.next_window }} | {{ row.bedtime }} | |
| SE band | {{ row.threshold }} | {{ row.action }} | {{ row.reason }} | {{ row.window_change }} | {{ row.bedtime }} | |
| Guidance | Diary use | Use the ladder with a diary | {{ point }} | - | - |
Many insomnia schedules go wrong because time in bed gets confused with sleep need. A person may spend eight or nine hours in bed, sleep closer to six, and then lie awake long enough that the bed starts to feel like the place where wakefulness happens. Cognitive behavioral therapy for insomnia, usually shortened to CBT-I, handles that problem by working with recent sleep-diary evidence instead of wishful bedtime targets.
A sleep window is the allowed time in bed between the planned bedtime and a fixed wake time. It is not a promise that sleep will fill the whole window on the first night. The early goal is consolidation: reduce the mismatch between time in bed and actual sleep, protect the same wake anchor each morning, and then adjust in small steps after a representative review period.
- Total sleep time
- The amount of sleep actually obtained, usually averaged from a sleep diary rather than guessed from memory.
- Time in bed
- The planned opportunity for sleep, counted from bedtime to the fixed wake time.
- Sleep efficiency
- Total sleep time divided by time in bed, expressed as a percentage.
- Wake anchor
- The wake time kept steady enough that bedtimes can be counted backward from it.
Sleep-window planning is useful because it makes the tradeoff visible. A wide window may feel safer because it gives more time to catch sleep, but it can also leave long awake stretches in bed. A narrow window can build sleep pressure and raise sleep efficiency, yet it can also increase daytime sleepiness if pushed too hard. The useful range sits between those risks, and that range depends on the diary average, the minimum window, the size of each adjustment, and daytime safety.
Weekly review matters more than a single night. CBT-I sleep restriction and sleep opportunity adjustment protocols commonly widen, hold, or tighten time in bed from sleep efficiency patterns, usually in modest increments. A week with strong efficiency and tolerable daytime sleepiness may support a larger window. Low efficiency, poor adherence, naps, wake-time drift, or safety concerns often means holding the schedule and checking the diary before making it stricter.
Sleep restriction can temporarily increase daytime sleepiness. People with seizure risk, bipolar disorder or mania risk, parasomnias, untreated or suspected sleep apnea, severe daytime sleepiness, very short sleep, or safety-sensitive driving or machinery duties should work with a qualified clinician before changing time in bed.
How to Use This Tool:
Use a recent diary average first, then add review fields only after trying the schedule for several nights.
- Choose a
Presetif you want a seeded example, or keepCustomfor your own sleep diary values. - Enter
Baseline total sleep timeas decimal hours. The accepted range is 3 to 10 hours, and the nearby slider lets you test small changes without retyping. - Set
Fixed wake time. TheStarting windowsummary and sleep-window rail should show a bedtime, wake time, planned window length, floor, and step size. - Set
Sleep efficiency goalfrom 70% to 98%. This creates the goal gap and chart reference line, but the starting recommendation still respects the baseline and safety floor. - Open
Advancedwhen you need a current-schedule comparison or a supervised boundary.Current bedtimeadds the shift badge and current projected efficiency;Minimum window,Maximum window,Window step,Rounding mode, andMax restrictionchange candidate windows. - After a trial period, add
Observed weekly efficiencyandDaytime sleepiness. TheAdjustment Ladderthen shows whether the next step is expansion, holding, auditing, tightening, or staying at the floor. - If results disappear or show blank clock values, fix
Fixed wake timefirst, then check that the maximum window is above the minimum window and that numeric fields stay inside their displayed ranges.
Interpreting Results:
Starting window is the first schedule candidate, not a diagnosis or a full CBT-I treatment plan. Read the recommended bedtime with the projected sleep efficiency, safety-floor badge, current-schedule shift, and review cadence. A later bedtime may improve the projected percentage while also creating a harder first-week change.
Window Scenarios compares possible sleep windows while the wake time stays fixed. Shorter windows usually produce higher projected sleep efficiency because the same baseline sleep amount is divided by fewer minutes in bed. The CBT-I Window Zone Map shows that tradeoff visually with the goal line and 80%, 85%, and 90% review bands.
Projected SEabove 100% means the window is shorter than the baseline sleep amount entered. Treat it as a tight-window warning, not a real sleep-quality score.Observed weekly efficiencyis stronger than projected efficiency because it comes from the schedule after use.Significant cautioninDaytime sleepinessshould make the review more conservative, even when the observed percentage looks good.- Before following a recommendation, verify the diary average, wake anchor, current bedtime shift, floor, and whether driving or work safety would be affected.
Technical Details:
Sleep efficiency is a ratio between actual sleep and allowed time in bed. In sleep-window planning, total sleep time comes from a recent diary average, while time in bed is the clock interval from bedtime to wake time. The same six hours of sleep can look very different inside a seven-hour window than inside a nine-hour window because the ratio changes even before sleep itself improves.
The starting window is baseline-first. The diary average is rounded onto the selected step grid and protected by a floor. That floor is whichever is larger: the selected minimum window or the baseline sleep time minus the maximum allowed restriction. Counting the final window backward from the fixed wake time gives the bedtime.
Formula Core:
The main equation is sleep efficiency. The window rule then applies the safety floor, step rounding, and clock subtraction.
With baseline total sleep time at 6.1 hours, the baseline is 366 minutes. A 5-hour minimum window is 300 minutes, and a 90-minute maximum restriction gives a second floor of 276 minutes. The floor is therefore 300 minutes. With 15-minute nearest rounding, the baseline-derived starting window snaps to 360 minutes, so a 07:00 wake time produces a 01:00 bedtime.
| Observed or projected efficiency | Band label | Review meaning |
|---|---|---|
| < 80% | Tighten review | Low consolidation. Consider tightening only if the week was representative, adherence was good, and the floor is not already reached. |
| 80% to 84.9% | Hold and audit | Borderline consolidation. Hold the window while checking wake drift, naps, diary gaps, and prolonged awake time. |
| 85% to 89.9% | Hold | Stable range. Keep the current window and review again after the selected cadence. |
| ≥ 90% | Expansion review | Strong consolidation. Consider expanding by one step only when daytime sleepiness is stable or manageable. |
Candidate rows are generated from the safety floor through the maximum window in the selected step size. Each row keeps the wake time fixed, calculates a bedtime, projects sleep efficiency from the baseline, reports the gap from the selected goal, and labels the review band. When a valid current bedtime creates a shorter floor-safe window that projects to at least the higher of 85% or the selected goal, that current schedule can become the recommended starting point instead of a wider rounded baseline window.
| Input or setting | Accepted range or choices | Effect on calculation |
|---|---|---|
Baseline total sleep time | 3 to 10 hours | Sets the baseline for the starting window and projected efficiency. |
Sleep efficiency goal | 70% to 98% | Sets the goal gap and chart reference line. |
Minimum window | 4 to 8 hours | Creates the configured lower bound before the maximum-restriction floor is compared. |
Maximum window | 5 to 10 hours | Caps the scenario list and expansion candidate. |
Window step | 10, 15, 20, or 30 minutes | Controls rounding, scenario spacing, and one-step expansion or tightening moves. |
Rounding mode | Nearest, down, or up | Snaps the baseline-derived window to the selected step grid. |
Max restriction | 30 to 180 minutes | Prevents the floor from dropping too far below baseline sleep time. |
Adaptation cadence | 5, 7, or 10 nights | Sets the review timing shown in the plan and adjustment rows. |
Limitations and Safety Notes:
The calculator assumes you already have a reliable sleep-diary average and, for review mode, a representative observed weekly sleep-efficiency value. It does not diagnose insomnia, screen for obstructive sleep apnea, decide whether sleep restriction is medically appropriate, or replace clinician-guided CBT-I.
- A projected efficiency value is a planning estimate based on the baseline sleep amount.
- One unusually good or bad night should not drive a window change.
- Daytime sleepiness, driving risk, mood symptoms, seizure risk, parasomnias, and suspected sleep apnea should override arithmetic recommendations.
- Copied tables, downloaded files, and JSON output include the times and sleep values you entered, so handle them as personal health information.
Worked Examples:
First-week planning. With Baseline total sleep time at 6.1 hours, Fixed wake time at 07:00, and Current bedtime at 23:30, the Starting window is 6h from 01:00 to 07:00. The current 7h 30m schedule projects near 81.3%, so the shift badge makes the bedtime move explicit before the first trial week.
Expansion after a strong week. A 5.8-hour baseline, 06:30 wake time, Observed weekly efficiency of 91.2%, and Stable / manageable sleepiness put the review in expansion territory. The Adjustment Ladder suggests one step wider, not a large jump back to a long time-in-bed schedule.
Low efficiency with safety concerns. A 5.4-hour baseline, 07:00 wake time, observed weekly efficiency of 79.2%, and Significant caution sleepiness should not be treated as a simple tighten signal. The useful next read is the hold-and-audit guidance: check adherence, wake drift, naps, diary quality, and daytime safety before making the window stricter.
Blank or odd output. If the Window Scenarios table does not populate, the most likely problem is an invalid Fixed wake time. If Projected SE exceeds 100%, the chosen window is shorter than the baseline sleep amount, so treat the number as a tight-window warning rather than a literal result.
FAQ:
Why does the wake time stay fixed?
A fixed wake time gives the schedule a stable clock anchor. Bedtime can move later or earlier as the window changes, but the wake anchor keeps the review comparable from week to week.
Why can projected sleep efficiency go above 100%?
The calculation divides baseline sleep time by the candidate window. If the window is shorter than the baseline sleep amount, the arithmetic can exceed 100%. That means the window is tight, not that sleep quality can exceed 100%.
Does the sleep-efficiency goal choose the starting window?
Not by itself. The starting window comes from baseline sleep, rounding, and the safety floor. The goal mostly affects the goal gap, chart line, and current-schedule comparison.
What does daytime sleepiness change?
Daytime sleepiness changes how aggressively the observed weekly result should be used. Significant caution should block expansion language and may make holding safer than tightening.
Can one bad night set the next sleep window?
No. The observed efficiency field is meant for a representative diary period. One bad night can make the schedule too reactive and may push time in bed lower than the week supports.
Is this a substitute for CBT-I care?
No. It is a planning calculator for sleep-window arithmetic and review cues. CBT-I decisions should account for diagnosis, safety risks, comorbid conditions, medications, symptoms, and clinician guidance.
Glossary:
- CBT-I
- Cognitive behavioral therapy for insomnia, a structured treatment that combines behavioral sleep changes with cognitive and educational work.
- Sleep window
- The allowed time in bed between planned bedtime and fixed wake time.
- Total sleep time
- The amount of sleep actually obtained during the night or averaged across a diary period.
- Time in bed
- The full interval from getting into bed for sleep to getting out of bed at the wake anchor.
- Sleep efficiency
- Total sleep time divided by time in bed, expressed as a percentage.
- Safety floor
- The shortest window allowed after the minimum-window and maximum-restriction rules are applied.
- Wake anchor
- The fixed wake time used to calculate bedtimes and compare schedule changes.
References:
- Understanding CBT-I: Limiting Your Time in Bed, Veterans Health Library, reviewed February 1, 2025.
- The Management of Chronic Insomnia Disorder and Obstructive Sleep Apnea, VA/DoD Clinical Practice Guidelines, 2025.
- New guideline supports behavioral, psychological treatments for insomnia, American Academy of Sleep Medicine.
- Behavioral and Psychological Treatments for Chronic Insomnia Disorder in Adults: Patient Guide, American Academy of Sleep Medicine.
- Sleep Alteration Instructions, University of Pennsylvania, April 1, 2021.