Atwater factors
The Atwater factors are the conventional energy values used to convert nutrients into calories: 4 kcal per gram of protein, 4 for carbohydrate, 9 for fat, and 7 for alcohol.
Example
A meal with 30 g protein, 60 g carbohydrate and 20 g fat comes to 30×4 + 60×4 + 20×9 = 540 kcal.