I've found topic about burned calories formula which is available here. But as a I am looking at it, some lines are not as clear understandable for me as I expected.

As you can see, there are some conversation factor that I truly don't know what is for.

Why does he use calculation for burned calories per kilometer and then count steps per mile? Thanks.



It is probably a typo. If you look at what they're trying to achieve, it becomes quite obvious.

conversationFactor = CaloriesPerKilometer / stepCountMile;

This is clearly trying to get a factor (As per the name, good job captain obvious!)

The next step is to figure out how many calories are burned.

CaloriesBurned = numSteps * conversationFactor;

This is Converting, not Conversing, the number of steps into Calories. Which means it is either a typo, or someone who's not well versed in English that wrong the code.

| improve this answer | |
  • But how is it possible to divide caloriesPerKilometer and number of steps? Is there any calculation hidden behind that? – Pedro Ewors Jun 20 '16 at 14:05
  • Or is it better to ask, why is it needed to divide by miles? Can I use stepCountKilometer instead? – Pedro Ewors Jun 20 '16 at 14:10
  • It seems to be converting every metric measurements into imperial to deal with in Miles. (userWeight * 2.2, converts kg to lbs, userHeight * 0.415 I assume converts cm to inches, but this one is off by quite a lot) – Yousend Jun 20 '16 at 15:08
  • 0.415 is average size of adult mans foot. but 160934.4 is convertion for cm in one mile. Does that change anything? – Pedro Ewors Jun 20 '16 at 17:05
  • I have no idea how this formula works or the science behind it. I was merely reverse engineering the values. – Yousend Jun 20 '16 at 17:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.