The most precise way to measure how many calories we burn is to measure the oxygen we consume and the carbon dioxide we breathe out. As we know the chemical reactions for fat and carbohydrate metabolism, in both cases we can work out the ratio of oxygen going in to carbon dioxide going out. From this, we can calculate how much of our energy is being derived from fat and how much from carbohydrates and, finally, knowing the total volume of oxygen consumed, we can then accurately determine how many calories we are burning at a given heart rate. The only real approximation here is to ignore the very small amount of energy we derive from protein (and alcohol!) metabolism. This test is usually performed with a respirometer as part of a VO2max test, whose principal aim is to determine your maximum oxygen uptake. The test can also be used to measure your anaerobic threshold, beyond which you are no longer to metabolize fats as the reactions are too slow for the rate of energy required, as well as your aerobic threshold, below which the calories you burn are mostly from fat.
The latest Garmin Forerunner models (305, 405, 405CX, 410, 310XT and 610) are able to upload a special file created by doing a New Leaf fitness test which is then used to calculate accurate calorie burns in function of heart rate. DC Rainmaker, in his excellent blog that I read every day, has not only just done one of these tests but he has explained in a post how one can "hack" an XML file in such a way that you can upload the results from any VO2 max test. This is good news for me because there is no New Leaf center where I live so I will definitely try this out next time I do one. I'm interested to know whether it is possible to upload a different profile for running and for cycling as the fat / carbohydrate ratio for a given heart rate will be different in each case. This is because you use a different muscle mass in each sport and there will be a different mix of type I (oxidative) and type II (fast twitch) muscle fibers and a correspondingly different VO2max.
Another thing altogether is being able to precisely measure how many calories we take on, short of burning an identical plate of food to the one we are about to eat. Knowing only one side of the calorie balance equation with precision is of limited use... But it can be a good way to equate the training load of running at low intensity with cycling at high intensity, for example (the idea behind TRIMPS or TRaining IMPusles).