How can I calculate the affect of cooking my food on its nutrition If I look on nutritiondata.self.com for the nutrition value of raw lentils (as an example), it tells me the protein value per 1 cup is 50g. However, 1 cup of boiled lentils is good for 18g of protein! 

I looked up the question, however the popular answer is that it doesn't make much of a difference. But judging by those numbers, I think that it does! 

So, what should I do?

Lentils being just an example! This applies to other foods too..
Lentils (and other foods) expand when cooked - its not the same amount of lentils (and other food).

Some vitamins and such are destroyed by heat, but to be sure on exactly what, only a lab could determine.

For macronutrients such as proteint, fats, etc - whatever goes in, comes out.