Energy is measured in calories.  1 gram of carbohydrate, or sugar, has 4 calories. 1 gram of protein has 4 calories. 1 gram of fat has 9 calories.