How Daily Macros Are Calculated
The calculator determines your base energy needs using the Mifflin-St Jeor equation to estimate Basal Metabolic Rate (BMR):
For men: BMR = 10 * weightKg + 6.25 * heightCm - 5 * age + 5
For women: BMR = 10 * weightKg + 6.25 * heightCm - 5 * age - 161
Energy Expenditure and Target Calories
BMR is multiplied by an activity factor (1.2 for sedentary up to 1.9 for very active) to establish Total Daily Energy Expenditure (TDEE). Next, target calories are adjusted based on your selected goal:
- Fat Loss: TDEE - 500 calories
- Muscle Gain: TDEE + 300 calories
- Maintenance: TDEE
Converting Ratios to Daily Grams
Calories are distributed into target macronutrient percentages based on your goal:
- Lose Weight: 35% protein, 35% carbohydrates, 30% fat
- Maintain: 30% protein, 40% carbohydrates, 30% fat
- Gain Muscle: 30% protein, 45% carbohydrates, 25% fat
Finally, daily gram amounts are calculated using caloric energy densities: protein and carbohydrates yield 4 calories per gram, while dietary fat yields 9 calories per gram.
Protein Grams = Math.round((Target Calories * Protein Ratio) / 4)
Carbohydrate Grams = Math.round((Target Calories * Carbohydrate Ratio) / 4)
Fat Grams = Math.round((Target Calories * Fat Ratio) / 9)