Description
Return their difference as awakeInBedMinutes and 100 × asleep/in-bed as sleepEfficiencyPercent.
Sleep summaries depend on how sleep time and the observation interval were recorded. A time ratio or clock difference is descriptive; it does not establish sleep quality, a diagnosis, or a treatment need.
Return their difference as awakeInBedMinutes and 100 × asleep/in-bed as sleepEfficiencyPercent.
When to use this tool
Use Sleep Log Inbed Vs Asleep Gap when you need one supplied sleep-record duration or ratio under an explicit overnight convention.
How to use the tool and how it works
- Enter inBedMinutes, asleepMinutes. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read awakeInBedMinutes, sleepEfficiencyPercent. Use the output convention below.
Require positive inBedMinutes and asleepMinutes within it. Return their difference as awakeInBedMinutes and 100 × asleep/in-bed as sleepEfficiencyPercent.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| inBedMinutes | Recorded observation duration in minutes, using the same interval as sleepMinutes. | Required. Finite number; strictly above 0. |
| asleepMinutes | Recorded sleep duration in minutes. | Required. Finite number; minimum 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| awakeInBedMinutes | Awake In Bed Minutes | Required. Finite number. |
| sleepEfficiencyPercent | Sleep Efficiency Percent | Required. Finite number. |
{
"input": {
"inBedMinutes": 480,
"asleepMinutes": 420
},
"output": {
"awakeInBedMinutes": 60,
"sleepEfficiencyPercent": 87.5
}
} Limitations and assumptions
- Use the same recording window and duration units; this diary ratio does not verify sleep stages, diagnose a disorder, or recommend treatment.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Use a complete sleep record and discuss persistent concerns with an appropriate health professional.
References
Similar or alternative tools
- Sleep Diary Midnight Duration
Subtract bedtime from wake and add 1440 only when nextDay; reject a negative result.
- Care Diary Activity Minute Count
Return elapsed duration and divide it equally across the supplied activity count.