The macronutrient percentages are based on the caloric contribution of each macronutrient, not their mass. Macronutrients produce, approximately, the following calories per gram:
- Carbs: 4 calories per gram
- Protein: 4 calories per gram
- Fat: 9 calories per gram
To calculate the percentage contribution of each macro, carbs and protein are multiplied by 4 and fat by 9.