Nutrition
Macro Calculator
Convert a daily calorie target into protein, carbs, and fat grams based on your goal and split preference.
Result
Where the calories come from
Protein, carbs and fat as calories, adding up to the daily target.
What does the Macro Calculator calculate, and which formula does it use?
The Macro Calculator turns your TDEE and goal into daily protein, carb, and fat targets. It first scales calories — maintain ×1.0, cut ×0.85, bulk ×1.1 — then sets protein per bodyweight (1.8 g/kg maintaining, 2.2 cutting, 2.0 bulking), and splits the remaining calories into carbs and fat by your chosen ratio, counting 4 kcal per gram of protein or carbs and 9 per gram of fat.
Last updated .
How to use it
- Enter your maintenance calories (TDEE, from the TDEE Calculator) and body weight, then pick a goal and a split. The goal sets calories (maintain, cut 15%, bulk +10%) and protein per kg (1.8, 2.2 or 2.0 g); the split decides how the rest divides between carbs and fat, and the higher-protein split adds 0.3 g/kg of protein.
- Read the daily calorie target and the grams of protein, carbs and fat; the chart shows each as calories, adding up to the target.
- If you train hard, put a good share of the day's carbohydrate in the meals before and after training; total daily intake still matters more than the exact split.
- If full macro tracking feels like too much, start with calories and protein: those two do most of the work, and carbohydrate and fat can float within the totals.
- Keep fat from falling too low: the calculator warns under 0.5 g per kg of body weight (about 0.23 g per lb). If a split or a deep cut pushes fat that low, pick a split with more fat or a smaller cut.
Questions people usually ask
How does the calculator set my macros?
It starts from your maintenance calories, adjusts them for your goal (maintain, a 15% cut or a 10% surplus) and sets protein per kilogram of body weight: 1.8 g/kg to maintain, 2.2 g/kg in a cut and 2.0 g/kg in a bulk. The split you pick divides the remaining calories between carbohydrate and fat; the higher-protein split adds 0.3 g/kg of protein.
Why is protein set per kilogram instead of as a percentage?
Protein needs scale with body size, not with calories. Gains in fat-free mass levelled off at about 1.6 g per kg of body weight a day in a meta-analysis of 49 trials (Morton 2018), and lean lifters in a deficit may need more (Helms 2014). A percentage of calories would give a small person on a high intake too much and a large person in a deep cut too little.
How low can fat go?
The calculator warns below 0.5 g of fat per kilogram of body weight. For adults, the Institute of Medicine's acceptable range is 20-35% of calories from fat; very low intakes make it harder to get essential fatty acids and absorb fat-soluble vitamins.
Do I need to hit every number exactly?
No. Calories and protein do most of the work; carbohydrate and fat can vary from day to day as long as the weekly totals are close. Check your maintenance figure against your weight trend after 2-3 weeks and adjust.
Is this medical advice?
No. This tool provides general fitness estimates and should not replace medical guidance.
Is this tool free and private to use?
Yes. AI Fit Hub tools are free, no-signup browser tools. Inputs stay in your browser unless you choose to share a URL.
The same numbers as a table
- Reference Macros by calories and bodyweight
Computed by this calculator's engine across common inputs, to cite or download as CSV.
Related calculators
- Nutrition TDEE Calculator
Estimate your daily energy expenditure with Mifflin-St Jeor + activity factors.
- Nutrition Protein Intake Calculator
Get daily protein targets based on training level and goal.
- Nutrition Intermittent Fasting Window Planner
Plan protocol-based eating and fasting windows with a 24-hour timeline and 5:2 day picker.
- Planning Calorie Deficit Calculator
Estimate required daily calorie deficit for a target timeline and bodyweight change.
Background on the Macro Calculator
- Guide How to Calculate Macros for Bulking: A Complete Guide
Calculate macros for a lean bulk: a 200-300 kcal surplus over TDEE, protein at 1.6-2.2 g/kg, fat at 0.7-1.0 g/kg, then carbs, adjusted every 3-4 weeks.
- Comparison 16:8 vs OMAD: Which Intermittent Fasting Protocol Is Better?
Compare 16:8 and OMAD fasting for fat loss, muscle retention, adherence, and health. Evidence-based analysis of when each protocol makes sense.
- Checklist Weekly Meal Prep Checklist
A weekly meal prep checklist: set macro targets, plan meals, shop from a list, batch-cook, and store cooked food safely within 2 hours of cooking.
- Statistics Creatine Statistics: Effects on Strength, Power & Health
Creatine statistics: strength and power gains, dosing, safety and the evidence on cognition, each figure with the peer-reviewed study it comes from.
- Comparison Is MyFitnessPal Accurate? TDEE Calculator vs MyFitnessPal
TDEE calculator vs MyFitnessPal: a calculator shows how your calorie target is built; a food logger tracks what you eat against it. How to use them together.
- Statistics Meal Prep Statistics: Cooking & Adherence Outcomes
Meal prep statistics: home cooking, portion size, meal planning and food-tracking accuracy, each figure with the study it comes from.
Articles
- 11 min read GLP-1 Muscle Loss: Keep Lean Mass with Lifting and Protein
GLP-1 weight loss costs lean mass: 25-39% of the total. How lifting 2-3x weekly and 1.2-1.6 g/kg protein hold muscle, and where the magnitude is debated.
- 12 min read Protein for Muscle Gain: 1.6 g/kg (Morton 2018)
Morton 2018 placed the protein plateau at 1.6 g/kg with a 95% CI upper bound near 2.2 g/kg (49 studies, n=1,863). Cutting raises it to 2.3-3.1 g/kg lean.
- 11 min read TDEE Formulas Compared: Mifflin vs Harris vs Katch
TDEE formulas compared: Mifflin-St Jeor, Harris-Benedict, Katch-McArdle, WHO/FAO. Population, error bands, and when each estimator is appropriate.
By goal
Use it from an agent or code
Any agent can run this calculator by URL: put the inputs in the query string and get JSON back, with the inputs that used defaults and a line to cite (add format=md for markdown). MCP clients reach it through https://aifithub.io/mcp.
In code, import the same module; it runs where you import it, with no request or key.
import { compute } from "https://aifithub.io/engines/macro-calculator.js"; Input and output contract, TypeScript types and the guide for agents.