The Caloric content of food (which you find on a product label or in a table of Caloric values) can be estimated with a bomb calorimeter. Food is placed inside a sealed container which is itself enclosed in a water jacket. The food is then burned (oxidized) as oxygen is continually added. The energy released heats the water. The exact temperature change of the water is recorded and the energy content calculated (one calorie of energy will raise the temperature of 1 gram of water 1 degree centigrade.)
Although most literature indicates this is the method used to calculate the Caloric content of various foods, one reader suggested it may overestimate their Caloric value. Here are his comments:
Obviously you can burn wood or olestra but your body extracts 0 Calories out of either. Presumably there is chemical energy left in what comes out the other end after you've eaten (witness the use cow paddies as an energy source). Although the chemical energy released by burning and complete enzymatic digestion and oxidation would be the same, I can't believe that biological oxidation of many (especially high fiber) foods goes to completion.
This is a great point. The real question is whether this is a significant error. Most food has such a small amount of fiber that it may be an insignificant percentage of the Calories you eat each day. And as Caloric expenditure numbers are also estimates, it becomes even more difficult to calculate Caloric balance (intake versus output). I'd suggest not getting too hung up on absolute numbers. And if there is any question as to whether you are meeting your replacement needs, it is best to err on the side of overeating based on Calorie calculations (expenditure versus intake) and watch the scale so you don't gain weight over time. Try to judge your needs to the exact Calorie, be a little on the low side, and on a long ride you could bonk.