I recently got a new GPS running watch, a Garmin Fēnix 5. As well as tracking runs, cycling and swimming, it does “activity tracking” – number of steps taken in a day, sleep, and so on. The step goals are set to move automatically and I wondered how it worked. With a quick number crunch, the algorithm revealed itself. Read on if you are interested how it works.

The watch started out with a step target of 7500 steps in one day. I missed this by 2801 and the target got reduced by 560 to 6940 for the next day. That day I managed 12480, i.e. 5540 over the target. So the target went up by 560 to 7500. With me so far? Good. So next I went over the target and it went up again (but this time by 590 steps). I missed that target by a lot and the target was reduced by 530 steps. This told me that I’d need to collect a bit more data to figure out how the goal is set. Here are the first few days to help you see the problem.

Actual steps | Goal | Deficit/Surplus | Adjustment for Tomorrow |

4699 | 7500 | -2801 | -560 |

12480 | 6940 | 5540 | 560 |

10417 | 7500 | 2917 | 590 |

2726 | 8090 | -5364 | -530 |

6451 | 7560 | -1109 | -220 |

8843 | 7340 | 1503 | 150 |

8984 | 7490 | 1494 | 300 |

9216 | 7790 | 1426 | 290 |

The data is available for download as a csv via the Garmin Connect website. After waiting to accumulate some more data, I plotted out the adjustment vs step deficit/surplus. The pattern was pretty clear.

There are two slopes here that pass through the origin. It doesn’t matter what the target was, the adjustment applied is scaled according to how close to the target I was, i.e. the step deficit or surplus. There was either a small (0.1) or large (0.2) scaling used to adjust the step target for the next day, but how did the watch decide which scale to use?

The answer was to look back at the previous day’s activity as well as the current day.

So if today you exceeded the target and you also exceeded the target yesterday then you get a small scale increase. Likewise if you fell short today *and* yesterday, you get a small scale decrease. However, if you’ve exceeded today but fell short yesterday, your target goes up by the big scaling. Falling short after exceeding yesterday is rewarded with a big scale decrease. The actual size of the decrease depends on the deficit or surplus on that day. The above plot is coloured according to the four possibilities described here.

I guess there is a logic to this. The goal could quickly get unreachable if it increased by 20% on a run of two days exceeding the target, and conversely, too easy if the decreases went down rapidly with consecutive inactivity. It’s only when there’s been a swing in activity that the goal should get moved by the large scaling. Otherwise, 10% in the direction of attainment is fine.

I have no idea if this is the algorithm used across all of Garmin’s watches or if other watch manufacturer’s use different target-setting algorithms.

—

The post title comes from “Measured Steps” by Edsel from their Techniques of Speed Hypnosis album.

Interesting – Just bought a 635 – I will check this out with my data – when I have enough.

I checked this with my data from the garmin instinct. Your analysis checks out for my data as well. However, the correction is limited to 2000 steps (at least for the correction in upward direction). I have not yet checked this limit of the correction for the downward adjustment. To check this also in downward direction it would require me to do negative number of steps. (or I first need to achieve a very large stepgoal).

However, you describe the adjustment wrongly. The adjustment is small (scaled by 0.1) if it is the first in a sequence of consequetive decreasing-or-increasing corrections, and it is large (scaled by 0.2) if it it second/third/etc of consequetive decreasing of increasing corrections.

Anyways, many thanks for finding out how this works. I was very annoyed by not understanding how garmin adjusts the stepgoal. Now I understand the calculation, I am much more at ease with it…