Skip to main content
AI Fit Hub

Nutrition

Macro Calculator

Convert a daily calorie target into protein, carbs, and fat grams based on your goal and split preference.

Your numbers

Start from an example

Units
Maintenance calories, TDEE (kcal/day)
Body weight (kg)

Sets protein in grams per kg; the other macros fill the remaining calories.

Goal
Macro split

Result

Daily calories
2,400kcal
Protein
144g
Carbs
228g
Fat
101g

Where the calories come from

Protein, carbs and fat as calories, adding up to the daily target.

Daily calories
2,400 kcal
Protein
144 g · 576 kcal
Carbs
228 g · 912 kcal
Fat
101 g · 912 kcal

Education, not medical advice. The result comes only from the published formula and your inputs. How we check our formulas.

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

  1. 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.
  2. Read the daily calorie target and the grams of protein, carbs and fat; the chart shows each as calories, adding up to the target.
  3. 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.
  4. 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.
  5. 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

Background on the Macro Calculator

All resources
All articles

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.

https://aifithub.io/api/run/macro-calculator?tdee=2400&calories=2400&weight_kg=80&goal=maintain&split=balanced

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.