Of course, one could always burn the sample and measure all the heat released as calories (in the chemical sense) and convert that to kilocalories, which is what we all call "calories." All that is given off during the burn process, however, doesn't accurately describe the amounts that is taken up by the body.
While the FDA requires that companies publish nutritional facts on foods, it doesn't specify how they are to obtain those figures. Companies may even guesstimate values based on the USDA's published tome of nutritional data, which is available online.
Wikipedia also shows an energy density table which standardizes food energy into values actually absorbed by the body.
|Food component||Energy Density|
|Polyols (sugar alcohols, sweeteners)||10||2.4|
|Salatrims (reduced energy fat) ||25||6|
Pretty neat, huh?
USDA Nutrient Data Laboratory