system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How does the foods industry measure the amount of calories in food? Or is it an estimation? For example, how do we know that a cheeseburger is 900 calories?
gpt
**Tl;dr:** For many recipes they look it up in a special tables for common ingredients. For other recipes they do some chemical tests to count fat-proteins-carbohydrates and then calculate using other tables.

Calorie is a metric unit of energy (symbol: **cal**). This is the amount of energy you need to raise the temperature of one gram of water by one degree Celsius (in normal conditions). 

Also, there is an American Calorie^tm, which is bigger, of course (symbol: **Cal**) - it is 1000 standart calories.

The number of calories tells you what amount of energy you can get from the food. The method to measure this energy is known as direct calorimetry - you just dry food, burn it in a pure oxygen in a special device in a certain amount of water and measure the temperature change. But this method is not used nowadays on food labels, because humans will take less energy from food than there is (they do not digest fiber*, etc)

Now they do some standardized chemical tests (or look in existing tables for common products) to count proteins-fat-carbohydrate-etc quantity - the things we actually take from food. The results are converted into an equivalent energy value. For example one gram of fat will give you 9 kcal = 9000 cal = 9 Cal, alcohol - 7 kcal, proteins - 4 kcal, carbohydrates - 4 kcal.

Only fat, ethanol, proteins, carbohydrates, organic acids, polyols and fiber are caloric, so anything else is not counted.