Macro Calculator
Calculate protein, fat, and carbohydrate targets by calorie percentage or grams per kilogram. See the full calorie split in your browser.
Set your targets
Splits a calorie target you have already chosen
Used for per-kilogram results and weight-based rules
Automatically calculated as 100% minus protein and fat
Lock protein and fat percentages, then assign the remaining calories to carbohydrates.
Lock protein and fat grams by body weight, then assign all remaining calories to carbohydrates.
Example values are loaded. Adjust them or calculate now.
- Protein: 2,200 × 30% ÷ 4 = 165 g
- Fat: 2,200 × 25% ÷ 9 ≈ 61.1 g
- Carbohydrates: remaining 990 kcal ÷ 4 = 247.5 g
Calculations retain 0.1 g precision while summary cards show whole grams. Everyday food tracking does not need gram-perfect accuracy.
How to use the macro calculator
- Enter your targets — Enter a daily calorie target and body weight.
- Choose an allocation method — Use percentage mode or set protein and fat in grams per kilogram.
- Review the calculation — Calculate the targets, then review grams, calorie shares, and the displayed arithmetic.
Learn more
Formulas, example, and everyday use
The usual energy factors are 4 kcal per gram of protein, 4 kcal per gram of carbohydrate, and 9 kcal per gram of fat. Percentage mode multiplies calories by each percentage and divides by the energy factor. Weight mode calculates protein and fat from body weight, then uses the remaining calories for carbohydrates.
Terms and common misconceptions
- Macronutrients: nutrients needed in relatively large amounts; this tool handles protein, fat, and carbohydrates.
- Calorie target: the total energy you plan to eat each day. This tool does not estimate basal metabolism or total daily energy expenditure.
- g/kg: grams per kilogram of body weight, used to link body weight to protein or fat targets.
The result is a planning starting point, not a prescription that must be hit exactly every day. Rounded labels, cooking differences, and portion estimates introduce variation. Percentages also do not represent food volume because fat provides more energy per gram.
Scope and health information
This tool only performs an arithmetic split. It does not judge whether a calorie target or macro ratio is appropriate for you, and it does not replace advice from a doctor or registered dietitian. Pregnant or breastfeeding people, minors, competitive athletes, and people with kidney, liver, metabolic, or eating-related conditions should consult a qualified professional. The calculator stops if the protein and fat rules require more than the total calorie target.
Tool information, privacy, and sources
All calculations run locally in this browser. Weight, calories, and results are not uploaded, and no third-party scripts are used. The page does not automatically save your inputs; the one-time guide stores only that it has been shown.
Energy factors are informed by the FAO reference Food energy – methods of analysis and conversion factors and general nutrition reference ranges can be reviewed in the NCBI Bookshelf Dietary Reference Intakes summary table. These sources explain general concepts and do not evaluate your inputs.
Open-source research was completed on July 28, 2026. No third-party project or calculation library is used; the core algorithm is an independent native JavaScript implementation that can run offline.
Frequently asked questions
Does this calculator estimate my calorie needs?
No. You provide an existing daily calorie target; the calculator only divides that target among protein, fat, and carbohydrates.
Are the results medical or dietary advice?
No. The results are planning estimates. Individual needs can differ, especially during pregnancy, childhood, competitive training, or when a health condition affects nutrition.
Does the calculator upload or save my data?
Calculations stay in your browser and inputs are not uploaded. The page does not save your values; it only stores whether the one-time button guide has been shown.
After adjusting the inputs, choose “Calculate targets” to update grams, calorie shares, and the complete arithmetic.