Both protein and carbohydrates have 4 calories per gram of food. Fat on the other hand has 9 calories per gram. - For example, you could have 20 grams of protein in chicken and 20 grams of protein in lentils. In both foods, the 20 grams of protein would result in 80 calories worth of protein. The difference in their calorie counts would come from the various amounts of carbs, fat, and other nutrients included in the food.