04-22-2019 10:06 - edited 04-22-2019 10:07
04-22-2019 10:06 - edited 04-22-2019 10:07
We are currently using Fitbit API to integrate our users' Fitbit data into our system. Currently, we are developing a sleep efficiency tracker. As part of that, we need to understand how Fitbit is calculating the sleep efficiency score.
I have searched far and wide but all I have found are speculative posts on the Fitbit Community forums, with no actual confirmation about the formula used, or any official articles which clearly state how the sleep efficiency score is calculated.
The most likely candidates I found were the following two formulas. But can anyone point me to some official documentation that discusses this? Or can someone from the Fitbit team please confirm/deny if this is how the sleep efficiency score is calculated? I would assume this is basic information which should be understood by our developers in order to properly integrate that score into our system.
05-02-2019 14:34
05-02-2019 14:34
Sorry, we don't publish how the score is calculated.
05-09-2019 08:12
05-09-2019 08:12
Hello. Could you provide an overall indication of how sleep efficiency is calculated without sharing the formula? I know it's generally time asleep divided by time in bed. But I'm trying to get a sense of whether the time it takes to initially fall asleep is considered part of the denominator or if it's excluded altogether.
06-18-2019 11:12
06-18-2019 11:12
I just did some research on my exports (which date back to 2014) and confirmed that the old Sleep Efficiency score that used to be included in the export can be calculated as follows, per other values that are still included in the export:
Efficency % = minutesAsleep / (minutesAsleep + minutesAwake)
To match the old "score" exactly, multiple the above by 100 and round to the nearest integer. Personally, I find that I get more useful data by rounding to one decimal place since the values all cluster so tightly on a day-to-day basis.
11-03-2019 09:40
11-03-2019 09:40
Can anybody decipher these results, 3consecutive days, please?
01-31-2020 05:07
01-31-2020 05:07
This website gives you some detail, but Fitbit won't release the actual algorithm.
Alternatively, if you have Excel or any standard statistical package (SAS, STATA, R, Python), you could simply run a regression analysis to get an approximation of the coefficients that they use (i.e., the formula). It's most likely a linear regression, something like Score = B0 + B1(time asleep) + B2(time light sleep) + B3(time deep sleep) + B4(time REM sleep) + B5(time awake). They could also have used percentages for all of the above and included on more term for total minutes asleep (or total minutes asleep + awake).
11-15-2021 10:16
11-15-2021 10:16
That is fine. But why don't expose the score to the devs? I would really like to understand this decision. Thanks!