There is an additional subtlety that may interest hackers. It is actually if calories metabolized by the body == calories burned. Calories are mostly fungible, but they are processed differently (by the liver or by the cells themselves, for instance) and this has drastic effects on metabolic health. For instance, fructose is processed by the liver and does not trigger the satiety hormones as easily as glucose. So, while the total amount of energy available is the same for calorically similar amounts of fructose and glucose, the impact on fat storage and hunger is different.
For more about the biochemistry of metabolism see: http://www.youtube.com/watch?v=dBnniua6-oM