(Or ‘Caloric’, if you must.)
I assume they can’t just use bomb calorimeters; they likely derive it from tables of ingredients to some extent but that doesn’t actually answer the question so much as shoves it across the plate a bit.
So how is it done in general?