I don't know what the exact calculation is but it is certainly based on more than just distance.
I have workouts in my list with shorter distance but higher calories than other workouts.
I also have two workouts with exactly the same calories, with one more distance and time than the other, but lower heartrate.
