Macro Calculator

Counting total calories is a good start, but knowing how those calories should be divided among protein, carbohydrates, and fat is what separates mediocre nutrition from an optimized plan.

Reviewed by: CalcMojo Editorial Team

This macro calculator uses the IIFYM (If It Fits Your Macros) framework to calculate your ideal macronutrient breakdown based on your calorie target, body weight, and fitness goal.

The tool starts with your Total Daily Energy Expenditure (TDEE), adjusts it for your goal (fat loss, maintenance, or muscle gain), then distributes those calories across the three macronutrients based on evidence-based recommendations. Protein is set first, based on your lean body mass and activity level, then fat is allocated to meet minimum health requirements, and the remaining calories are assigned to carbohydrates.

The IIFYM approach, popularized in evidence-based fitness communities, is grounded in the principle that overall macronutrient and calorie intake matters more than specific food choices for body composition. While food quality matters for health, micronutrient intake, and satiety, the macronutrient totals drive whether you gain muscle, lose fat, or maintain weight. This calculator gives you the specific gram targets to hit each day, taking the guesswork out of meal planning.

What Are Macronutrients?

Macronutrients are the three categories of nutrients that provide calories and serve as the building blocks for all bodily functions. Each plays a distinct role in health and body composition.

Protein (4 calories per gram). Protein is made up of amino acids, which are the building blocks for muscle tissue, enzymes, hormones, and immune cells. Adequate protein intake is essential for muscle preservation during fat loss, muscle growth during a surplus, post-exercise recovery, and maintaining lean body mass as you age. The thermic effect of protein is 20-30%, meaning your body burns 20-30% of protein calories just digesting it, the highest of any macronutrient.

Carbohydrates (4 calories per gram). Carbohydrates are the body’s preferred fuel source for high-intensity exercise and brain function. They are stored as glycogen in the muscles and liver. Adequate carbohydrate intake supports workout performance, recovery, and mood. Carbohydrates include sugars, starches, and fiber. Fiber, while technically a carbohydrate, is largely indigestible and provides minimal calories while supporting digestive health and satiety.

Fat (9 calories per gram). Dietary fat is essential for hormone production (including testosterone and estrogen), vitamin absorption (vitamins A, D, E, and K are fat-soluble), cell membrane integrity, and brain function. Fat is the most calorie-dense macronutrient at 9 calories per gram, which means small amounts contribute significant calories. Minimum fat intake should not drop below 20% of total calories for hormonal health.

How the IIFYM Approach Works

IIFYM (If It Fits Your Macros) is a flexible dieting approach that focuses on meeting daily macronutrient targets rather than following rigid meal plans or eliminating specific foods. The foundational principle is that body composition changes are driven primarily by calorie balance and macronutrient distribution, not by meal timing, food combinations, or the "cleanliness" of individual food choices.

The practical application is straightforward: calculate your daily calorie and macro targets, then eat whatever combination of foods allows you to hit those targets. A person targeting 180g protein, 250g carbs, and 70g fat could reach those numbers through chicken breast and brown rice or through Greek yogurt, fruit, and whole-grain pasta. The body composition outcome is the same as long as the macro totals match.

This does not mean food quality is irrelevant. Whole, minimally processed foods provide more micronutrients, fiber, and satiety per calorie than highly processed alternatives. But the IIFYM framework acknowledges that perfection is the enemy of consistency, and a flexible approach that allows favorite foods in moderation is more sustainable than rigid meal plans.

Setting Your Protein Target

Protein is the most important macronutrient to set correctly because it has the greatest impact on body composition, satiety, and metabolic rate.

For fat loss: 0.8-1.2 grams per pound of body weight. Higher protein intake during a calorie deficit preserves lean muscle mass, increases satiety (reducing hunger), and maintains a higher metabolic rate through the thermic effect of food. A 2016 study published in the American Journal of Clinical Nutrition found that subjects eating 1.1 g/lb of protein during an aggressive calorie deficit gained lean mass while losing fat, compared to a lower-protein group that lost both fat and muscle.

For maintenance: 0.7-1.0 grams per pound of body weight. At maintenance calories, protein requirements are slightly lower because the body is not under the stress of a calorie deficit.

For muscle gain: 0.8-1.0 grams per pound of body weight. During a calorie surplus, protein needs do not increase as much as people assume because the surplus itself provides a muscle-sparing effect. The excess calories from carbohydrates and fat allow protein to be used primarily for muscle synthesis rather than energy.

For overweight individuals: Use your target body weight or lean body mass rather than current total weight when calculating protein needs. A 250-pound individual at 35% body fat does not need 250 grams of protein per day. Calculating based on a target weight of 180 pounds yields a more practical 144-180 grams.

Setting Your Fat Target

Fat intake should be set as a percentage of total calories, with a minimum floor for hormonal and metabolic health.

Minimum: 20% of total calories, or approximately 0.3 grams per pound of body weight. Dropping below this threshold can impair hormone production, particularly testosterone and estrogen, and compromise absorption of fat-soluble vitamins.

Recommended range: 25-35% of total calories for most people. Higher fat intakes (up to 40%) may benefit individuals who prefer a higher-fat diet style, have insulin resistance, or perform lower-intensity endurance activities. Lower fat intakes (20-25%) may benefit those who prefer more carbohydrates for high-intensity training.

Fat targets are relatively flexible compared to protein. Once you meet the minimum threshold, the exact percentage is largely a matter of personal preference and how it interacts with your carbohydrate allocation.

Setting Your Carbohydrate Target

Carbohydrates fill the remaining calories after protein and fat have been allocated. This is not because carbohydrates are less important, but because carb needs are more variable and individual than protein and fat minimums.

Calculation: Total calories – (protein grams x 4) – (fat grams x 4) = remaining calories for carbs. Divide by 4 to get grams of carbohydrates.

For high-intensity training: Individuals who perform regular high-intensity exercise (weight training, HIIT, team sports, sprinting) benefit from higher carbohydrate intake, typically 40-55% of total calories. Carbohydrates fuel glycolytic activity and refill muscle glycogen stores depleted during intense training.

For moderate or low-intensity activity: Those who primarily walk, do yoga, or perform low-intensity cardio can function well on moderate carbohydrate intake, typically 30-40% of total calories.

For very low-carb or ketogenic approaches: Some individuals prefer carbohydrate intake below 50-100 grams per day. While this can be effective for fat loss, it generally impairs high-intensity exercise performance and is not necessary for the majority of people. Use this calculator’s standard approach and adjust carbohydrate and fat ratios based on preference and training demands.

Example Macro Calculations

Example 1: Fat loss for a 170-pound moderately active male. TDEE: 2,500 calories. Fat loss target: 2,000 calories (500-calorie deficit).

  • Protein: 170g (1.0 g/lb) = 680 calories
  • Fat: 67g (30% of total) = 600 calories
  • Carbs: (2,000 – 680 – 600) / 4 = 180g = 720 calories

Example 2: Muscle gain for a 140-pound active female. TDEE: 1,900 calories. Muscle gain target: 2,200 calories (300-calorie surplus).

  • Protein: 126g (0.9 g/lb) = 504 calories
  • Fat: 61g (25% of total) = 550 calories
  • Carbs: (2,200 – 504 – 550) / 4 = 287g = 1,146 calories

Use our TDEE Calculator to find your starting calorie target, then this calculator to break it into macros. Track your intake using a food tracking app for at least the first 2-4 weeks to develop an intuitive sense of portion sizes.

Tracking and Adjusting Your Macros

Hitting your macro targets perfectly every day is neither necessary nor realistic. Aim to be within 5-10 grams of each target on most days. Consistency over weeks matters far more than daily perfection.

When to adjust: If after 2-3 weeks of consistent tracking you are not seeing expected results, adjust your total calories by 100-200 per day (primarily from carbohydrates or fat) and reassess. Protein should remain relatively constant.

Prioritize protein. If you are going to miss any macro target on a given day, let it be carbs or fat, not protein. Protein is the most impactful macronutrient for body composition and the hardest to overeat.

Use weekly averages. Some days you will eat more carbs and less fat, or vice versa. What matters is your weekly average macronutrient intake, not any single day.

This calculator provides general estimates based on published formulas. It is not medical advice and does not replace consultation with a qualified healthcare provider.

Frequently Asked Questions

What are the best macros for weight loss?

For weight loss, a common effective split is 30-35% protein, 25-30% fat, and 35-45% carbohydrates. The key is setting protein high enough (0.8-1.2 g per pound of body weight) to preserve muscle during the deficit. Fat should not drop below 20% of total calories. The remaining calories go to carbohydrates. The exact split can be adjusted based on personal preference and training style.

How do I calculate my macros from calories?

First determine your daily calorie target. Set protein in grams (0.7-1.2 g per pound of body weight), multiply by 4 to get protein calories. Set fat as 25-35% of total calories, divide by 9 to get fat grams. Subtract protein and fat calories from total calories, divide the remainder by 4 for carbohydrate grams.

Is IIFYM the same as a flexible diet?

Yes. IIFYM (If It Fits Your Macros) and flexible dieting refer to the same approach: meeting daily macronutrient targets using any combination of foods. The method prioritizes hitting protein, carb, and fat totals over following rigid meal plans. It is based on the evidence that macronutrient distribution drives body composition outcomes more than specific food choices.

How much protein do I really need?

Research supports 0.7-1.0 grams per pound of body weight for most active adults. During a calorie deficit, increasing to 1.0-1.2 grams per pound helps preserve lean mass. For sedentary individuals, the minimum is lower at roughly 0.5-0.7 grams per pound. There is no meaningful benefit to exceeding 1.2 grams per pound for most people.

Should I eat the same macros on rest days and training days?

For most people, keeping macros consistent every day is simpler and equally effective. More advanced athletes sometimes use carbohydrate cycling, eating more carbs on training days and fewer on rest days while keeping protein and total weekly calories the same. This is an optional refinement, not a requirement.

What happens if I eat too much protein?

For healthy adults with normal kidney function, protein intakes up to 1.5 grams per pound of body weight have not been shown to cause kidney damage in research. Excess protein is either used for energy or converted to glucose. The main downside of very high protein intake is that it displaces calories that could go to carbohydrates and fat, potentially impairing training performance and dietary variety.

Do macros matter if I am in a calorie deficit?

Yes. While calorie balance determines whether you gain or lose weight, macronutrient distribution determines the composition of that weight change. A high-protein deficit preserves muscle and loses primarily fat. A low-protein deficit loses both muscle and fat, resulting in a worse body composition outcome even at the same total weight loss.

How do I track my macros?

Use a food tracking app such as MyFitnessPal, Cronometer, or MacroFactor. Weigh your food with a kitchen scale for the first 2-4 weeks to calibrate your portion awareness. After that, most people develop enough intuition to estimate portions reasonably well, checking the app periodically to stay calibrated.

Sources & Methodology

  • Macronutrient recommendations based on position stands from the International Society of Sports Nutrition (ISSN) and the American College of Sports Medicine (ACSM).
  • Protein requirements from Jager R et al., "International Society of Sports Nutrition Position Stand: Protein and Exercise," Journal of the International Society of Sports Nutrition, 2017.
  • High-protein deficit study: Longland TM et al., "Higher compared with lower dietary protein during an energy deficit combined with intense exercise promotes greater lean mass gain and fat mass loss," American Journal of Clinical Nutrition, 2016.
  • Minimum fat intake guidelines from the Dietary Guidelines for Americans, 2020-2025.
  • IIFYM principles from evidence-based reviews including Aragon AA, Schoenfeld BJ, "Does macronutrient composition matter for body composition?" Strength and Conditioning Journal, 2020.

Default values shown are illustrative. Always verify with your healthcare provider. Data accurate as of: March 2026