Calories are most exactly determined by a calorimeter... or calorie bomb. But they can be derived with complex mathematics that cooks do while waving their hands, scribbling on a white board and screaming and weighing stuff.
Being a cook, I prefer the second method. It's acurate within a magnitude.
/johnny