It can be tricky to determine the actual calorie content of foods. Most calculations are done using the Atwater system which showed that carbs and protein have 4 calories in 1 gram and fat has 9 calories in 1 gram. You can think of a gram as about the weight of an average paper clip.
A recent study added evidence to the suggestion that the Atwater system may not be the best approach to determine the amount of calories in some foods, especially nuts.
When tested by the Atwater system, 1 ounce of almonds has 168 calories. In this study, which was a human feeding trial, 1 ounce of almonds had only 129 calories. As humans, when digest nuts we may not be using all the calories available.
This may be one reason why many recent studies have shown adding nuts to weight control diets offers more weight loss.