Most diet advice stops at a calorie number: eat 2,000, eat 1,600, eat whatever your app says. But two people eating the same 1,800 calories a day can end up with completely different results depending on where those calories come from. That's what macros are for -- splitting a calorie total into protein, carbohydrate, and fat, each of which behaves differently in the body. The arithmetic behind that split is simpler than it looks once you know three numbers: 4, 4, and 9.
Where 4, 4, and 9 come from
Every gram of protein supplies about 4 calories. Every gram of carbohydrate also supplies about 4 calories. Every gram of fat supplies about 9 calories -- more than double. These are the Atwater factors, named after the chemist who measured them over a century ago by burning food in a calorimeter and later refining the numbers for how the body actually digests and absorbs each macronutrient. They're approximations, not exact physics, but they're the numbers every nutrition label and every macro calculator on the internet uses.
The immediate consequence: fat is calorie-dense. A tablespoon of olive oil (about 14 grams) is roughly 120 calories, while 14 grams of plain rice is about 56. Neither is inherently "better" -- but if you're trying to hit a specific calorie number, fat grams move that number twice as fast as protein or carb grams do.
Calories come first, grams come second
A macro split only means something once you already know your daily calorie target. If someone tells you "eat 40% protein, 30% carbs, 30% fat" without reference to a total, that percentage is meaningless -- 40% of 1,500 calories and 40% of 3,000 calories produce completely different amounts of actual food. The correct order is: figure out your total daily energy expenditure (TDEE) first, decide whether you're cutting, maintaining, or building muscle, and only then split that number into grams.
Once you have a calorie total, the conversion is direct. If your plan calls for 30% of calories from protein and your target is 2,000 calories, that's 600 calories from protein. Divide by 4 (calories per gram) and you get 150 grams of protein per day. Do the same division by 4 for carbs and by 9 for fat, and the three gram totals should add back up to your original calorie number -- that's the check that the math is internally consistent.
Why the split changes with your goal
The percentage breakdown isn't fixed. Someone cutting calories to lose fat typically wants a higher protein percentage than someone at maintenance, because protein helps preserve muscle while you're in a deficit and it's more satiating per calorie, which matters when you're eating less overall. Someone focused on building muscle usually keeps protein high and carbs relatively generous to fuel training. Someone just trying to maintain weight has more flexibility in how the remaining calories are divided between carbs and fat, since neither one has as strong a specific claim on "this needs to be high for this goal" as protein generally does.
This is also why generic macro ratios you see repeated online -- "40/30/30" being the most common -- aren't universal truths. They're starting points. The right split depends on body weight, activity level, and what you're actually trying to achieve, which is why protein targets specifically are often set in grams per kilogram of body weight rather than as a flat percentage, then the remaining calories get split between carbs and fat.
The mistake: chasing grams without checking the calorie math
A common error is hitting a protein gram target that someone saw recommended, without checking what that does to the rest of the day's calorie budget. If your calorie target is 2,000 and you eat 220 grams of protein (880 calories) plus a typical amount of fat, you may not have much room left for carbs before you've blown through the total -- or you quietly end up well over your calorie target without noticing, because grams of food don't visually signal calories the way a running total does. The gram number only makes sense alongside the calorie number it came from.
Working all of this out by hand means several rounds of percentage math and unit conversion for every adjustment. The Macro Calculator takes your calorie needs and diet goal and converts them straight into protein, carb, and fat targets in grams, using the same 4-4-9 conversion factors described above, so you can see the actual numbers instead of re-deriving them every time your target changes.