Sleep Planner
Tonight’s sleep need, and the bedtimes that meet it.
PoorSufficientOptimal
Your sleep was sufficient. You slept 87 minutes less than you needed; an earlier night helps.
Explore your sleep insightsHours of sleep
What goes in
- Your sleep need
- The upper quartile of your last 28 nights, between 8 and 9.5 hours.
- Today’s Strain
- Strain above your 28-day average adds to the need.
- Sleep debt
- What you owe from recent nights.
- Naps
- Today’s naps take time off tonight’s need.
- Your last 14 main sleeps
- Your usual wake time and sleep efficiency.
How it is weighted
Tonight’s need = your sleep need + 3 minutes for each Strain point above your 28-day average + 20% of your sleep debt − today’s nap time.
Sleep debt runs over your last 14 nights with sleep. Each night, debt becomes 55% of (need + the debt so far − sleep), with the previous day’s naps counted as sleep; anything under 10 minutes clears to zero.
Bedtimes count back from your median wake time on recent weekday or weekend mornings, to match tomorrow, allowing for your median efficiency (90% until known). A need of 8 hours, a 07:00 wake and 90% efficiency give a Peak bedtime of 22:07.
What the bands mean
- Peak
- 100% of tonight’s need.
- Perform
- 85% of tonight’s need.
- Get by
- 70% of tonight’s need.
A worked example
Take someone with a sleep need of 8 hours, which is 480 minutes. Today's Strain is 12.6 against a 28-day average of 9.45, so they are 3.15 points above their norm. Their sleep debt this morning is 60 minutes, they took a 20-minute nap, and tomorrow is a weekday. Over their last 14 main sleeps they have typically woken at 07:00 with 90% efficiency.
Tonight's need starts from the 480 minutes. Strain adds 3 minutes for each point above average: 3.15 points gives 9.45 minutes. Debt adds 20%, so 60 minutes of debt gives 12. The nap takes off 20. That makes 480 + 9.45 + 12 - 20 = 481.45 minutes, about 8 hours 1 minute.
Bedtimes then count back from 07:00. Because efficiency is 90%, time in bed is the sleep divided by 0.9. For Peak, 481.45 minutes of sleep needs 534.9 minutes in bed, so lights out at 22:05. Perform (85%) needs 454.7 minutes in bed, giving 23:25, and Get by (70%) needs 374.5 minutes, giving 00:45. These come from running Pulse's own sleep planner on those inputs. A harder day, more debt or a lower efficiency would all move the bedtimes earlier.
Limits
The planner needs 7 main sleeps before it gives bedtimes. It assumes tomorrow looks like your recent mornings and cannot see alarms or plans. Strain and naps later today change tonight’s need. It is a guide, not a prescription.
Sources
The full specification, with formulas, constants and worked examples, is sleep-planner.md on GitHub. The code is tested against those examples.
Sleep Planner: questions
What time should I go to bed?
It depends on when you need to wake and how much sleep you need. Pulse takes your usual wake time for the coming morning, from your recent weekdays or weekends, then subtracts tonight's need divided by your typical sleep efficiency. For an 8-hour need, a 07:00 wake and 90% efficiency, that is 22:07. It cannot see alarms or plans, so check the wake time it assumes.
How does sleep debt work in the planner?
Pulse runs a ledger over your last 14 nights with sleep. Each night, the debt becomes 55% of your need plus the debt so far, minus the sleep you got, with naps credited. Debt under 10 minutes clears to zero. Tonight's planner adds 20% of the current debt to your need, so a large debt is repaid over about five nights instead of in one long night.
How is this different from WHOOP's Sleep Planner?
The idea is the same: a need built from a baseline, extra for strain and debt, less for naps, turned into bedtimes at 100%, 85% and 70% of the need. WHOOP does not publish its amounts. Pulse does: 3 minutes per Strain point above your 28-day average, 20% of debt, and a baseline from your own upper-quartile nights. See WHOOP sleep need explained.
Why does the planner show no bedtime?
It needs 7 main sleeps in your history before it gives bedtimes, because the wake time and efficiency come from your recent nights. Until then it only has a default need of 8 hours. A very long nap can also bring tonight's need close to zero. The planner is a guide for scheduling, not a prescription.