Sleep Debt Calculator
Calculate sleep debt from a 7- or 14-night log, with gross deficit, oversleep credit, recovery-day estimates, and bedtime targets.Recent balance
Current result
| Metric | Value | Copy |
|---|---|---|
| {{ metric.label }} | {{ metric.value }} |
| Night | Slept | Need | Deficit | Surplus | Credit | Net change | Cum. debt | Copy |
|---|---|---|---|---|---|---|---|---|
| {{ r.label }} | {{ formatFixed(r.slept, 2) }} | {{ formatFixed(r.need, 2) }} | {{ formatFixed(r.deficit, 2) }} | {{ formatFixed(r.surplus, 2) }} | {{ formatFixed(r.creditApplied, 2) }} | {{ formatSignedHours(r.netChange, 2) }} | {{ formatFixed(r.cumDebt, 2) }} |
| Lane | Night extra | Nap | Capacity | Days | Pace | Bedtime target | Note | Copy |
|---|---|---|---|---|---|---|---|---|
|
{{ lane.label }}
|
{{ formatFixed(lane.nightExtra, 2) }} h | {{ formatFixed(lane.napExtra, 2) }} h | {{ formatFixed(lane.recoveryCapacity, 2) }} h | {{ lane.isRecoverable ? formatFixed(lane.estimatedDays, 2) : 'Infinity' }} | {{ lane.paceLabel }} | {{ lane.bedtimeTarget || 'Set wake anchor' }} | {{ lane.note }} | |
| Day {{ r.day }} | {{ formatFixed(r.nightExtra, 2) }} h | {{ formatFixed(r.napExtra, 2) }} h | {{ formatFixed(r.nightExtra + r.napExtra, 2) }} h | {{ formatFixed(r.remaining, 2) }} h | Catch-up day | Use selected recovery lane | Remaining sleep debt after this day. |
Sleep debt is the shortfall between the sleep someone needs and the sleep they actually get across a recent stretch of nights. One late night is easy to notice, but repeated small losses often matter more because they add up before the person realizes their alertness, mood, reaction time, and schedule control have changed.
Sleep need is not a fixed universal number. Age, recent illness, stress, training load, caregiving, shift work, medications, pregnancy, sleep quality, and sleep timing can all change how much sleep leaves someone alert the next day. Public guidance gives useful starting ranges, such as more sleep for teens and at least seven hours for most adults, but a personal target still has to be checked against daytime sleepiness and the ability to keep a steady schedule.
The word debt is useful for arithmetic, but it is not a perfect repayment model. A longer night or nap can reduce sleepiness and lower a recent ledger, yet it may not reset circadian timing, restore missed deep sleep, or erase safety risk after several short nights. Weekend rebound sleep can also push bedtimes and wake times later, making the next work or school night harder.
| Situation | What usually changes | Common mistake |
|---|---|---|
| Busy workweek | Several small nightly shortfalls add up quietly. | Treating one rested-feeling morning as proof the whole week is repaid. |
| Weekend rebound | Longer later nights can reduce a recent balance. | Assuming late wake times have no effect on the next sleep schedule. |
| Shift work or caregiving | The sleep opportunity may be split, irregular, or forced into daylight. | Comparing the total hours without considering timing and sleep quality. |
| Persistent tiredness | Sleep quality, snoring, insomnia, medications, or medical issues may dominate the hour count. | Using a small recent debt number to ignore ongoing symptoms. |
A recent sleep-debt estimate is best treated as a planning aid alongside symptoms and schedule context. It can show whether a schedule has been running short, where the shortfall came from, and how much extra sleep a catch-up plan assumes. It cannot diagnose insomnia, sleep apnea, circadian rhythm disorders, medication effects, or the safety of driving while sleepy. Persistent fatigue, loud snoring with breathing pauses, unsafe drowsiness, or long-running insomnia needs professional context.
How to Use This Tool:
Start by making the recent log believable. After the debt number matches the sleep pattern you meant to enter, use the recovery controls to compare catch-up plans.
- Set
Sleep needin hours per night. UseTeen guide,Adult guide, orOlder adult guideonly as a starting value, then adjust the target if your usual rested amount is different. - Choose
7 nightsor14 nights. The night rows run fromLast nightbackward, so keep the newest sleep entry at the top. - Enter sleep as decimal hours, such as
6.5for 6 hours 30 minutes. If the balance looks too high or too low, compare the bars in the sleep balance strip with the numbers you entered before reading the result tables. - Use
Round entries to nearestwhen your log is approximate. A 15-minute rounding rule can make handwritten or wearable-derived entries easier to compare, whileOffkeeps the typed decimal values. - Decide how strict the ledger should be.
Allow oversleep creditlets longer later nights reduce existing debt, andNightly deficit caplimits how much one unusually short night can add. - Set
Max extra per day,Nap allowance, and optionalWake anchorafter the debt estimate looks right. Those fields driveCatch-up days (est.),Recovery Lanes, and any bedtime target. - When a result is surprising, check
Total slept (rounded),Gross deficit,Oversleep credit applied,Credit mode, andRounding rule. Those outputs usually reveal whether the target, horizon, cap, or credit rule changed the answer.
Interpreting Results:
Read Net sleep debt with Gross deficit and Oversleep credit applied. Gross deficit shows how many target hours were missed after rounding and any cap. Oversleep credit shows how much longer later sleep reduced that running balance. Net sleep debt is the remaining amount used by the recovery estimate.
Sleep debt band is a planning label, not a diagnosis. Debt clear means the selected nights no longer have a positive balance under the current settings. It does not mean sleep quality was good, older sleep loss is irrelevant, or it is safe to ignore daytime sleepiness.
- Use
Night Ledgerto find the exact nights that raised or lowered the cumulative balance. - Use
Debt Timelineto see whether debt is still rising near the most recent nights. - Use
Recovery Lanesto compare the capacity assumptions behindCurrent plan,Gentle reset,Steady reset, andAggressive reset. - Use
Recovery Paceto spot when a plan depends on a large amount of extra sleep per day or stretches past a week. - Verify a very low debt result by rechecking the horizon, the target,
Allow oversleep credit, and anyNightly deficit cap.
Technical Details:
The calculation treats sleep debt as a nonnegative running balance over the selected recent nights. Entries are read from the oldest selected night to the newest selected night because a surplus night can only repay debt that already exists. A long night near the beginning of the window cannot create a reserve for later short nights.
Each nightly value is bounded to a real number of hours and can be rounded to a minute interval before the ledger is built. The nightly deficit cap, when above zero, limits the shortfall charged for one night. Surplus sleep is measured above the same sleep-need target, but it is only applied when oversleep credit is allowed.
Formula Core:
The balance starts at zero, adds the capped shortfall for each night, subtracts allowed surplus credit, and never drops below zero.
Here N is sleep need in hours per night, S_i is processed sleep for night i, C is the nightly deficit cap, a_i is oversleep credit applied, B_i is cumulative debt, E is planned extra nighttime sleep, and P is planned nap allowance. With an 8-hour target and processed nights of 6.5, 7.0, and 8.5 hours from oldest to newest, the first two nights add 2.5 hours of deficit. With credit on, the 8.5-hour night applies 0.5 hour of credit, leaving 2.0 hours of Net sleep debt.
| Output label | Boundary | Meaning |
|---|---|---|
Debt clear | ≤ 0.01 h | No positive balance remains under the current ledger rules. |
Minimal debt | > 0.01 h and < 1 h | A small recent shortfall remains. |
Low debt | ≥ 1 h and < 3 h | The balance is mild but large enough to show in planning. |
Moderate debt | ≥ 3 h and ≤ 5 h | The selected horizon contains a meaningful sleep gap. |
High debt | > 5 h | The balance is large under the selected target and horizon. |
No recovery lane | Debt > 0 and capacity = 0 | No extra sleep or nap capacity is available in the plan. |
Quick recovery | ≤ 3 days | The modeled catch-up plan clears the balance quickly. |
Steady recovery | > 3 and ≤ 7 days | The plan is gradual but bounded within a week. |
Long recovery | > 7 days | The modeled plan pays the balance down slowly. |
The sleep-need guide values are fixed starting targets: Teen guide sets 9.0 hours, Adult guide sets 8.0 hours, and Older adult guide sets 7.5 hours. The calculation does not know whether those values match the user's actual sleep need, so changing the guide or manual target recalculates every deficit, surplus, band, and recovery estimate.
The comparison lanes use fixed assumptions. Gentle reset adds 0.25 hour of nighttime sleep and no nap. Steady reset adds 0.50 hour of nighttime sleep plus a 0.33-hour nap. Aggressive reset adds 1.00 hour of nighttime sleep plus a 0.33-hour nap. Current plan uses the entered extra sleep and nap allowance.
Limitations and Privacy Notes:
The result is a recent-history estimate built from entered hours. It does not measure sleep stages, sleep quality, breathing, circadian timing, or medical causes of fatigue.
- Wearable and handwritten logs can both be approximate, so rounding may make comparisons cleaner but cannot make the original record more accurate.
- Short horizons can hide older sleep loss, while longer horizons can make a recent improvement look smaller.
- Naps and longer nights may help alertness, but they are not a full replacement for regular nighttime sleep.
- Shared page links and exported files may reveal sleep patterns, wake anchors, and recovery assumptions.
Worked Examples:
Busy week with a rebound weekend. With an 8-hour target and seven nights entered from last night backward as 8.5, 8.5, 8.0, 7.5, 7.0, 6.5, and 6.0 hours, the chronological ledger starts with the 6.0-hour night and ends with the two longer nights. Gross deficit is 5.00 hours. With Allow oversleep credit on, the two 8.5-hour nights apply 1.00 hour of credit, so Net sleep debt is 4.00 hours and Sleep debt band is Moderate debt.
The same week with strict accounting. Turning Allow oversleep credit off keeps Gross deficit at 5.00 hours and sets Oversleep credit applied to 0.00 hours. Net sleep debt becomes 5.00 hours, which is still Moderate debt because that band includes the 5-hour boundary.
One extreme short night. A 3.5-hour night against an 8-hour target creates 4.5 hours of raw shortfall. Setting Nightly deficit cap to 2.0 hours changes that night's Deficit in Night Ledger to 2.00 hours, which also lowers Gross deficit, Net sleep debt, and the planned catch-up days.
A surprising zero. If several short nights still produce Debt clear, check whether the selected horizon excluded older short nights, whether later surplus sleep was credited, whether the target was lowered by a sleep-need guide, or whether a cap reduced the nightly deficits before the ledger was built.
FAQ:
Why do 7-night and 14-night results disagree?
They include different nights. The 7-night view drops older deficits and rebound nights sooner, while the 14-night view keeps two weeks of shortfall and credit in the ledger.
Can oversleep credit make my sleep debt negative?
No. Credit can reduce the running balance to zero, but it cannot create extra reserve for future short nights.
Why is my bedtime target earlier than expected?
When Wake anchor is set, the bedtime target subtracts sleep need plus the lane's extra nighttime sleep from that wake time. Raising Max extra per day moves the target earlier by the same amount.
What should I check when the numbers look wrong?
Check Sleep need, the selected horizon, nightly entries, Round entries to nearest, Nightly deficit cap, and Allow oversleep credit. Those settings change the ledger before recovery lanes are calculated.
Does a small sleep debt mean I am sleeping well?
Not necessarily. The calculator compares hours. It does not evaluate sleep quality, insomnia, apnea symptoms, medication effects, or daytime safety.
Glossary:
- Sleep need
- The nightly target used as the baseline for deficits and surplus sleep.
- Sleep debt
- The positive running balance left after shortfalls and allowed credit are applied.
- Gross deficit
- The total shortfall before longer later nights reduce the balance.
- Oversleep credit
- Sleep above the target that is applied against an existing balance.
- Horizon
- The selected 7-night or 14-night window included in the calculation.
- Wake anchor
- A fixed wake time used to turn recovery assumptions into bedtime targets.
- Recovery capacity
- Planned extra nighttime sleep plus nap allowance available per day.
References:
- Sleep Deprivation and Deficiency: How Much Sleep Is Enough?, National Heart, Lung, and Blood Institute, March 24, 2022.
- FastStats: Sleep in Adults, Centers for Disease Control and Prevention, May 15, 2024.
- Adult Sleep Duration Health Advisory, American Academy of Sleep Medicine, updated August 14, 2015.
- Teen Sleep Duration Health Advisory, American Academy of Sleep Medicine, updated April 3, 2016.