Current diary snapshot
{{ formatPercent(avgEfficiency) }}
Average sleep efficiency across {{ entries.length }} night(s)
Avg TST {{ formatHours(avgTstHours) }} Avg TIB {{ formatHours(avgTibHours) }} SOL/WASO {{ formatMinutes(avgSolMinutes) }} / {{ formatMinutes(avgWasoMinutes) }} 7-night SE {{ formatPercent(rollingSevenEfficiency) }} Trend {{ trendLabel }} {{ riskBand }}
{{ step.label }}
{{ entryCompletionPct }}%
{{ entryCheckInAria }}
Use the date the sleep period began, even if wake-up was after midnight.
Enter local clock time in HH:MM.
Use the final rise time for the day, not brief awakenings.
Set the intended final rise time, such as 07:00.
{{ formatMinutes(entry.sol_min) }}
Enter 0-300 minutes before first sleep onset.
min
{{ formatMinutes(entry.waso_min) }}
Enter 0-360 minutes awake after initially falling asleep.
min
{{ formatFixed(entry.awakenings, 0) }}
Enter 0-20 remembered awakenings.
{{ formatMinutes(entry.nap_min) }}
Enter 0-300 total nap minutes for the same calendar date.
min
Choose 1 very poor through 5 very good.
{{ efficiencyGoalValue }}%
Typical CBT-I target is 85%; accepted range is 60-100%.
%
Choose how many recent nights stay in this browser: 14, 28, 56, or 90.
Turn on only when your CBT-I review plan includes daytime naps.
{{ include_naps === '1' ? 'Included' : 'Excluded' }}
Choose every 3 nights, weekly, or biweekly for guidance wording.
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.

                
Customize
Advanced
:

Introduction:

A CBT-I sleep diary records the night as the sleeper experienced it: when they went to bed, how long sleep seemed to take, how much time was spent awake after first falling asleep, and when they finally got out of bed. Cognitive behavioral therapy for insomnia uses that kind of repeated record because insomnia patterns are easier to understand across several nights than from one memorable bad night.

The central measure is sleep efficiency, the share of time in bed that became sleep. It is not a judgment of the person or the entire treatment plan. It is a practical signal for whether the sleep window is being used efficiently, whether wake time is still crowding the night, and whether the wake schedule is staying anchored.

Bed Out of bed SOL TST WASO time in bed is the denominator for sleep efficiency

Wake timing matters alongside efficiency. A night can show a strong efficiency percentage while the final rise time drifts later than the intended wake target. That difference is important in CBT-I review because a stable wake anchor often matters before bedtime or sleep-window changes are interpreted.

The diary is a tracking aid, not a diagnosis engine. It can summarize sleep efficiency, wake drift, trend, and review priorities, but clinical decisions should account for symptoms, safety, medication, sleep apnea risk, mental health context, and guidance from a qualified clinician.

How to Use This Tool:

Use the diary as a repeated review cycle rather than a single-night verdict.

  1. Set Wake target first. It anchors wake drift, regularity, and several review-plan warnings.
  2. Open Advanced when you need to change Sleep efficiency goal, Retain nights, Include naps in sleep balance, or Review cadence. The goal slider keeps common CBT-I thresholds easy to tune while the number box still allows an exact value.
  3. Enter Night date, Bedtime, and Out-of-bed time. Use the date the sleep period began, even if wake-up happened after midnight.
  4. Enter Sleep onset latency, Wake after sleep onset, Number of awakenings, Nap time, and Sleep quality. Use the sliders for fast adjustment and the number boxes when the diary needs an exact minute or count.
  5. Watch the check-in rail. It reaches 100% when the current date, clock times, awake-minute fields, and quality rating are ready to save.
  6. Press Save. If the row does not save, correct the visible error. The most important validation rule is that SOL plus WASO must be less than total time in bed.
  7. After several nights, read Diary Metrics, CBT-I Review Plan, and Sleep Efficiency Trend. The review plan is most useful after a pattern exists, not after one entry.
  8. Use Reset only to clear the entry form. Existing saved rows remain until the retention setting trims them or the browser data is cleared.

Interpreting Results:

Start with the snapshot rather than one row. Average sleep efficiency, average total sleep time, average time in bed, the seven-night efficiency line, trend, and risk band are diary-level signals. They help show whether the current sleep window is stabilizing or simply producing scattered good and bad nights.

Sleep efficiency answers how much of the recorded time in bed became sleep. Wake drift answers whether the final rise time is staying close to the selected wake target. Regularity turns recent wake drift into a 0 to 100 score, where higher means tighter wake-time consistency.

Trend is a slope across nightly efficiency values, not a one-night jump. Rising begins at +0.18 percentage points per night, Falling begins at -0.18, and the quickly labels appear at +/-0.45. A strong single night can still sit inside a flat or falling trend.

The common false-confidence error is to treat one good efficiency row or one better quality rating as proof that the week is stable. Confirm the impression by checking whether wake drift is also tightening and whether the seven-night line is moving with the nightly points.

Technical Details:

Each saved row starts with two clock times. Bedtime and final out-of-bed time define time in bed, and the interval carries across midnight when needed. Sleep onset latency and wake after sleep onset are then subtracted to produce total sleep time. If those awake minutes equal or exceed time in bed, the row is rejected because the night is internally inconsistent.

Diary-level metrics are built from the saved rows. The seven-night efficiency line uses the most recent seven rows when available. Wake drift is measured against the selected target wake time. Regularity is based on the recent average of absolute wake drift, while the pressure index blends wake burden with average efficiency. Subjective sleep quality stays separate on a 1 to 5 scale.

Formula Core

The central quantities are total sleep time, sleep efficiency, wake regularity, and pressure.

TST = TIB-SOL-WASO SE = 100×TSTTIB Regularity = clamp(100-1.9×mean(|wake drift|),0,100) Pressure = clamp(SOL+WASO2×60180+0.4(100-SE),0,100)
Sleep diary symbols and meanings
Symbol Meaning Unit How it is used
TIB Time in bed from bedtime to final out-of-bed time minutes or hours Starting span for nightly calculations.
SOL Sleep onset latency minutes Awake minutes before first sleep.
WASO Wake after sleep onset minutes Awake minutes after first sleep onset.
TST Total sleep time minutes or hours TIB after removing SOL and WASO.
SE Sleep efficiency percent Used in the snapshot, chart, trend, and review logic.
Wake drift Actual final rise time minus target wake time minutes Feeds recent drift and regularity.

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%. If the wake target is 07:00 and the final rise time is 07:00, wake drift is 0 minutes.

Sleep diary thresholds and review rules
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 nights, not a one-night jump.
Low relapse risk Average efficiency at or above goal, Regularity ≥ 75, and Pressure ≤ 35. A stable diary-level signal, not a clinical diagnosis.
Moderate relapse risk Efficiency no more than 4 points below goal, Regularity ≥ 60, and Pressure ≤ 55. A caution state that still needs monitoring.
High relapse risk Any diary state outside the low and moderate rules. Review the weak metric before changing the sleep window.
Review plan Priorities appear when efficiency is below goal, recent wake drift exceeds 40 minutes, trend is falling, SOL is above 30 minutes, or WASO is above 45 minutes. Cadence changes priority weighting, not the underlying diary rows.

Nap minutes can be added to effective sleep totals when that setting is enabled, but sleep efficiency itself remains nocturnal TST divided by nocturnal TIB. That keeps the main efficiency number comparable across nights with and without naps.

Privacy Notes:

The diary rows are kept in the current browser profile so the same device can restore them later. The main calculations, trend chart, CSV output, document export, and JSON snapshot are produced in the browser.

Use caution on shared devices because local browser data may remain available to another person using the same profile. Clear the browser's site data if diary entries should no longer be retained.

Worked Examples:

Efficiency below goal even with a consistent bedtime

A night from 23:45 to 07:00 gives 7.25 hours in bed. If SOL is 35 minutes and WASO is 50 minutes, total sleep time is about 5.83 hours and sleep efficiency is about 80.5%. With an 85% goal, the review priority should stay focused on improving efficiency before expanding time in bed.

High efficiency with wake drift

A night from 00:15 to 08:00 with SOL 15 and WASO 20 can produce sleep efficiency around 92.5%. Against a 07:00 wake target, it also carries +60 minutes of wake drift. The diary can therefore show efficient sleep while regularity still warns that the schedule is sliding later.

When the entry fails validation

If Bedtime is 23:50, Out-of-bed time is 00:20, SOL is 20, and WASO is 20, 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 final rise time or the awake-minute estimates before saving.

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 seven-night line and wake-drift pattern can show whether a change is sustained or just a single-night fluctuation.

Does Include naps in sleep balance change SE%?

No. Sleep efficiency stays tied to nocturnal total sleep time and time in bed. The nap switch only changes effective sleep totals in the saved row and structured snapshot.

Why is the same risk band shown for each row?

Risk is computed from the current diary averages, recent wake drift, and pressure index. It summarizes the diary as a whole, not each individual night.

Why did a starter diary appear?

When no stored rows exist, sample nights are loaded so the chart and result panes are visible immediately. Replace those sample rows with your own nights before drawing conclusions.

Why will an entry not save?

Required date and clock fields must be present, 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.

Glossary:

Time in bed
The interval from getting into bed with the intention to sleep to the final out-of-bed time.
Total sleep time
Nocturnal sleep after subtracting sleep-onset latency and wake-after-sleep-onset minutes 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 chosen wake target.
Regularity score
A 0 to 100 score derived from recent absolute wake drift.
Pressure index
A tool-specific index that rises when wake burden increases and average sleep efficiency falls.

References: