Food & water
The calories on a food label are usually worked out with simple sums, not measured.
A food calorie is really a kilocalorie: about the energy needed to warm a litre of water by 1 °C. Labels mostly use fixed values per gram: about 4 kcal for protein and carbohydrate, 7 for alcohol and 9 for fat.
So a snack with 10 g of fat, 20 g of carbohydrate and 5 g of protein comes to 90 + 80 + 20 = 190 kcal.