Odds are you sometimes think about calories. They are among the most often counted things in the universe. When the calorie was originally conceived it was in the context of human work.
More calories meant more capacity for work, more chemical fire with which to get the job done, coal in the human stove. Fat, it has been estimated, has nine calories per gram, whereas carbohydrates and proteins have just four; fiber is sometimes counted separately and gets awarded a piddling two. Every box of every food you have ever bought is labeled based on these estimates; too bad then that they are so often wrong.
A Food is Not a Food—Estimates of the number of calories in different kinds of foods measure the average number of calories we could get from those foods based only on the proportions of fat, carbohydrates, protein and sometimes fiber they contain (In essence, calories ingested minus calories egested).
A variety of standard systems exist, all of which derive from the original developed by Wilbur Atwater more than a hundred years ago. They are all systems of averages. No food is average...