🥗 Macronutrient (Macro) Calculator
By ToolNimba Health Team · Reviewed by ToolNimba Editorial Review, health content · Updated 2026-06-19
This calculator gives a general estimate, not medical or dietary advice. The right macro split depends on your goals, training, body composition and any health conditions. Talk to a doctor or registered dietitian before making big changes to your diet, especially if you are pregnant, under 18, or managing a medical condition.
A macro calculator turns a daily calorie target into grams of the three macronutrients: protein, carbohydrate and fat. Enter how many calories you plan to eat each day, choose a goal preset (balanced, low-carb or high-protein), and the tool splits those calories into gram targets for each macro. Because every macro stores a known amount of energy, the conversion is straightforward arithmetic once you decide on a percentage split.
What is the Macro Calculator?
Macronutrients, or macros, are the three nutrients your body needs in large amounts for energy: protein, carbohydrate and fat. Each carries a fixed amount of energy per gram. Protein and carbohydrate both provide about 4 calories per gram, while fat is more energy dense at roughly 9 calories per gram. Alcohol provides about 7 calories per gram, but it is not a true macronutrient and is left out of standard macro plans.
A macro split is just a way of deciding what share of your daily calories should come from each macro. A balanced plan might be 40% carbohydrate, 30% protein and 30% fat. A low-carb plan shifts calories away from carbohydrate and toward fat, while a high-protein plan raises the protein share to support muscle retention during a diet. The percentages always add up to 100, so once you set them the gram targets follow automatically: multiply your calories by each percentage, then divide by the energy per gram for that macro.
This tool starts from a calorie target you provide, which keeps it simple and flexible. If you do not yet know your daily calories, work out your maintenance level first with a TDEE or calorie calculator, then adjust up or down for your goal before bringing the number here. Remember that the gram targets are a guide rather than a rule: real diets vary day to day, food labels round their figures, and protein needs in particular depend on your body weight and activity, so treat the output as a sensible starting point.
When to use it
- Turning a calorie goal from a TDEE calculator into daily protein, carb and fat targets you can actually track.
- Comparing how a balanced, low-carb and high-protein split change your gram targets at the same calorie level.
- Setting up a food tracking app, which usually asks for macro targets in grams rather than percentages.
How to use the Macro Calculator
- Enter your daily calorie target in kilocalories (kcal).
- Choose a goal preset: balanced, low-carb or high-protein.
- Read the gram target for protein, carbohydrate and fat.
- Check the calories per macro shown underneath to confirm they add up to your target.
- Log these gram targets in your food tracker or meal plan.
Formula & method
Worked examples
2,000 kcal a day on a balanced 40% carb, 30% protein, 30% fat split.
- protein = 2000 × 30 ÷ 100 = 600 kcal, then 600 ÷ 4 = 150 g
- carbs = 2000 × 40 ÷ 100 = 800 kcal, then 800 ÷ 4 = 200 g
- fat = 2000 × 30 ÷ 100 = 600 kcal, then 600 ÷ 9 = about 67 g
Result: About 150 g protein, 200 g carbs and 67 g fat
2,500 kcal a day on a low-carb 25% carb, 35% protein, 40% fat split.
- protein = 2500 × 35 ÷ 100 = 875 kcal, then 875 ÷ 4 = about 219 g
- carbs = 2500 × 25 ÷ 100 = 625 kcal, then 625 ÷ 4 = about 156 g
- fat = 2500 × 40 ÷ 100 = 1000 kcal, then 1000 ÷ 9 = about 111 g
Result: About 219 g protein, 156 g carbs and 111 g fat
Energy provided by each macronutrient
| Macronutrient | Calories per gram |
|---|---|
| Protein | 4 kcal |
| Carbohydrate | 4 kcal |
| Fat | 9 kcal |
| Alcohol (not a macro) | 7 kcal |
Goal presets used by this calculator (carb / protein / fat)
| Goal | Carbs | Protein | Fat |
|---|---|---|---|
| Balanced | 40% | 30% | 30% |
| Low-carb | 25% | 35% | 40% |
| High-protein | 40% | 40% | 20% |
Common mistakes to avoid
- Using the wrong calories per gram for fat. Fat carries about 9 calories per gram, not 4 like protein and carbs. Dividing fat calories by 4 instead of 9 overstates your fat grams by more than double.
- Setting percentages that do not add to 100. The carb, protein and fat shares must total 100%. If they do not, your gram targets will not add back up to your calorie goal. The presets here are already balanced for you.
- Ignoring protein relative to body weight. A percentage split can leave protein too low for an active person. Many guidelines suggest 1.6 to 2.2 grams of protein per kilogram of body weight, so sanity-check the gram target against your weight.
- Treating the gram targets as exact rules. Food labels round their figures and diets vary day to day. Hitting your macros within a small range over the week matters more than matching every gram at every meal.
Glossary
- Macronutrient
- A nutrient the body needs in large amounts for energy: protein, carbohydrate or fat.
- Macro split
- The share of daily calories assigned to each macronutrient, expressed as percentages that add up to 100.
- Protein
- A macronutrient that builds and repairs tissue and supports muscle. It provides about 4 calories per gram.
- Carbohydrate
- A macronutrient that is the body main quick energy source. It provides about 4 calories per gram.
- Fat
- A macronutrient used for energy, hormones and absorbing some vitamins. It provides about 9 calories per gram.
- Calorie (kcal)
- A unit of food energy. One kilocalorie (kcal) is what is commonly labelled as a calorie on food packaging.
Frequently asked questions
What is a macro calculator?
A macro calculator splits a daily calorie target into grams of protein, carbohydrate and fat. You give it your calories and a goal, and it works out how many grams of each macro to aim for, based on the fixed energy each macro provides per gram.
How are macros calculated from calories?
Each macro percentage is multiplied by your total calories to get the calories from that macro, then divided by its energy per gram: 4 for protein, 4 for carbs and 9 for fat. The result is the gram target. This tool does both steps for every macro.
What is the best macro split?
There is no single best split. A balanced 40% carb, 30% protein, 30% fat works for many people, while low-carb or high-protein splits suit different goals. The most important factors are hitting your calorie target and getting enough protein, so pick a split you can stick to.
How many calories are in protein, carbs and fat?
Protein and carbohydrate each provide about 4 calories per gram, while fat provides about 9 calories per gram. That is why fat targets in grams look smaller than carb or protein targets at the same calorie share.
Do I need to know my calories first?
Yes. This tool starts from a daily calorie target you enter. If you do not know it, work out your maintenance calories with a TDEE calculator, then adjust for losing or gaining weight before splitting those calories into macros here.
Does this macro calculator store my data?
No. Everything is calculated in your browser. Nothing you enter is sent to a server or saved anywhere, so your numbers stay private to you.
Sources
- Dietary Guidelines for Americans 2020-2025 , U.S. Department of Agriculture (2020)
- Carbohydrates, Protein and Fat (food energy) , Harvard T.H. Chan School of Public Health, The Nutrition Source