Different foods have differing caloric contributions per gram. For example, 1g of fat from one food may contain 8.2 calories, while 1g of fat from another food may contain 9.63 Calories. For fat, the range of values can be close to 9 calories, but not exactly 9 calories. The same is true for carbohydrate or protein.
This is why we say to focus on the posted calories and not to try to recalculate the calories based on the gram conversion. The information contained on nutrition labels (and included in our validated database) have additional information like carb, protein, and fat gram values for a general snapshot of a food profile. To try to reverse engineer calculations based on gram values, however, is rarely going to be as precise as the actual calories posted for any one food item.
This is one of the reasons why we encourage people not to focus too intently on macro profiles when building meal plans. Although knowing those profiles certainly provides some insight into the plan's balance, it will never be as accurate as the posted calorie profiles for any one meal, day, or plan.