Ideally you should calculate the calories based on the raw weights of each ingredient.
If you’re cooking a big batch of something and want to be able to divide it up as needed, then you can weigh the food before it’s cooked, weigh the food after it’s cooked, and then calculate the ratio in order to convert from cooked to raw and be able to track accurately.