What is the Macronutrient Calculator?
This calculator converts a daily calorie target into grams of the three macronutrients — protein, carbohydrates, and fat — based on the percentage of calories you want each one to provide. It's a handy tool for meal planning, flexible dieting (IIFYM), bodybuilding cuts and bulks, or simply understanding how your diet breaks down.
How to use it
Enter your daily calorie target (for example, the maintenance or deficit number from a TDEE calculator), then enter the percentage of calories you want from each macronutrient. The three percentages should add up to 100%. The calculator instantly returns the grams of protein, carbs, and fat to aim for each day.
The formula explained
Protein and carbohydrates each contain about 4 calories per gram, while fat contains about 9 calories per gram. To find grams, multiply your calories by the macro's percentage (as a decimal), then divide by the calories per gram:
$$\begin{aligned} \text{Protein (g)} &= \frac{\text{Calories} \times \frac{\text{Protein \%}}{100}}{4} \\[0.6em] \text{Carbs (g)} &= \frac{\text{Calories} \times \frac{\text{Carbs \%}}{100}}{4} \\[0.6em] \text{Fat (g)} &= \frac{\text{Calories} \times \frac{\text{Fat \%}}{100}}{9} \end{aligned}$$
Worked example
Suppose your target is 2,000 kcal with a 30/40/30 split.
$$\text{Protein} = 2000 \times 0.30 \div 4 = 150 \text{ g}$$$$\text{Carbs} = 2000 \times 0.40 \div 4 = 200 \text{ g}$$$$\text{Fat} = 2000 \times 0.30 \div 9 \approx 66.7 \text{ g}$$So you'd aim for roughly 150 g protein, 200 g carbs, and 67 g fat.
FAQ
Do my percentages have to total 100%? Yes — for the gram totals to match your calorie target, the three percentages must sum to 100%. The calculator warns you if they don't.
What's a good macro split? A common balanced split is around 30% protein, 40% carbs, 30% fat, but the right ratio depends on your goals, activity, and preferences.
Why is fat divided by 9? Fat is more energy-dense than protein or carbs, providing 9 calories per gram versus 4, so fewer grams cover the same calories.