How are calories calculated in food [closed]

How are calories calculated in food?

Do they sum all the energy in every molecule? By for example, by burning the stuff up and calculating the energy output.

Or is this value supposed to represent the energy that a human body will extract from that food?

Or do they only sum up the elements that we are supposed to digest (Protein, Carbs, Fat) ?

For example, wood contains a lot of energy. We can see that by burning it. But the human body is not able to break done the fibers to extract the enery from wood. We do not eat wood but I suppose there are multiple elements contained in food that we do not digest but that contain energy.

Also, Fat contains a lot of energy compared to carbs or proteins but the human body has a much more difficult time to process fat and extract energy from it (catabolism).

Is it the energy outputed from the catabolism of fat that is calculated or again the theoretical quantity energy in fat (burning it).

-

closed as off topic by Baarn, Matt Chan♦Dec 10 '12 at 4:45

Questions on Physical Fitness Stack Exchange are expected to relate to physical fitness within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

wikipedia has your answer here: en.wikipedia.org/wiki/Food_energy – michael Jul 6 '11 at 18:48
This question is no longer on topic here, since the FAQ changed. – Baarn Dec 9 '12 at 20:22

What exactly:

The number of calories in a food is a measure of how much potential energy that food has.

How to find out:

A particular food item will be ignited, the [...] calorimeter will trap the heat of the burning food, and the water above will absorb the heat, and cause the temperature (T) of the water to increase. By measuring the change in temperature (ΔT) of a known volume of water, students will be able to calculate the amount of energy in the food tested because the heat gained by the water will equal the heat lost by the food item.