the more relevant issue is THERMIC EFFECT.
that is to say calorie value food is measured by BURNING it not by measuring how much of that energy can be converted into fat for storage ( since that would vary by individual )
so diesel fuel for example has 11 calories / gram but you would probably just die if you drank it
on other hand protein in food has to be converted into other things before it can be stored as fat so the actual amount of energy stored is less than what is measured by burning food, and the difference is instead lost as heat
this is called thermic effect of food and is the reason why it's fairly hard to get fat by eating pure protein ...
most calories in meat are in fat, not protein ...
and effective calories in things like lettuce are NEGATIVE because it takes more energy to process such food than the amount of energy that can be extracted from it ...