Everyday tool

Macro and Calorie Calculator

Enter your own daily calorie target and the percentage for each macronutrient.

Runs in your browser. No upload.

Values are processed locally in this browser.

Result

—

About this tool

Macro and Calorie Calculator made simple.

This tool does not set calorie needs or prescribe a diet. Percentages are converted using 4 kcal/g for protein and carbohydrate and 9 kcal/g for fat. Ask a qualified professional for individual nutrition guidance.

Guide

Using Macro and Calorie Calculator

The Macro and Calorie Calculator splits a calorie number into grams of protein, carbohydrate and fat. You choose the daily calories and the percent for each of the three. The percents must add up to exactly 100. The tool then turns each share into grams, using 4 calories per gram for protein and for carbohydrate, and 9 calories per gram for fat. It does not work out how many calories you need, and it does not suggest a diet or a split. It is not nutrition or medical advice, so ask a qualified professional about your own case.

How to use it

  1. Type the daily calorie target you have chosen in the first box. The tool does not pick this number for you.
  2. Look at the three percent boxes for protein, carbohydrate and fat. They start at 25, 50 and 25.
  3. Change the percents until they add up to exactly 100. Decimals such as 33.3 are allowed.
  4. Press Calculate. The result lists grams and the percent for protein, carbohydrate and fat, with a note that it uses only your numbers.
  5. Press Copy result to copy the lines, or Clear to empty the boxes.

Worked examples

2,000 calories at 25, 50 and 25 percent

You enter
Calories
2000
Protein percent
25
Carb percent
50
Fat percent
25
You get
Protein
125 g
Carbohydrate
250 g
Fat
56 g

A quarter of 2,000 is 500 calories. At 4 per gram that is 125 g. Half is 1,000 calories, or 250 g. The fat share is 500 calories, and 500 divided by 9 is 55.6, shown as 56 g.

Run through the tool’s own code.

1,800 calories at 30, 40 and 30 percent

You enter
Calories
1800
Protein percent
30
Carb percent
40
Fat percent
30
You get
Protein
135 g
Carbohydrate
180 g
Fat
60 g

Thirty percent of 1,800 is 540 calories, which is 135 g at 4 per gram and 60 g at 9 per gram. Forty percent is 720 calories, or 180 g.

Run through the tool’s own code.

2,500 calories at 20, 55 and 25 percent

You enter
Calories
2500
Protein percent
20
Carb percent
55
Fat percent
25
You get
Protein
125 g
Carbohydrate
344 g
Fat
69 g

Carbohydrate gets 1,375 calories, and 1,375 divided by 4 is 343.75, shown as 344 g. Fat gets 625 calories, and 625 divided by 9 is 69.4, shown as 69 g.

Run through the tool’s own code.

All calories from one macronutrient

You enter
Calories
1500
Protein percent
0
Carb percent
100
Fat percent
0
You get
Protein
0 g
Carbohydrate
375 g
Fat
0 g

Zero percent is allowed for any macronutrient. Here all 1,500 calories go to carbohydrate, and 1,500 divided by 4 is 375 g. This only shows the arithmetic.

Run through the tool’s own code.

Rounding to whole grams

You enter
Calories
1999
Protein percent
25
Carb percent
50
Fat percent
25
You get
Protein
125 g
Carbohydrate
250 g
Fat
56 g

One calorie less than the first example gives the same grams, because every line is rounded to a whole number. The shown grams add back up to 2,004 calories.

Run through the tool’s own code.

Percents that do not add up to 100

You enter
Calories
2000
Protein percent
30
Carb percent
30
Fat percent
30
You get
Message
Use a calorie target up to 20,000 and macro percentages totaling exactly 100%.

These three add up to 90, so the tool shows an error and no grams. Change one of the numbers until the total is 100.

Run through the tool’s own code.

When it helps

  • Turn a calorie number and a split that a dietitian or coach gave you into grams you can compare with food labels.
  • Check the arithmetic of a plan you found by redoing it with the 4, 4 and 9 conversion.
  • See how moving 5 percent from one macronutrient to another changes the grams at the same calories.
  • Make starting numbers for a meal-planning spreadsheet or a food diary.
  • Learn the difference between a share of calories and a weight in grams.
  • Check the grams shown in a nutrition app against a plain calculation.

Limits to keep in mind

  • Calories must be more than 0 and at most 20,000. Each percent must be from 0 to 100, and the three must total exactly 100, or the tool shows an error.
  • The conversion is fixed at 4 calories per gram for protein, 4 for carbohydrate and 9 for fat. These match the general Atwater factors on the FAO page. Alcohol and fiber have no line of their own.
  • Grams are rounded to whole numbers, so the grams you see can add back up to a few calories more or less than your target. The 2,000 calorie example comes back as 2,004.
  • The tool takes no age, sex, height, weight or activity. It cannot estimate the calories you need and gives no advice on diet.
  • It does not check whether your split is suitable for anyone. It only does the sum.
  • It works from percents to grams only. It cannot turn grams into percents or add up a whole day of foods.

Tips

  • Settle on the calorie target and the split with a qualified professional first, and use the tool only for the arithmetic.
  • Start from the default 25, 50 and 25, change one box, then change another box by the same amount so the total stays 100.
  • If you see the total error, add the three percents by hand to find the gap.
  • Use whole numbers or one decimal. Long decimals add nothing, because the grams are rounded anyway.
  • Food labels round their own numbers, so small differences from the tool are normal.
  • Save the calories and percents next to the grams, so you can redo the sum later.

Sources

Common questions

About Macro and Calorie Calculator.

How do I calculate macros from a calorie target?

Multiply the calories by each share, then divide by the calories in one gram. With 2,000 calories and 25 percent protein, that is 2,000 times 0.25 equals 500 calories, and 500 divided by 4 is 125 g of protein.

How many calories are in a gram of protein, carbohydrate and fat?

This tool uses 4, 4 and 9. The FAO describes the general Atwater factors as 4.0 kcal per gram for protein, 9.0 for fat and 4.0 for carbohydrates, and 7.0 for alcohol. The tool has no alcohol line.

What macro split should I use?

The tool does not choose one. The Dietary Guidelines for Americans 2020-2025 list published ranges for adults 19 and older: protein 10 to 35, carbohydrate 45 to 65 and total fat 20 to 35 percent of calories. They are reference ranges, not a plan for you.

How many calories do I need each day?

This tool cannot tell you. It asks for a target you chose and takes no details about your body or activity. A dietitian or doctor can help you pick a number that fits your situation.

Why do the three percents have to add up to 100?

Because together they split the whole calorie target. If they add up to less, some calories go unassigned. If they add up to more, you would count some twice. The tool shows an error until the total is 100.

Why do my grams not add back up to my exact calories?

Each line is rounded to a whole gram. At 2,000 calories and 25, 50 and 25 percent, the shown 125, 250 and 56 g come to 2,004 calories. The small gap is rounding, not a mistake in the plan.

Can I type grams and get percents?

No. This tool goes one way, from calories and percents to grams. To go the other way, multiply each gram amount by its calories per gram, add them up, and divide each line by the total.

Does it count fiber, sugar or alcohol?

No. It has three lines only: protein, carbohydrate and fat. It has no line for fiber or sugar, and alcohol is not included at all.

Is this a diet plan?

No. The page says the tool does not set calorie needs or prescribe a diet. It converts the numbers you give it. Any plan should come from a qualified professional who knows you.

Can I use it if I have a medical condition?

Talk to your doctor or a registered dietitian first. People with some conditions need advice made for them, and a general calculator cannot give it. Use this page only for the sum once you have a plan.

What is the highest calorie target I can enter?

The tool accepts any target above 0 and up to 20,000 calories. A number outside that range shows an error. The limit is a plain check on the input and says nothing about what is right for anyone.

Is my information sent anywhere?

No. The page says the tool runs in your browser and that your input is not uploaded. The calories and percents you type stay on your own device.

How do I use Macro calculator?

Enter your own daily calorie target and the percentage for each macronutrient.

Is my data uploaded to a server?

No. This tool runs locally in your browser. Your input is not uploaded.