Does heating up margarine in a pan makes it lose calories since more than half of it evaporates? Ex: using 1/4 of margarine and heating it up with onions. Will the dish still have 210 cals from margarine or will that number be lower?
No, because what is evaporating is water.
Yes, some will be lost.
But how much will depend on a number of factors, and my quick google-fu was unable to find research that specifically addresses the question of lost calories.
It's not just water.
Research related to the question seems to mostly be centered around the topic of air quality. As such, measurements just care that there's SOMETHING in the air, and often does not go farther and break down exactly what that SOMETHING is.
For instance, this article measures the amount of UFPs (ultrafine particles - less than 0.1 micrometers in diameter), PM2.5(particulate matter less than 2.5 micrometers in diameter), and black carbon concentrations, given various conditions.
Zhang, Qunfang et al. “Measurement of ultrafine particles and other air pollutants emitted by cooking activities.” International journal of environmental research and public health vol. 7,4 (2010): 1744-59. doi:10.3390/ijerph7041744
Frying chicken for 11 minutes at a high temperature, for instance, released much more particulate than frying for 27 minutes at a medium temprature.
It also seems reasonable to infer that most of this particulate is fine grease particles. For instance this study on Chinese cooking found that 75.7% mass was composed of fatty acids.
Zhao, Xiuying & Hu, Qihou & Wang, Xinming & Ding, Xiang & He, Quanfu & Zhang, Zhou & Shen, Ruqin & Lü, Sujun & Liu, Tengyu & Fu, Xiaoxin & Chen, Laiguo. (2015). Composition profiles of organic aerosols from Chinese residential cooking: Case study in urban Guangzhou, south China. Journal of Atmospheric Chemistry. 72. 10.1007/s10874-015-9298-0.
Half of your margarine probably didn't evaporate.
That being said, it seems quite unlikely that half of your margarine evaporated, unless you were cooking at a VERY high temprature, or heating it for much longer than necessary. Grease gets into the air and coats your kitchen eventually if you don't have a kitchen hood, but imagine if half of all the oils you used was thrown around your kitchen! You'd need something much more... industrial strength to deal with that.
Depends on what temperature you bring it to. When doing something like this, the fat will boil and calories will be lost. I have actually boiled it away by mistake (and bad consequences for the onions involved).