Macro Calculator

Split a daily calorie target into protein, carbohydrate and fat grams.

kcal
%
%
%
Protein
Carbohydrate
Fat

Results update as you type.

About this calculator

A macro calculator turns a daily calorie target into grams of protein, carbohydrate and fat using a chosen ratio. It relies on the Atwater energy values — 4 calories per gram of protein and carbohydrate and 9 calories per gram of fat — so the three macros always add back up to your target. Pick a preset split or enter your own percentages under advanced options.

The math is identical for every macro: grams = (calories × macro %) ÷ calories-per-gram. Take a 2,000 kcal balanced 30/40/30 plan. Protein is 2,000 × 0.30 ÷ 4 = 150 g, carbohydrate is 2,000 × 0.40 ÷ 4 = 200 g, and fat is 2,000 × 0.30 ÷ 9 ≈ 67 g. Those convert back to 600 + 800 + 600 = 2,000 calories, confirming the split is internally consistent.

Use it after you have a calorie target from a TDEE or calorie-deficit calculator: macros decide the composition of those calories, which affects satiety, training performance and how much muscle you keep in a diet. Higher-protein splits suit people building or preserving muscle, endurance splits load more carbohydrate for glycogen, and keto splits push carbs very low. Total calories still drive weight change more than the exact ratio.

Frequently asked questions

How are macros converted from calories to grams?

Each macro has an energy value: protein and carbohydrate are 4 calories per gram and fat is 9 calories per gram. Grams = (calories × macro %) ÷ calories-per-gram. For a 2,000 kcal 30/40/30 split that is 150 g protein, 200 g carbs and 67 g fat.

What is a good macro split?

A balanced 30/40/30 works for most people, higher protein (around 40%) helps when building or preserving muscle, and a keto split keeps carbs very low. There is no single best ratio — total calories matter more than the exact split.

Do the three macros add up to my calories?

Yes. Because the percentages you choose total 100%, the calories from protein, carbs and fat always sum back to your daily target.

How many grams of protein are in a 2,000-calorie diet?

It depends on the protein percentage. At 30% protein it is 150 g (2,000 × 0.30 ÷ 4), and at 40% it is 200 g. Change the split and the calculator recomputes the grams for each macro.

What are good keto macros?

The keto preset uses 25% protein, 5% carbohydrate and 70% fat. On 2,000 kcal that is roughly 125 g protein, 25 g carbs and 156 g fat — carbs are kept very low to encourage the body to run on fat and ketones.

Should I count net or total carbohydrate?

This tool works in total carbohydrate grams derived from calories. Net carbs (total minus fibre) is a separate tracking choice popular on low-carb diets; whichever you follow, keep it consistent from day to day.

Do my macros change on rest days?

The calculator splits whatever calorie target you enter, so if you eat fewer calories on rest days, enter that lower number and every macro scales down. Many people keep protein steady and trim mostly carbohydrate on non-training days.

❤️ Love Calculator.Free? Share it

𝕏  X Facebook Reddit
API — use this calculator from code

Call this calculator as a free JSON endpoint — no key required. Send the field values below as query parameters or JSON. Read the full API docs →

Endpoint

GET https://calculator.free/api/v1/macro/

curl

curl "https://calculator.free/api/v1/macro/?calories=2000&split=30-40-30"

JavaScript fetch()

const r = await fetch(
  "https://calculator.free/api/v1/macro/?" + new URLSearchParams({
    "calories": "2000",
    "split": "30-40-30"
  }));
const data = await r.json();
console.log(data.results);

Results are estimates for general guidance only, not financial, medical or tax advice.