If I'm not mistaken, all those considerations are taken into account when they calculate caloric information on labels. If the package says 100 kcal, that means that eating it will give your body 100 kcal to burn for fuel, build into muscle or store as fat. Obviously if you did something like convert the matter into energy direct by means of nuclear fusion you'd get a hell of a lot more than 100 kcal out of it, but the label is meant to be understood as the amount of net energy the average human body can extraxt from the product.
In terms of strictly weight gain and weight loss, a calorie is a calorie. In terms of general nutrition there are other considerations (which basically boil down to: eat lots of vegetables and lean sources of protein, and get your carbs from foods that are high in fiber), but the number on the scale will directly correspond to the number on the nutritional information.