The macro calculator on this page turns a daily calorie budget and a protein amount into grams of protein, carbohydrate and fat, plus a fiber target. You enter your calories, give your protein in grams or work it out from your body weight, and choose what share of calories fat takes. The result shows each macro in grams, kilocalories (kcal) and percent of calories, with the arithmetic written out. It is for adults 19 and over, runs in your browser and needs no account. It does not estimate how many calories you need: the calorie calculator does that, and the protein calculator sets a protein target.
Calculate your macros
Nothing you type here leaves your device. The calculator is free, runs in your browser, sends nothing anywhere and does not save your numbers.
The calculator needs JavaScript, which is switched off in this browser. You can still work out your macros by hand: follow the steps under “How do you convert percentages to grams of protein, carbs and fat?”.

How do you use the macro calculator?
The macro calculator takes four steps, and you can change any entry afterwards: the result updates as you type.
- Enter your daily calories. Use a whole number you already have, from a calorie calculator, a clinician or a plan you follow. The tool accepts 1,000 to 6,000 kcal and gives no plan below 1,200 kcal.
- Set your protein. Either type the grams, or enter your weight in kilograms or pounds and pick a protein amount per kilogram.
- Choose fat as a share of calories. The choices are 20%, 25%, 27%, 30% and 35% of calories, and 27% is the default.
- Read the result. Each macro appears in grams, kcal and percent of calories, with a fiber target and a note when a share falls outside an adult range. If protein and fat together use more than your calories, the page says so and shows no result. If they use all of them, the page says that carbohydrate has no target instead of showing 0 g.
How do you convert percentages to grams of protein, carbs and fat?
To convert a percentage of calories to grams, multiply your calories by the percentage, then divide by the energy in one gram of that macro. The calculator uses the Atwater general factors: FAO Food and Nutrition Paper 77 (2003) lists 4 kcal per gram of protein, 9 kcal per gram of fat and 4 kcal per gram of carbohydrate. The default fat share, 27%, is the split the iPhone app described under “What can you do with your macros?” uses for its Home macro targets, and the other fat shares use the same arithmetic in the same order of rounding. The steps, in order:
- Protein. The protein goal is a whole number of grams. If you type grams, the calculator uses them as entered. With body weight, protein grams are your weight in kilograms times the grams per kilogram you chose, rounded to the nearest 5 g, the way the protein calculator rounds a target. Protein calories are 4 times those grams.
- Fat. Fat calories are your calories times the fat share, and fat grams are fat calories divided by 9, rounded to a whole gram. Everything after this uses the rounded grams, and fat calories become 9 times those grams.
- Carbohydrate. Carbohydrate calories are your calories minus protein calories minus fat calories. Carbohydrate grams are those calories divided by 4, rounded to a whole gram. If the calories left are below 0, there is no result. If they are 0, or leave less than 1 g of carbohydrate, carbohydrate has no target and the page says so.
- Fiber. Fiber is your calories divided by 1,000, times 15, rounded to a whole gram.
- Percent of calories. Protein and carbohydrate grams times 4, or fat grams times 9, divided by your calories, times 100. The percents come from the grams shown, not from the unrounded values.
Because the grams are whole numbers, the three kcal can add to a few more or less than your calories. At 1,234 kcal, 100 g of protein and 27% of calories from fat, for example, fat is 333.18 kcal, which is 37.02 g and shows as 37 g, or 333 kcal. Carbohydrate is 1,234 − 400 − 333 = 501 kcal, which is 125.25 g and shows as 125 g, or 500 kcal. The three rows then add to 400 + 333 + 500 = 1,233 kcal, 1 kcal under the budget.
The same arithmetic runs in reverse when you want to check a meal or a day: multiply grams of protein by 4, grams of fat by 9 and grams of carbohydrate by 4, and add the three. The sum is the energy the general factors assign to those grams. The result for a real day can differ from the calories on your labels, as the section on logged totals explains.
| Macro | Energy factor | Grams come from |
|---|---|---|
| Protein | 4 kcal per gram | Your grams, or weight times g/kg rounded to 5 g |
| Fat | 9 kcal per gram | Calories times the fat share, divided by 9, rounded to a whole gram |
| Carbohydrate | 4 kcal per gram | The calories left after protein and the rounded fat, divided by 4 |
What does a worked example look like?
A worked example with 2,000 kcal, 120 g of protein and 27% of calories from fat gives 60 g of fat, 245 g of carbohydrate and 30 g of fiber. The table shows each step, and the same code that runs the calculator above produced the numbers.
| Macro | How it is found | Grams | Calories | Share |
|---|---|---|---|---|
| Protein | 120 g × 4 kcal per gram | 120 g | 480 kcal | 24% |
| Fat | 2,000 kcal × 27% = 540 kcal; 540 ÷ 9 kcal per gram | 60 g | 540 kcal | 27% |
| Carbohydrate | 2,000 − 480 − 540 = 980 kcal; 980 ÷ 4 kcal per gram | 245 g | 980 kcal | 49% |
| Fiber | 2,000 ÷ 1,000 × 15 g | 30 g | – | – |
A second example starts from body weight. At 70 kg (154 lb), 1.6 g/kg, 2,400 kcal and 27% of calories from fat, the calculator shows 110 g of protein, 72 g of fat, 328 g of carbohydrate and 36 g of fiber.
| Macro | How it is found | Grams | Calories | Share |
|---|---|---|---|---|
| Protein | 70 kg × 1.6 g/kg = 112 g, rounded to 110 g; 110 × 4 kcal per gram | 110 g | 440 kcal | 18% |
| Fat | 2,400 kcal × 27% = 648 kcal; 648 ÷ 9 kcal per gram | 72 g | 648 kcal | 27% |
| Carbohydrate | 2,400 − 440 − 648 = 1,312 kcal; 1,312 ÷ 4 kcal per gram | 328 g | 1,312 kcal | 55% |
| Fiber | 2,400 ÷ 1,000 × 15 g | 36 g | – | – |
How is the fiber target worked out?
The fiber target is your calories divided by 1,000, times 15, rounded to a whole gram: 30 g at 2,000 kcal. The 15 g per 1,000 kcal is the app’s planning number. It is slightly above the Adequate Intake of 14 g per 1,000 kcal set by the National Academies in its 2005 dietary reference intakes report, which gives 28 g at 2,000 kcal. Fiber is a target to reach, not a fourth share of calories: the percents above add up from protein, fat and carbohydrate alone, and on a US label fiber is already counted inside total carbohydrate.
How does the calculator set a protein number from your weight?
The calculator multiplies your body weight in kilograms by one of four protein amounts and rounds the result to the nearest 5 g, the way the protein calculator rounds a target, so the protein goal is a whole number of grams. The Recommended Dietary Allowance (RDA) for protein is 0.8 g/kg of body weight a day for adults (Institute of Medicine, 2005), a minimum that covers nearly all healthy adults, not a goal. The Dietary Guidelines for Americans, 2025–2030 (USDA and HHS, January 2026) give protein serving goals of 1.2–1.6 g/kg of body weight per day. The tool offers 1.4 g/kg as the midpoint of that range. The whole-gram goal is what the rest of the arithmetic uses.
| Protein per kilogram | Weight times g/kg for 70 kg (154 lb) | Protein goal | Protein calories |
|---|---|---|---|
| 0.8 g/kgThe RDA | 56 g | 55 g | 220 kcal |
| 1.2 g/kgLow end of the goal range | 84 g | 85 g | 340 kcal |
| 1.4 g/kgMiddle of the goal range | 98 g | 100 g | 400 kcal |
| 1.6 g/kgHigh end of the goal range | 112 g | 110 g | 440 kcal |
What do the adult ranges mean, and what if a share falls outside?
The adult ranges are reference values for the share of calories from each macro, and a share outside a range is flagged for information only. Health Canada’s dietary reference intakes table lists Acceptable Macronutrient Distribution Ranges (AMDRs) for adults 19 years and over: 10–35% of energy from protein, 20–35% from fat and 45–65% from carbohydrate. Health Canada notes that the reference values are for “normal, apparently healthy individuals eating a typical mixed North American diet” and that an individual “may have physiological, health, or lifestyle characteristics that may require tailoring.”
| Macro | Adult range, share of calories |
|---|---|
| Protein | 10–35% |
| Carbohydrate | 45–65% |
| Fat | 20–35% |
The calculator compares each share, worked out from the grams shown, with its range and says when a share is below or above it. The fat choices sit inside the fat range, so a flag usually concerns protein or carbohydrate, although at 35% rounding fat up to a whole gram can put its share a fraction above 35%. At 2,000 kcal with 27% of calories from fat and 175 g of protein, for instance, protein is 700 kcal (35%) and carbohydrate is 760 kcal (38%), so carbohydrate is flagged as below its range. A flag is not a warning, and it does not mean a split is unsafe. A share inside a range is not a recommendation either. The ranges do not tell you which split to choose, and they were set for healthy adults, so a clinician’s advice comes before them.
Why will your logged totals not match these numbers exactly?
Logged totals will not match the calculator exactly, because the 4, 4 and 9 factors are general averages and labels, databases and fiber each add small differences. The FDA allows a label to calculate calories with specific Atwater factors, with the general factors of 4, 4 and 9 calories per gram, with general factors that leave out non-digestible carbohydrate and sugar alcohols, or with other listed methods (21 CFR 101.9(c)(1)(i)). Four things account for most gaps:
- Specific versus general factors. FAO (2003) reports that for most individual foods that are major energy sources, using a specific factor rather than the general one changes the result by between −6% and +3%.
- Fiber is part of total carbohydrate. On a US label, total carbohydrate is calculated by subtraction of protein, fat, moisture and ash from the weight of the food, and dietary fiber is listed within it (21 CFR 101.9(c)(6)). FAO (2003) gives energy values for dietary fiber of 0 to 1.9 kcal per gram in commonly eaten foods, lower than the 4 kcal general factor, so a fiber-rich food can hold fewer calories than its carbohydrate grams suggest.
- Sugar alcohols and alcohol. The FDA lists calorie factors for sugar alcohols from 0 calories per gram for erythritol to 3.0 for hydrogenated starch hydrolysates, and FAO (2003) gives 7.0 kcal per gram for alcohol. The calculator has no row for either, so any energy they carry sits inside what it calls carbohydrate.
- Label rounding. A US label states calories to the nearest 5 up to 50 and the nearest 10 above that, and total carbohydrate to the nearest gram (21 CFR 101.9(c)(1) and (c)(6)), so adding the rounded values rarely reproduces the calorie line.
In practice, treat the calculator’s result and your log as two estimates of the same day, not an equation that has to balance. How to count macros shows how to log each macro and add up a day.
What are the limits of this macro calculator?
The macro calculator allocates a budget you give it; it does not know what your body needs. These are the limits to keep in mind:
- No single best split. The calculator does not prescribe a split. It shows the arithmetic for the protein and fat share you pick and what is left for carbohydrate.
- A floor on the budget. The page gives no macro plan for a budget under 1,200 kcal a day. That floor is the lowest daily floor the site’s calorie calculator and the app use, a guardrail and not a measured threshold of adequacy, and a number below it is for a doctor or registered dietitian to set.
- Calories you supply. The page does not estimate your energy needs, and a budget that is too high or too low gives macros that are equally off.
- Adults only. The ranges apply to adults 19 and over, and the page does not plan for anyone younger.
- Whole grams. The grams are whole numbers and the percents come from them, so the three percents can add to 99 or 101, and the three kcal can add to a few more or less than your calories.
Who should not use this macro calculator alone?
The macro calculator is for healthy adults, and a clinician’s plan always comes before it. Talk to a doctor or registered dietitian first, and let them set your numbers, if any of these apply:
- You are under 18. Growing bodies have different needs, and this tool does not plan for them.
- You are pregnant or breastfeeding. Energy and protein needs change, and your care team can say by how much.
- You have kidney disease. Your care team sets your protein target, and it can differ from any amount offered here.
- You take diabetes medicines or a prescription weight-loss medicine. Your prescriber can say how food, calories and your medicines fit together, so ask before you plan around a carbohydrate or calorie number.
- You follow a medically managed or prescribed diet. The macros your care team gives you replace anything calculated here.
- You have a history of disordered eating, or an eating disorder. People with a history of disordered eating should skip calorie and macro counting and talk to a clinician. Numbers are not neutral when food already feels fraught. Is counting calories healthy? describes gentler options.
Counting is optional for everyone else too. How to track protein without counting calories describes a way to keep protein in view with no calorie or macro totals.
What can you do with your macros?
You can use your result as a starting point to compare with what you eat. These pages help with the next step:
- The calorie calculator: an estimate of maintenance calories, if you do not have a budget yet.
- The protein calculator: a daily protein target in grams, to type into the macro calculator.
- How to count macros: logging protein, carbohydrate and fat in practice.
- How to track fiber and protein: keeping both nutrients in the same food record.
- How much protein you need: the RDA, the guideline goal and the cases where needs are higher.
- How to count calories: a method you can keep up, if you choose to count.
YolkPal, an iPhone protein tracker coming soon to the App Store, shows protein, carbohydrate and fat tiles on its Home screen. When you turn calories on, it works out carbohydrate, fat and fiber targets from your calorie target and your protein goal with the same 4, 4 and 9 kcal arithmetic. The default split on this page, with fat at 27% of calories, is the one the app uses for its Home macro targets, and the other fat shares use the same arithmetic.
If you choose to count, start with your protein and read the other two macros as information.
Sources
- Health Canada. Dietary reference intakes tables: Reference values for macronutrients. Page updated November 3, 2026; table 1, with its footnote on the total fibre Adequate Intake, and table 2, Acceptable Macronutrient Distribution Ranges. canada.ca, reference values for macronutrients
- Panel on Macronutrients, Institute of Medicine. Dietary Reference Intakes for Energy, Carbohydrate, Fiber, Fat, Fatty Acids, Cholesterol, Protein, and Amino Acids. National Academies Press, 2005; chapter 7, “Dietary, Functional, and Total Fiber.” doi:10.17226/10490
- USDA and HHS. Dietary Guidelines for Americans, 2025–2030. January 2026, PDF page 3 (printed page 2), “Protein serving goals.” realfood.gov/documents/DGA.pdf
- Food and Agriculture Organization of the United Nations. Food energy: methods of analysis and conversion factors. Food and Nutrition Paper 77, Rome, 2003, sections 3.5.1, 3.5.2 and 3.5.6. fao.org/4/y5022e/y5022e04.htm
- Code of Federal Regulations, Title 21, section 101.9, “Nutrition labeling of food”: paragraphs (c)(1), (c)(1)(i) and (c)(6). eCFR text current to November 6, 2026, checked November 11, 2026. ecfr.gov, 21 CFR 101.9
This article is general information, not medical advice. If you have a health condition, are pregnant, or follow a diet set by your doctor, talk to them or a registered dietitian before changing how you eat.