Calculating macros in food comes down to three numbers: protein and carbohydrates each contain 4 calories per gram, and fat contains 9 calories per gram. With those constants and a food label (or a database entry), you can break any food down into its exact macro profile. The process gets more interesting when you’re working with recipes, cooked foods, or trying to hit a personal daily target.
The Core Math Behind Every Macro Calculation
Every macro calculation uses the same foundation. Protein has 4 calories per gram, carbohydrates have 4 calories per gram, and fat has 9 calories per gram. If a food label says a serving has 20 grams of protein, 30 grams of carbs, and 10 grams of fat, the calorie breakdown looks like this:
- Protein: 20g × 4 = 80 calories
- Carbs: 30g × 4 = 120 calories
- Fat: 10g × 9 = 90 calories
- Total: 290 calories
You’ll sometimes notice the total doesn’t perfectly match the calorie count on the label. That’s normal. Rounding rules, fiber content, and minor ingredients account for small differences. If the gap is more than 10 to 15 calories, the label may also include alcohol or sugar alcohols that affect the count.
How to Set Your Daily Macro Targets
Before calculating macros in individual foods, you need to know what you’re aiming for each day. That starts with estimating how many calories your body burns, then splitting those calories among protein, carbs, and fat.
Step 1: Estimate Your Daily Calories
The most widely used formula for this is the Mifflin-St Jeor equation, which estimates your resting metabolic rate based on weight, height, and age:
- For men: (10 × weight in kg) + (6.25 × height in cm) − (5 × age) + 5
- For women: (10 × weight in kg) + (6.25 × height in cm) − (5 × age) − 161
That gives you a baseline. Then multiply by an activity factor to get your Total Daily Energy Expenditure (TDEE): 1.2 for sedentary (desk job, little exercise), 1.375 for lightly active (light exercise one to three days per week), 1.55 for moderately active (exercise three to five days), 1.725 for active (hard exercise six to seven days), or 1.9 for very active (intense training or a physical job). A 35-year-old woman who weighs 68 kg (150 lbs), stands 165 cm (5’5″), and exercises moderately would calculate: (10 × 68) + (6.25 × 165) − (5 × 35) − 161 = 1,351 calories at rest, then 1,351 × 1.55 = roughly 2,094 calories per day.
Step 2: Split Calories Into Macros
The Dietary Guidelines for Americans recommend adults get 10 to 35 percent of calories from protein, 45 to 65 percent from carbohydrates, and 20 to 35 percent from fat. These are broad ranges, and where you land depends on your goals. Someone focused on building muscle typically pushes protein toward 25 to 30 percent. Someone on a lower-carb plan might bring carbs down to 40 percent and raise fat to compensate.
Using our example of 2,094 daily calories with a 30/40/30 split (protein/carbs/fat):
- Protein: 2,094 × 0.30 = 628 calories ÷ 4 = 157g
- Carbs: 2,094 × 0.40 = 838 calories ÷ 4 = 209g
- Fat: 2,094 × 0.30 = 628 calories ÷ 9 = 70g
Now you have a daily gram target for each macro. The rest is just adding up the foods you eat and comparing.
Calculating Macros From a Nutrition Label
Packaged foods make this straightforward because the label already lists grams of protein, total carbohydrates, and total fat per serving. Your main job is getting the serving size right. If the label says a serving is 2/3 cup (55g) and you eat a full cup, multiply every macro by 1.5. A kitchen scale removes the guesswork here, especially for dense foods like nuts, cheese, or granola where volume measurements can be wildly inaccurate.
For whole foods without labels (a chicken breast, a banana, a handful of almonds), you’ll need a food database. The USDA’s FoodData Central is the most comprehensive free option. Search the food, note the macros per 100 grams, then weigh your portion and scale accordingly. If 100g of raw chicken breast has 31g of protein and you’re eating 150g, that’s 46.5g of protein.
Calculating Net Carbs
If you’re tracking net carbs rather than total carbs, the math changes slightly. The basic version: subtract all fiber grams from total carbohydrate grams, since fiber isn’t digested for energy. A food with 25g total carbs and 7g fiber has 18g net carbs.
Sugar alcohols (common in protein bars, sugar-free candy, and keto products) add a wrinkle. The UCSF Diabetes Teaching Center recommends subtracting half the sugar alcohol grams from total carbs, because sugar alcohols are partially absorbed. So a protein bar with 29g total carbs and 18g sugar alcohols would be: 29 − (18 ÷ 2) = 20g net carbs. Erythritol is the one exception that’s almost completely unabsorbed, so some people subtract it fully.
The Raw vs. Cooked Weight Problem
This trips up a lot of people. Nutrition databases typically list macros for raw food, but you’re usually eating cooked food that weighs less due to water and fat loss. A baked chicken breast retains only about 72 percent of its raw weight. So if you started with 200g of raw chicken breast, the cooked piece weighs roughly 144g, but it still contains the same macros as the original 200g raw portion. All the protein is still there; only water evaporated.
You have two options. The easier one: weigh your food raw, log the raw weight, and use the raw nutrition data. The second option: weigh it cooked and use a cooked entry in your database (USDA has separate entries for raw and cooked versions of most meats). Just never mix them, like weighing cooked chicken but logging the raw nutrition data. That will significantly overcount your protein.
USDA cooking yield data gives you a sense of how much shrinkage to expect. Ground beef patties lose 25 to 37 percent of their weight depending on fat content and cooking method. Leaner cuts shrink less. A grilled ribeye retains about 84 percent of its raw weight, while a pan-broiled high-fat burger patty drops to 69 percent. Pork tenderloin holds about 80 percent. Knowing these ranges helps you work backward if you forgot to weigh before cooking.
How to Calculate Macros in a Recipe
Home-cooked meals with multiple ingredients require a few extra steps, but the logic is simple.
First, list every ingredient and its weight in grams. Look up each ingredient in a food database and record the protein, carbs, and fat. Add up the totals for the entire recipe. Then divide by the number of servings. If a pot of chili uses 500g ground beef, 400g kidney beans, 200g onion, and 400g diced tomatoes, you’d calculate the macros for each ingredient at those weights, sum them, and divide by however many portions you plan to eat.
The most reliable way to portion a recipe is by total weight rather than visual estimation. Weigh the entire finished dish, then divide by servings. If your chili weighs 1,400g total and you want 4 servings, each serving is 350g. Scoop out 350g on a scale, and you know the macros precisely. This avoids the problem of some bowls ending up with more meat or beans than others.
Online recipe calculators (Verywell Fit, MyFitnessPal, Cronometer) automate this process. You enter ingredients and serving count, and the tool pulls database values automatically. These are helpful for speed, but double-check that the tool selected the right version of each ingredient, especially for items like canned vs. dried beans or raw vs. cooked rice, where the macro density per gram is very different.
How Alcohol Fits Into Macro Tracking
Alcohol contains 7 calories per gram, which puts it between carbs and fat in caloric density. It doesn’t fit neatly into the three standard macros, so tracking it requires a workaround. The simplest approach: take the total calories in a drink and “borrow” from your carb or fat budget.
To count a drink as carbs, divide the drink’s total calories by 4. A 132-calorie glass of red wine becomes 33g of carbs. To count it as fat instead, divide by 9, giving you about 15g of fat. You can also split the difference, counting half the calories as carbs and half as fat. The numbers won’t perfectly reflect what’s happening metabolically (your body processes alcohol through its own pathway), but this method keeps your calorie total accurate, which is what matters for body composition goals.
Practical Tips for Accuracy
A digital kitchen scale is the single biggest upgrade for macro accuracy. Measuring cups work for liquids, but they’re unreliable for solids. A “tablespoon” of peanut butter can vary from 10g to 20g depending on how generously you scoop, and that difference is 5 to 10 grams of fat.
Cooking oils are the most commonly underestimated ingredient. A tablespoon of olive oil adds 14g of fat and 120 calories. If you’re pouring from the bottle without measuring, you could easily be adding two to three tablespoons to a pan, which is 30 to 40 grams of untracked fat. Measuring or using an oil sprayer keeps this visible.
Condiments, sauces, and dressings add up faster than most people expect. Two tablespoons of ranch dressing is 13g of fat. A squeeze of ketchup is 4 to 5g of carbs. These small additions don’t need obsessive tracking, but ignoring all of them can create a 100 to 200 calorie blind spot across a full day of meals. Logging them, even roughly, closes that gap.

