CBT-I Sleep Diary Tracker
Track CBT-I sleep diary nights, calculate sleep efficiency and wake drift, review trends, and keep saved rows in the current browser.Current diary snapshot
Tracking status
| Date | Bed | Up | TIB (h) | TST (h) | SOL | WASO | Awake # | SE % | Quality | Nap | Wake drift | 7-night SE | Regularity | Risk | Copy |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ row.date }} | {{ row.bedtime }} | {{ row.out_of_bed }} | {{ formatFixed(row.tib_hours, 2) }} | {{ formatFixed(row.tst_hours, 2) }} | {{ formatFixed(row.sol_min, 0) }} | {{ formatFixed(row.waso_min, 0) }} | {{ formatFixed(row.awakenings, 0) }} | {{ formatFixed(row.sleep_efficiency, 1) }} | {{ qualityLabel(row.quality) }} | {{ formatFixed(row.nap_min, 0) }} | {{ formatFixed(row.wake_drift_minutes, 0) }} | {{ formatFixed(rollingSevenEfficiency, 1) }} | {{ formatFixed(regularityScore, 0) }} | {{ riskBand }} |
| Priority | Action | Why now | Checkpoint | Metric focus | Copy |
|---|---|---|---|---|---|
| {{ row.priority }} | {{ row.action }} | {{ row.reason }} | {{ row.checkpoint }} | {{ row.metric }} | |
|
No review plan is available
Add at least one diary entry to generate CBT-I review guidance.
|
|||||
Introduction:
CBT-I sleep diaries make insomnia patterns visible in a way memory rarely can. A difficult night often feels larger than the week around it, while a better night can make the whole schedule seem fixed. Writing down the same core sleep details each morning turns those impressions into a sequence: time in bed, time awake before sleep, awake time during the night, final rise time, naps, and perceived sleep quality.
Cognitive behavioral therapy for insomnia, often shortened to CBT-I, uses that sequence to support behavior changes such as a stable wake time, stimulus control, and carefully managed time in bed. The point is not to prove that every night was good or bad. The diary helps separate several questions that people often blend together: how long the sleep window was, how much of it became sleep, whether the wake time stayed anchored, and whether the sleeper felt safe and functional the next day.
- Time in bed
- The span from getting into bed with the intention to sleep until the final out-of-bed time.
- Total sleep time
- The estimated sleep inside that span after subtracting sleep-onset latency and wake after sleep onset.
- Sleep efficiency
- The percentage of time in bed that was spent asleep.
- Wake anchor
- The intended final rise time used to judge whether the schedule is drifting earlier or later.
Sleep efficiency is useful because spending more hours in bed does not always create better sleep. In chronic insomnia, extra time lying awake can weaken sleep pressure, make the bed feel linked with alertness, and blur the signal used to adjust a sleep window. Many CBT-I programs treat efficiency near 85% as a practical review point, but that number is a guide rather than a diagnosis. A person can reach a strong efficiency percentage and still have too little total sleep, unsafe daytime sleepiness, a delayed wake pattern, or symptoms that need medical review.
Wake timing deserves the same attention as efficiency. A late final rise time can make a night look efficient while the schedule is sliding away from the intended wake anchor. Naps can also change how the next night feels, especially when a CBT-I plan is trying to rebuild sleep pressure. Those details do not make naps or schedule changes good or bad by themselves, but they explain why diaries are reviewed as patterns instead of isolated rows.
A sleep diary cannot diagnose insomnia, sleep apnea, bipolar disorder, medication effects, restless legs, or another cause of poor sleep. It is best read as structured self-monitoring that can support a CBT-I conversation. People with severe daytime sleepiness, safety-sensitive work or driving, very short sleep, epilepsy, parasomnias, bipolar disorder, suspected sleep apnea, or worsening mental health should use CBT-I schedule changes only with qualified clinical guidance.
How to Use This Tool:
Use the tracker as a repeated review cycle, not as a verdict on one night.
- Set Wake target first. It anchors wake drift, recent regularity, and the review-plan warnings that depend on final rise time.
- Open Advanced when the plan needs a different Sleep efficiency goal, Retain nights window, Include naps in sleep balance setting, or Review cadence.The default efficiency goal is 85%, and accepted goal values run from 60% to 100%. Change the goal only when it matches the CBT-I review plan being followed.
- Enter Night date, Bedtime, and Out-of-bed time. Use the date the sleep period began, even when waking happened after midnight.
- Add Sleep onset latency, Wake after sleep onset, Number of awakenings, Nap time, and Sleep quality. The sliders are convenient for estimates, while the number boxes are better when a diary already has exact minutes.
- Watch the check-in rail reach 100%, then press Save. If saving fails, correct the visible error. The key consistency rule is that SOL plus WASO must be less than total time in bed.A common failed entry has a short bed window but awake minutes that are too large. Fix the clock times or awake estimates before pressing Save again.
- Review Diary Metrics after several nights. The table shows each saved night with TIB, TST, SE %, wake drift, recent 7-night SE, regularity, and the current risk band.
- Compare CBT-I Review Plan with Sleep Efficiency Trend. A review priority is more convincing when the same issue appears in the table, the trend line, and the summary badges.
Interpreting Results:
Start with the diary snapshot. Average sleep efficiency, average total sleep time, average time in bed, recent 7-night SE, trend, and risk band describe the current set of saved nights. A single row can explain what happened last night, but it should not override the longer pattern.
Sleep efficiency shows how much recorded time in bed became sleep. Wake drift shows how far the final rise time moved from the selected wake target. Regularity score converts recent absolute wake drift into a 0 to 100 score, where higher means the final rise time stayed closer to the anchor.
Trend is based on the slope across nightly efficiency values. Rising begins at +0.18 percentage points per night, Rising quickly at +0.45 or higher, Falling at -0.18 or lower, and Falling quickly at -0.45 or lower. One good night can still sit inside a stable or falling trend if earlier and later rows do not support the change.
Treat the relapse-risk label as a diary heuristic. It combines average efficiency, recent regularity, and pressure index, so it can warn about a fragile pattern even when the latest night looks good. The most common false-confidence error is to celebrate a strong SE % while ignoring wake drift, short total sleep time, or daytime sleepiness.
Technical Details:
A diary row starts with two clock times: bedtime and final out-of-bed time. Their difference becomes time in bed, with overnight spans carried across midnight. Sleep onset latency and wake after sleep onset are awake-minute estimates inside that span. When those two awake values equal or exceed time in bed, the entry is rejected because it cannot produce a possible total sleep time.
Diary-level values are rebuilt from the saved rows. The recent efficiency line uses up to the latest seven rows, wake drift is measured against the selected target wake time, and regularity is based on recent absolute wake drift. The pressure index blends the average awake-minute burden with average sleep efficiency, so it rises when nights include more wakefulness or less efficient sleep.
Formula Core
The central arithmetic keeps nocturnal sleep efficiency separate from optional nap balance.
| Symbol or term | Meaning | Unit | Where it appears |
|---|---|---|---|
| TIB | Time in bed from bedtime to final out-of-bed time | minutes or hours | Diary Metrics and Formula Core |
| SOL | Sleep onset latency before first sleep | minutes | Diary Metrics and wake-burden checks |
| WASO | Wake after sleep onset | minutes | Diary Metrics and wake-burden checks |
| TST | Total sleep time after subtracting SOL and WASO from TIB | minutes or hours | Diary Metrics, exports, and SE % |
| SE | Sleep efficiency, calculated as TST divided by TIB | percent | Summary, table, trend chart, and review plan |
| Wake drift | Final rise time minus the selected wake target | minutes | Diary Metrics, regularity, and review plan |
For a night from 23:30 to 07:00, TIB is 450 minutes. If SOL is 25 minutes and WASO is 40 minutes, TST is 385 minutes and sleep efficiency is 100 x 385 / 450 = 85.6%. With a 07:00 wake target and a 07:00 final rise time, wake drift is 0 minutes.
| Field | Accepted range or format | Reason for the limit |
|---|---|---|
| Night date | YYYY-MM-DD date | Orders rows and anchors trends. |
| Bedtime and out-of-bed time | 24-hour HH:MM clock time | Defines TIB, including overnight spans. |
| SOL | 0 to 300 minutes | Keeps pre-sleep awake time plausible for a diary row. |
| WASO | 0 to 360 minutes | Caps awake minutes after first sleep onset. |
| Awakenings | 0 to 20 | Adds fragmentation context without changing TST directly. |
| Nap time | 0 to 300 minutes | Supports optional daytime sleep balance. |
| Sleep quality | 1 very poor to 5 very good | Keeps subjective quality separate from efficiency arithmetic. |
| Output or trigger | Rule | How to read it |
|---|---|---|
| Trend | Rising quickly at ≥ +0.45, Rising at ≥ +0.18, Falling at ≤ -0.18, and Falling quickly at ≤ -0.45 percentage points per night. | A slope across saved nights, not a one-night change. |
| Low relapse risk | Average SE at or above goal, Regularity ≥ 75, and Pressure ≤ 35. | A stable diary signal, not a clinical relapse prediction. |
| Moderate relapse risk | Average SE no more than 4 points below goal, Regularity ≥ 60, and Pressure ≤ 55. | A caution state where the weak metric should be reviewed. |
| High relapse risk | Any saved diary state outside the low and moderate rules. | A prompt to inspect efficiency, wake drift, and wake burden before schedule changes. |
| Review plan | Priorities appear when average SE is below goal, recent wake drift exceeds 40 minutes, trend is falling, SOL is above 30 minutes, or WASO is above 45 minutes. | Review cadence changes priority weighting, not the saved diary rows. |
Nap minutes can be included in effective sleep totals for the structured snapshot, but nocturnal sleep efficiency remains TST divided by TIB. Keeping those quantities separate makes nights with and without naps easier to compare.
Limitations and Privacy Notes:
Sleep diary values are estimates. They depend on morning recall, consistent definitions, and honest logging. A diary can support CBT-I review, but it cannot replace a clinician, a safety assessment, or testing when symptoms suggest another sleep or medical condition.
- Use extra caution with sleep restriction or fixed schedule changes if daytime sleepiness affects driving, work, caregiving, or other safety-sensitive tasks.
- Ask for clinical guidance before CBT-I schedule changes when there is suspected sleep apnea, bipolar disorder, epilepsy, parasomnias, severe anxiety, very short sleep, or worsening mental health.
- The saved diary rows are kept in the current browser profile. Calculations, charting, CSV, document, and JSON outputs are produced in the browser, so shared devices should be treated as shared diary storage unless site data is cleared.
Advanced Tips:
- Keep Wake target stable while comparing rows. Changing the target changes wake drift and regularity, so old and new rows become harder to compare.
- Use Retain nights to match the review horizon. Seven nights emphasizes recent change, while longer windows smooth short disruptions and travel days.
- Turn on Include naps in sleep balance when the review needs total daytime-plus-night sleep context, but keep the main SE % tied to nocturnal TST and TIB.
- Compare Average SE, 7-night SE, Regularity score, and Pressure index before changing time in bed. A single strong row can hide schedule drift or elevated wake burden.
- Use Every 3 nights review cadence only when the plan truly calls for closer monitoring. More frequent review can overreact to one unusual night.
Worked Examples:
Efficiency below goal with a consistent wake time
A night from 23:45 to 07:00 gives 7.25 hours in bed. With SOL at 35 minutes and WASO at 50 minutes, Diary Metrics shows about 5.83 hours of TST and about 80.5% SE. If the sleep efficiency goal is 85%, the row is below goal even though the final rise time stayed on target.
Strong efficiency with schedule drift
A night from 00:15 to 08:00 with 15 minutes of SOL and 20 minutes of WASO produces about 92.5% SE. Against a 07:00 wake target, Wake drift is +60 minutes. The diary can therefore show efficient sleep while Regularity score and the review plan still warn that the schedule is sliding later.
A row that fails validation
If Bedtime is 23:50, Out-of-bed time is 00:20, SOL is 20 minutes, and WASO is 20 minutes, time in bed is only 30 minutes while awake minutes total 40. The row cannot describe a possible night, so the fix is to correct the clock times or the awake-minute estimates before pressing Save again.
FAQ:
How many nights should I enter before trusting a trend?
Several nights are better than one. A week is often more useful because the 7-night SE line and wake-drift pattern can show whether a change is sustained or just one unusual night.
Does Include naps in sleep balance change SE %?
No. SE % stays tied to nocturnal total sleep time and time in bed. The nap switch affects effective sleep totals in the structured snapshot, not the main sleep efficiency calculation.
Why is the same risk band shown for every row?
The risk band is computed from the current saved diary averages, recent wake drift, and pressure index. It describes the diary as a whole, not each individual night.
Why did starter diary rows appear?
When no stored rows exist, a 7-night starter diary is loaded so the table, chart, and review plan are visible immediately. Replace those sample rows with your own nights before drawing conclusions.
Why will an entry not save?
The date and clock fields must be valid, and SOL plus WASO must fit inside time in bed. If the awake total is too large for the recorded interval, correct the times or minutes before saving.
Can this replace CBT-I guidance from a clinician?
No. It can organize diary data and highlight review priorities, but medication, safety risk, sleep apnea symptoms, mental health history, and formal sleep-window changes should be handled with qualified clinical support.
Glossary:
- CBT-I
- Cognitive behavioral therapy for insomnia, a structured behavioral treatment for chronic insomnia.
- Time in bed
- The interval from getting into bed intending to sleep to the final out-of-bed time.
- Total sleep time
- Estimated nocturnal sleep after subtracting SOL and WASO from time in bed.
- Sleep onset latency
- Minutes spent awake before first falling asleep.
- Wake after sleep onset
- Awake minutes after initial sleep begins and before the final rise time.
- Sleep efficiency
- Total sleep time divided by time in bed, expressed as a percentage.
- Wake drift
- The difference between actual final out-of-bed time and the selected wake target.
- Pressure index
- A diary index that rises when average wake burden increases and average sleep efficiency falls.
References:
- The Consensus Sleep Diary: Standardizing Prospective Sleep Self-Monitoring, SLEEP, 2012.
- Insomnia Treatment, National Heart, Lung, and Blood Institute, March 24, 2022.
- Understanding CBT-I: Limiting Your Time in Bed, Veterans Health Library, February 1, 2025.
- Behavioral Treatments, Harvard Medical School Division of Sleep Medicine, October 1, 2021.
- Psychological and Physical Approaches for Sleep Disorders: What the Science Says, National Center for Complementary and Integrative Health, March 2024.