What is the Macro Calculator?
The macro calculator turns your total daily calorie target into precise gram amounts of the three macronutrients — protein, carbohydrate, and fat. You choose how to split your calories as percentages, and the tool converts each slice into grams using the standard Atwater energy values: protein and carbs deliver 4 kcal per gram, while fat delivers 9 kcal per gram. It's a quick way to translate a diet plan into food portions you can actually track.
How to use it
Enter your daily calorie goal (for example, the figure from a TDEE or weight-loss calculator). Then set the percentage of calories you want from protein, carbs, and fat. A balanced split is often 30/40/30, but low-carb, high-protein, or keto plans use very different ratios. Your three percentages should add up to 100% — the result shows the total so you can check. Click calculate to see grams and calories for each macro.
The formula explained
For each macro, calories from that macro = total calories \(\times\) percentage. Dividing by the energy density gives grams. Protein and carbohydrate: \(\text{grams} = (\text{cal} \times \%) \div 4\). Fat: \(\text{grams} = (\text{cal} \times \%) \div 9\), because fat is more than twice as energy-dense.
$$\text{Grams} = \frac{\text{Calories} \times \frac{\%}{100}}{\text{kcal per gram}}$$
$$\begin{gathered} \text{where}\quad \left\{ \begin{aligned} \text{Protein (g)} &= \frac{\text{Calories} \times \frac{\text{Protein \%}}{100}}{4} \\[0.4em] \text{Carbs (g)} &= \frac{\text{Calories} \times \frac{\text{Carbs \%}}{100}}{4} \\[0.4em] \text{Fat (g)} &= \frac{\text{Calories} \times \frac{\text{Fat \%}}{100}}{9} \end{aligned} \right. \end{gathered}$$
Worked example
On 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}$$
That corresponds to 600, 800, and 600 calories respectively, totaling 2,000.
FAQ
Do my percentages have to equal 100%? Ideally yes. If they don't, the grams are still calculated per your inputs, but the totals won't match your calorie goal — check the "Total split" row.
Why is fat divided by 9? Dietary fat contains about 9 kilocalories per gram, while protein and carbohydrate contain about 4 each.
What split should I use? It depends on your goals. Common starting points are 30/40/30 (balanced), 40/40/20 (higher protein), or 25/5/70-style ratios for ketogenic diets.