| Metric | Value | Copy |
|---|---|---|
| Nights | {{ dayCount }} | |
| Sleep need | {{ formatFixed(sleepNeedValue, 2) }} h/night | |
| Total sleep needed | {{ formatFixed(sleepNeedValue * dayCount, 2) }} h | |
| Total slept (rounded) | {{ formatFixed(total_slept, 2) }} h | |
| Average per night | {{ formatFixed(avg_hours, 2) }} h | |
| Gross deficit | {{ formatFixed(gross_deficit, 2) }} h | |
| Oversleep credit applied | {{ formatFixed(oversleep_credit, 2) }} h | |
| Net sleep debt | {{ formatFixed(net_debt, 2) }} h ({{ debt_readable }}) | |
| Deficit cap | {{ deficitCapDescription }} | |
| Rounding rule | {{ roundingDescription }} | |
| Credit mode | {{ creditModeDescription }} | |
| Max extra per day | {{ formatFixed(maxExtraValue, 2) }} h | |
| Nap allowance | {{ formatFixed(napValue, 2) }} h | |
| Catch-up capacity per day | {{ formatFixed(perDayRecovery, 2) }} h | |
| Catch-up days (est.) | {{ catchup_days }} |
| Night | Slept (h) | Need (h) | Deficit (h) | Credit used (h) | Cum. debt (h) | Copy |
|---|---|---|---|---|---|---|
| {{ r.label }} | {{ formatFixed(r.slept, 2) }} | {{ formatFixed(r.need, 2) }} | {{ formatFixed(r.deficit, 2) }} | {{ formatFixed(r.creditApplied, 2) }} | {{ formatFixed(r.cumDebt, 2) }} |
| Day | Night extra (h) | Nap extra (h) | Remaining debt (h) | Copy |
|---|---|---|---|---|
| {{ r.day }} | {{ formatFixed(r.nightExtra, 2) }} | {{ formatFixed(r.napExtra, 2) }} | {{ formatFixed(r.remaining, 2) }} |
Chart uses cumulative debt after each night using the rounding, cap, and credit settings above.
Enter your nightly log to generate sleep debt metrics, charts, and exports.
Sleep debt is the running gap between the sleep your body needs and the sleep you actually get across recent nights. That makes a simple weekly sleep debt tracker useful for seeing patterns and deciding how to adjust.
You provide a nightly target and a short log of recent nights, then read a clear total with averages and a day count. A seven or fourteen night view shows how small changes add up over time and points to a practical next step.
A quick example helps. With a target of 8 hours, a 6 hour night followed by a 9 hour night still leaves a balance, so you know whether to add time tonight or plan naps.
Numbers can be rounded to consistent minute blocks for cleaner comparisons, and a nightly cap prevents one extreme from dominating the total. You may also let surplus nights reduce what you owe so the balance reflects steadier habits.
Treat results as planning guidance, not medical advice. This tool provides informational estimates and does not substitute professional advice.
The calculator observes nightly sleep duration and a personal sleep need, then summarizes the difference across a fixed horizon. It computes a per‑night deficit, applies an optional cap, optionally applies credit from surplus nights, and reports the cumulative balance at the most recent night.
Gross deficit is the sum of nightly shortfalls after capping. Oversleep credit is the portion of surplus applied to reduce the running balance. Net sleep debt is the final cumulative value after all nights in scope. A simple catch‑up estimate divides the balance by planned extra time per day from longer nights and optional naps.
Comparability depends on consistent horizon and rounding. Rounding is applied to nightly entries before any other step. Turning credit on or off and changing the nightly cap will change both the totals and the shape of the debt curve.
| Symbol | Meaning | Unit/Datatype | Source |
|---|---|---|---|
| N | Horizon nights | integer | Input |
| xi | Raw nightly sleep | hours | Input |
| m | Rounding block | minutes | Input |
| pi | Rounded nightly sleep | hours | Derived |
| H | Sleep need per night | hours | Input |
| C | Nightly deficit cap | hours | Input |
| di | Nightly deficit | hours | Derived |
| ci | Credit applied | hours | Derived |
| si | Cumulative debt | hours | Derived |
| G | Gross deficit | hours | Derived |
| A | Oversleep credit sum | hours | Derived |
| D | Net sleep debt | hours | Derived |
| X | Planned extra at night | hours/day | Input |
| Y | Planned nap time | hours/day | Input |
| r | Catch‑up capacity | hours/day | Derived |
Interpretation: a 2 h balance clears with one day of 2 h planned recovery.
| Field | Type | Min | Max | Step/Pattern | Notes |
|---|---|---|---|---|---|
| Horizon | select | 7 | 14 | 7 or 14 | Fixed choices |
| Sleep need | number | 4 | 12 | 0.1 | Sanitized to non‑negative in code |
| Nightly entries | number | 0 | 24 | 0.1 | Decimals allowed; rounded if enabled |
| Nightly deficit cap | number | 0 | 8 | 0.1 | Clamped to 0–12 in code; 0 means unlimited |
| Rounding minutes | number | 0 | 60 | 5 | 0 disables rounding |
| Oversleep credit | boolean | — | — | — | Applied up to running balance |
| Max extra per day | number | 0 | 6 | 0.1 | For catch‑up plan |
| Nap allowance | number | 0 | 4 | 0.1 | For catch‑up plan |
| Input | Accepted Families | Output | Encoding/Precision | Notes |
|---|---|---|---|---|
| Hours per night | Numbers | Summary table | Two decimals | Copy or download CSV; DOCX export |
| — | — | Daily breakdown | Two decimals | Copy or download CSV; DOCX export |
| — | — | Catch‑up plan | Two decimals | Copy or download CSV; DOCX export |
| — | — | JSON payload | Structured fields | Copy or download JSON |
| — | — | Debt chart | Rounded values | Cumulative after each night |
Sleep debt estimation compares your target to recent nights and produces totals, a chart, and an optional catch‑up plan.
Example: Need 8.0 h, horizon 7, rounding off, cap 2.0 h, credit on, extra 1.5 h, naps 0.5 h.
No. Calculations and exports run on your device, and entries are not sent to a server. The chart script may load from an external source.
If that script is blocked, charts are skipped but tables remain.It sums hours below your target after optional rounding and caps, then subtracts applied credit. It does not assess sleep quality or timing.
Enter hours with a decimal point. Minute rounding applies first, then deficits and credits are calculated with two‑decimal displays.
Metrics and exports work once loaded. The chart depends on an external script and may be unavailable if the connection drops.
A zero balance means your rounded nights met or exceeded your target after credit rules. It is not a guarantee of ideal rest or alertness.
Set max extra per day and optional naps. The plan allocates those hours until the running balance reaches zero, up to a 60‑day limit.
No licensing terms are included here. Availability and terms depend on where this calculator is hosted.