Health

Macro Calculator

Calculate macronutrient breakdown for your diet.

CALCULATOR

Enter your numbers

Instant results
Total: 100%

THE NUMORIX GUIDE

How to use the Macro Calculator

Last reviewed September 14, 2026

What this calculator does

The engine first requires proteinPercent + carbsPercent + fatPercent to equal exactly 100.

Formula and method

The engine first requires proteinPercent + carbsPercent + fatPercent to equal exactly 100. It assigns calories * percentage / 100 to each macro, then divides protein and carbohydrate calories by 4 kcal/g and fat calories by 9 kcal/g. Displayed gram values are rounded to whole grams.

Variables and inputs

Enter daily calories in kcal/day and protein, carbohydrate, and fat percentages. The UI blocks calculation unless the numeric sum is exactly 100, while the engine returns zero values and a warning if called with another sum. Negative percentages are not explicitly rejected.

Worked example

For 2,000 kcal with 30% protein, 40% carbs, and 30% fat: protein = 600 / 4 = 150 g; carbs = 800 / 4 = 200 g; fat = 600 / 9 = 66.7 g, displayed as 67 g. The page shows P: 150g | C: 200g | F: 67g.

How to interpret the result

The result is an energy distribution, not an individualized nutrition prescription. The 4 and 9 kcal/g factors are standard planning approximations, and rounded grams can add back to slightly more or less than the displayed calorie total.

Common mistakes to avoid

Enter percentages rather than gram targets, make the sum exactly 100%, and do not confuse daily calories with calories per meal. Keep protein, carbohydrate, and fat labels matched to the correct fields.

Assumptions and limitations

The route does not use body size, age, activity, medical conditions, fiber, sugar alcohols, food quality, or a goal. It uses exact floating-point equality for the 100% check and does not reject negative percentages. Nutrition targets may require individualized clinical or sports-nutrition guidance.

Sources and references

COMMON QUESTIONS

Frequently asked questions

Why must the percentages add to exactly 100%?

The engine allocates all calories among protein, carbs, and fat. The UI requires an exact numeric sum of 100 so no calories are left unassigned or assigned twice.

Why can rounded grams look slightly inconsistent with calories?

Fat grams often contain a decimal before display rounding, and the page rounds each macro independently to whole grams. The underlying calculation uses the unrounded values.

Does this tell me which foods to eat?

No. It only distributes calories. Fiber, micronutrients, food quality, allergies, medical conditions, and personal preferences require a broader plan.

FROM THE NUMORIX GUIDES

Learn more before you decide