How this macro calculator works
A macro calculator splits a daily calorie target into protein, carbohydrate, and fat grams. The headline rounds those grams to whole numbers as P · C · F. Details keep one decimal. There is no Advanced section. Split method is a segmented control: Custom % or By body weight.
Calories must be greater than 0. Empty or typed 0 calories is no result. Custom % converts each percent at 4 kcal/g for protein and carbs and 9 kcal/g for fat. Percents must sum to 100% within 1 percentage point. The weight fields are not on that screen. By body weight also needs a weight greater than 0; protein and fat grams are that weight times the typed figures in the unit you selected, then leftover calories become carbs.
How to use the macro calculator
- Enter daily calories greater than 0. Empty or typed 0 is no result.
- Leave Split method on Custom % for a percent split, or switch to By body weight to set protein and fat from body weight. Only the fields for the selected method are on screen.
- On Custom %, enter protein, carbs, and fat percents. Empty percents count as 0. They must sum to 100% within 1 point (33/33/33 is valid; 30/40/32 is not).
- On By body weight, enter weight and the protein and fat figures. The rate is per the unit you selected: 154 lb at 2.0 g protein is 308 g. Empty protein or fat per unit counts as 0.
Macro formulas
Custom %: protein g = calories × protein% ÷ 4; carbs g = calories × carbs% ÷ 4; fat g = calories × fat% ÷ 9. By body weight: protein g = weight × protein figure in the selected unit; fat g = weight × fat figure in that unit. Remaining calories = calories − protein×4 − fat×9. If the remainder is negative, there is no result. Otherwise carb g = remaining ÷ 4. Derived percents are those gram-calories divided by the calorie target.
Worked examples
Example: 2000 kcal at 30 / 40 / 30
Protein is 2000 × 30% ÷ 4 = 150 g. Carbs are 2000 × 40% ÷ 4 = 200 g. Fat is 2000 × 30% ÷ 9 = 66.7 g. The headline rounds fat to 67F, so it reads 150P · 200C · 67F.
Example: 2000 kcal, 70 kg, 2.0 protein and 0.8 fat
Protein is 70 × 2.0 = 140 g (560 kcal). Fat is 70 × 0.8 = 56 g (504 kcal). Remaining calories are 2000 − 560 − 504 = 936, so carbs are 936 ÷ 4 = 234 g. The headline is 140P · 234C · 56F.
Example: 2000 kcal at 30 / 40 / 32, and 33 / 33 / 33
30 + 40 + 32 = 102%, which is outside the 1-point window, so there is no result. 33 + 33 + 33 = 99%, which is within 1 point of 100%, so that split is valid.
Things to keep in mind
These are gram targets, not a meal plan or medical advice. On By body weight the typed protein and fat figures are multiplied by the weight in the unit on the label, so per lb uses pounds and per kg uses kilograms. 2,000 kcal at 30/40/30 stays 150 g protein, 200 g carbs, and 67 g fat; weight is not on that screen. If protein and fat calories already exceed the calorie target, there is no result.
Macro calculator FAQ
Which fields are required?
Daily calories must be greater than 0. Empty or typed 0 is no result. Custom % also needs percents that sum to 100% ± 1 point. By body weight also needs a weight greater than 0.
Is there an Advanced section?
No. Split method is a segmented control on the basic form. Custom % and By body weight are always one or the other; closing a section cannot opt either out.
Why does 30 / 40 / 32 show no result?
Custom percents must sum to 100% within 1 percentage point. 102% is outside that window. Empty percents count as 0, so 30 / 40 / empty is 70% and also invalid. 33 / 33 / 33 (99%) is accepted.
If I choose lb, is protein per lb?
Yes. The label and the math use the unit you selected. 154 lb at 2.0 g protein and 0.8 g fat is 154 × 2.0 = 308 g protein and 154 × 0.8 = 123.2 g fat. The headline rounds fat to 123.
What if protein and fat already use more than the calorie target?
There is no result. Carbs are not shown as a negative number. At 2,000 kcal, 154 lb, 2.0 g protein per lb, and 0.8 g fat per lb, protein and fat are 308 × 4 + 123.2 × 9 = 2,340.8 kcal, which is over 2,000.
Does this macro calculator store my numbers?
Completed results can be saved in this browser’s local history so you can reopen them later. They stay on your device and are not sent to our servers or to analytics.