Macro-nutrients and calories not equal?

Options
So what I did, much like everyone else I assume, is input food into myfitnesspal app. I added the total # of calories for the item as it is listed on the nutritional label under "calories" and then put in the macro-nutrients beneath it as listed on the label as well.

However, my overall sum of calories when simply adding up from what it listed for calories on the label vs macro-nutrient level calories isn't equivalent. Here is what it looks like

Meal 1 - 528 cals
Meal 2 - 528 cals
Meal 3 - 370 cals
Meal 4 - 410 cals
Total - 1,836 calories

Now looking at the macro-nutrients it lists
Total Fat - 64g (576 calories)
Total Carbs - 145g (580 calories)
Protein - 162g (648 calories)
Total - 1,804 calories

Just wondering why this doesn't add up, and if you were me which number would you focus more on? I have a few (2) protein bars in those meals as snacks that have a substantial amount of dietary fiber in them (17 grams in each) as well as sugar alcohols (6 grams each). Do those need to be accounted for as calories some how? If so, how many calories per gram? Thanks