Skip to main content
Health 9 min read

How to Calculate Your Macros: Protein, Carbs & Fat Formula with Examples

Learn how to calculate your macros step by step. Set calories, pick a protein-carb-fat ratio, and convert grams using the 4-4-9 formula with worked examples.

By Manoj Kumar Reviewed by Rahul Singh, Health Researcher

Introduction

To calculate your macros, first set a daily calorie target, then split those calories into protein, carbohydrates, and fat using a ratio such as 30/40/30, and finally convert each portion to grams by dividing protein and carb calories by 4 and fat calories by 9. That single sequence — calories, then ratio, then grams — is the entire method, and everything else is just refinement. If you would rather skip the arithmetic, the Macro Calculator does every step for you in seconds.

Macros, short for macronutrients, are the three nutrients your body needs in large amounts: protein, carbohydrate, and fat. Counting them instead of only counting calories tells you not just how much you are eating but what kind of fuel you are giving your body. Two people can eat the same 2,000 calories and get very different results depending on whether those calories come mostly from protein and vegetables or mostly from refined carbs and oil. This guide walks through the exact formula with real numbers so you can build a plan you understand rather than one you blindly copy.

The Numbers Behind Every Macro: The 4-4-9 Rule

Before you can split anything, you need the conversion factors that turn grams of food into calories. These are fixed values, sometimes called Atwater factors, and they do not change from person to person:

MacronutrientCalories per gram
Protein4
Carbohydrate4
Fat9
Alcohol7 (not a macro)

Fat is the most energy-dense, packing more than twice the calories per gram of protein or carbs. This is why a small amount of oil or butter can quietly add a lot of calories, and why fat grams look “small” on a label even when they contribute heavily to the total. Alcohol is included here only for context; it is not a macronutrient you plan around, but it does carry 7 calories per gram.

With these three numbers — 4, 4, and 9 — you can move in either direction: from grams to calories by multiplying, or from calories to grams by dividing.

Step 1: Find Your Daily Calorie Target

Macros are a way of dividing a calorie budget, so you need that budget first. Your target depends on your goal:

  • Maintenance: the calories that keep your weight stable. This is your Total Daily Energy Expenditure, or TDEE.
  • Weight loss: maintenance minus a deficit, commonly 15 to 25 percent below TDEE.
  • Muscle gain: maintenance plus a small surplus, commonly 5 to 15 percent above TDEE.

If you do not yet know your maintenance number, estimate your resting metabolism first (see our guide on what is BMR) and multiply by an activity factor. For this article we will assume a worked maintenance value and build from there.

Suppose Sarah’s TDEE is 2,200 calories and she wants to lose fat. She chooses a 20 percent deficit:

Deficit = 2,200 x 0.20 = 440 calories

Target = 2,200 - 440 = 1,760 calories per day

Sarah’s macro plan will divide 1,760 calories, not 2,200. Getting this base number right matters more than any ratio, because you cannot lose fat if your total intake still exceeds what you burn.

Step 2: Choose a Macro Ratio

A macro ratio is simply the percentage of your calories coming from each nutrient. There is no single “correct” split, but these starting points are well established and easy to adjust:

Goal / styleProteinCarbsFat
Balanced (default)30%40%30%
Higher protein / fat loss40%30%30%
Lower carb35%25%40%
Endurance / high activity25%55%20%

The percentages in each row must add up to 100. Protein is usually the anchor you set first because it drives muscle retention and appetite control; carbs and fat then fill the remaining calories according to your preference and how you train. Someone who loves running may push carbs higher, while someone who feels better on fewer carbs can shift toward the lower-carb row.

Step 3: Convert Percentages to Grams

This is where the 4-4-9 rule does its work. The formula for each macro is the same three-part move:

Calories from macro = Total calories x macro percentage

Grams = Calories from macro / calories-per-gram

Let us run Sarah’s full plan. Her target is 1,760 calories, and she picks the higher-protein split of 40 percent protein, 30 percent carbs, and 30 percent fat.

Protein (40%):

Calories = 1,760 x 0.40 = 704

Grams = 704 / 4 = 176 g protein

Carbohydrate (30%):

Calories = 1,760 x 0.30 = 528

Grams = 528 / 4 = 132 g carbs

Fat (30%):

Calories = 1,760 x 0.30 = 528

Grams = 528 / 9 = 58.7 g fat

So Sarah’s daily targets are roughly 176 g protein, 132 g carbs, and 59 g fat. Notice that even though carbs and fat both take 30 percent of her calories, the gram totals are very different — 132 versus 59 — because fat carries more than twice the calories per gram. This is the single most common source of confusion for beginners, and the 4-4-9 rule is what clears it up.

Checking the Math

A good habit is to convert your grams back to calories to make sure they land near your target:

(176 x 4) + (132 x 4) + (59 x 9)

= 704 + 528 + 531

= 1,763 calories

That is within a few calories of the 1,760 goal — the tiny difference comes from rounding the fat grams. If your reverse check is off by more than about 30 calories, you likely made an arithmetic slip somewhere.

A Second Worked Example: Muscle Gain

Let us run a completely different scenario so the pattern is clear. Marcus weighs 80 kg, trains hard, and wants to build muscle. His TDEE is 2,700 calories, and he adds a 10 percent surplus:

Surplus = 2,700 x 0.10 = 270

Target = 2,700 + 270 = 2,970 calories

He uses a balanced 30/45/25 split (protein/carbs/fat) to fuel training:

MacroPercentCalories (2,970 x %)Grams (calories / factor)
Protein30%891891 / 4 = 223 g
Carbs45%1,3371,337 / 4 = 334 g
Fat25%743743 / 9 = 83 g

Marcus aims for about 223 g protein, 334 g carbs, and 83 g fat. A quick sanity check on protein: 223 g across 80 kg of body weight is about 2.8 g per kg, which is on the higher end but reasonable for a hard-training lifter in a surplus. If that felt like too much protein to eat, he could drop protein to 25 percent and let carbs rise, since carbs are the primary fuel for heavy training.

Protein First: A Simpler Way to Anchor Your Plan

Percentages are convenient, but many practitioners prefer to set protein by body weight and let it drive everything else, because protein needs scale with your size, not with your calorie total. A widely used range is 1.6 to 2.2 grams of protein per kilogram of body weight, or roughly 0.7 to 1.0 grams per pound.

Here is how that looks across different body weights at the middle of the range (2.0 g/kg):

Body weightProtein target (2.0 g/kg)
55 kg110 g
70 kg140 g
85 kg170 g
100 kg200 g

Once protein grams are fixed, multiply by 4 to get protein calories, subtract that from your daily target, and split the remaining calories between carbs and fat however you like. This method keeps protein stable even when you adjust calories up or down, which is exactly what you want when dieting: you cut calories from carbs and fat while protecting the muscle-preserving protein floor.

How Macros Shift Between Weight Loss and Muscle Gain

The calculation never changes, but the inputs do. The table below shows the same person — maintenance 2,400 calories — under two goals, both using a protein-first approach:

SettingFat lossMuscle gain
Calorie target1,920 (-20%)2,640 (+10%)
ProteinHigh (preserve muscle)High (build muscle)
CarbsModerateHigher (fuel training)
FatModerateModerate

In a deficit, protein stays high on purpose: when calories are scarce, adequate protein signals your body to hold onto lean tissue and burn fat instead. In a surplus, carbs typically rise to power more intense sessions. To understand the deficit side in depth, see our guide on the calorie deficit for weight loss.

Common Mistakes to Avoid

  • Forgetting fat is 9 calories, not 4. Dividing fat calories by 4 instead of 9 inflates your fat grams by more than double and blows past your calorie target.
  • Setting calories wrong first. The most precise ratio is useless if your calorie base is guessed. Nail down maintenance before splitting anything.
  • Chasing perfect percentages daily. Landing within 5 to 10 grams of each target is plenty. Weekly consistency beats daily perfection.
  • Ignoring protein and only watching calories. Two 1,800-calorie days can produce very different body composition results depending on protein intake.
  • Not weighing or measuring food at the start. Eyeballing portions is the biggest source of tracking error; a cheap kitchen scale fixes it fast.
  • Mixing net carbs and total carbs. Pick one convention and use it everywhere, or your daily totals will never reconcile with your target.
  • Drinking your macros without counting them. Oils, sugary drinks, and alcohol add up quickly and are easy to forget when logging.
  • Never recalculating. As your weight changes, your maintenance calories change too. Re-run the numbers every few weeks.

Putting It All Together

Calculating macros comes down to three moves you now know by heart: set your calorie target, choose a ratio (or anchor protein by body weight), and convert to grams using 4 for protein, 4 for carbs, and 9 for fat. Do a quick reverse check by multiplying your grams back into calories, and you can trust the plan. From there it is about consistency — logging honestly, hitting protein, and recalculating as your body changes.

Rather than run the arithmetic by hand every time your weight or goal shifts, let the Macro Calculator handle the conversions and give you clean gram targets instantly. To sharpen the two inputs that feed into it, brush up on your metabolism with what is BMR and learn how to set the right energy gap in our calorie deficit weight loss guide. Master those three tools together and you will never have to guess about your nutrition again.

Frequently Asked Questions

How do I calculate my macros for the first time? +

Start with your daily calorie target, then split it into protein, carbohydrate, and fat percentages. Convert each percentage to calories, then divide by 4 for protein, 4 for carbs, and 9 for fat to get grams. A common beginner split is 40 percent carbs, 30 percent protein, and 30 percent fat.

How many grams of protein should I eat per day? +

A widely cited range for active adults is 1.6 to 2.2 grams of protein per kilogram of body weight, which is roughly 0.7 to 1.0 grams per pound. Someone weighing 70 kg would aim for about 112 to 154 grams daily. Higher amounts help preserve muscle in a calorie deficit.

Do I have to hit my macros exactly every day? +

No. Aim to land within about 5 to 10 grams of each target. Protein is the most important number to hit consistently, while carbs and fat can flex based on your appetite and workouts. Weekly averages matter more than any single day.

Should I count net carbs or total carbs when tracking macros? +

Most general macro plans use total carbohydrates, which already includes fiber. Net carbs, meaning total carbs minus fiber, are mainly used on ketogenic diets to estimate blood-sugar impact. Pick one method and stay consistent so your daily totals line up with your target.

Can my macros be different for weight loss versus muscle gain? +

Yes. For weight loss you eat below maintenance calories while keeping protein high to protect muscle. For muscle gain you eat slightly above maintenance with enough protein and carbs to fuel training. The protein-carb-fat ratio shifts, but the calculation method is identical.

M

Manoj Kumar

NovaCalculator Editorial Team

Our writers combine mathematical expertise with clear writing to make calculations accessible to everyone. Content is checked against authoritative sources including NIST, WHO, and CFPB.

Try the Calculator

Macro Calculator

Use the free tool to calculate instantly — no signup needed.

Open Calculator →

Share this article