Just like other carbohydrates, such as starch, sugar provides 4 kilocalories (kcal) or 17 kilojoule (kJ) of energy per gram. This is the same as proteins, but it is lower than fat and alcohol:

Carbohydrates (sugar, starch, etc.) 4 kcal/g 17 kJ/g
Protein 4 kcal/g 17 kJ/g
Alcohol 7 kcal/g 29 kJ/g
Fat 9 kcal/g 37 kJ/g