However, the direct calorimetric method generally overestimates the actual energy that the body can obtain from the food, because it also counts the energy contents of dietary fiber and other indigestible components, and does not allow for partial absorption and/or incomplete metabolism of certain substances. For this reason, today the energy content of food is instead obtained indirectly, by using chemical analysis to determine the amount of each digestible dietary component (such as protein, carbohydrates, and fats), and adding the respective food energy contents, previously obtained by measurement of metabolic heat released by the body.
Learn more on Wikipedia