As far as I know calories are measured with a Bomb calorimeter meaning you are wrong.
I was pretty sure of this too, and someone who used to work for the FDA told me it was calculated not measured 99% of the time
Here’s a good video with some supporting evidence. I’ve looked it up for a couple foods; calculated calories on em