★ FOOD · NUTRITION

Grams to Calories Calculator: Protein, Carbs & Fat

415 calories. Enter the grams of protein, carbs, and fat and this calculator turns them into calories — 4 per gram for protein and carbs, 9 for fat — with each macro’s calories and share shown, every step visible.

2740

Grams to calories

Protein and carbs carry 4 calories a gram, fat carries 9: 30 g protein, 40 g carbs, and 15 g fat is 415 calories, with each macro’s share shown.

Grams of protein. The default is 30 g — 120 calories at 4 per gram.

Grams of carbohydrate. The default is 40 g — 160 calories at 4 per gram.

Grams of fat. The default is 15 g — 135 calories at 9 per gram.

Total calories415 calories.415 calories. Protein gives 120, carbs 160, and fat 135 — fat is the densest at 9 calories a gram.

Total: 415 kcal

Protein: 120 kcal

Carbs: 160 kcal

Fat: 135 kcal

415 calories. 30 g of protein at 4 cal/g is 120, 40 g of carbs at 4 cal/g is 160, and 15 g of fat at 9 cal/g is 135 — 120 + 160 + 135 = 415.

Defaults, 30/40/15: 120 + 160 + 135 = 415 calories — protein 28.9%, carbs 38.6%, fat 32.5%.

Protein only, 100 g: 100 × 4 = 400 calories — the same grams as fat, but 50 fewer calories.

Fat only, 50 g: 50 × 9 = 450 calories — fat is more than twice as dense as protein or carbs.

Carbs only, 100 g: 100 × 4 = 400 calories.

Nothing entered, 0/0/0: 0 calories — an empty plate has no energy in it.

A big meal, 50/80/30: 200 + 320 + 270 = 790 calories — fat is 34.2% of the total despite being the smallest weight.

Half a gram counts, 12.5 g protein: 12.5 × 4 = 50 calories — decimals work, so a half scoop still counts.

Why fat counts double

A calorie is a unit of energy, and the three macros do not carry the same amount of it: protein and carbohydrate each hold 4 calories a gram, while fat holds 9 — more than double. That is why a spoon of oil outweighs a spoon of sugar in energy even though they weigh the same, and why a fatty meal can be small on the plate and large in calories. The calculator multiplies each macro by its factor and adds the three results: 30 g of protein is 120, 40 g of carbs is 160, 15 g of fat is 135, and 120 + 160 + 135 is 415. The shares follow from the same numbers — protein 28.9%, carbs 38.6%, fat 32.5% — so you can see at a glance which macro is doing the work.

The worked example, in full

Take the defaults: 30 g protein, 40 g carbs, 15 g fat. Step one: protein. 30 × 4 = 120 calories. Step two: carbs. 40 × 4 = 160 calories. Step three: fat. 15 × 9 = 135 calories. Step four: add them. 120 + 160 + 135 = 415 calories. Step five: the shares. 120 ÷ 415 is 28.9%, 160 ÷ 415 is 38.6%, and 135 ÷ 415 is 32.5% — and 28.9 + 38.6 + 32.5 is 100.0, so the shares account for every calorie. The same five steps work for any numbers, including decimals: 12.5 g of protein is 50 calories.

What the factors do not cover

The 4-4-9 factors are the Atwater values — averages measured in a laboratory, not exact figures for every food. Fibre is the main wrinkle: it is counted as carbohydrate on a label but the body absorbs roughly 2 calories a gram from it, not 4, so a high-fibre food comes out a little lower than this calculator says. Alcohol is the other gap: it carries 7 calories a gram and is not a macro at all, so a drink’s calories sit outside this calculation. Sugar alcohols vary too, at roughly 0 to 3 calories a gram.

None of that changes the day-to-day use: for a meal, a recipe, or a day’s food, 4-4-9 is the standard every label and every dietitian works from, and the error is a few percent either way. Enter the grams from the label — protein, carbs, fat — and the total is the same figure the label’s calorie count is built from. If the grams are missing, the macro calculator works them out from a calorie target instead.

Output · formula · meaning

Output Formula What it means
Total calories 4P + 4C + 9F 415 kcal at the defaults.
Protein calories 30 × 4 120 kcal 28.9% of the total at the defaults.
Carb calories 40 × 4 160 kcal 38.6% of the total at the defaults.
Fat calories 15 × 9 135 kcal 32.5% of the total at the defaults.
Shares macro ÷ total P 28.9%, C 38.6%, F 32.5% at the defaults.
Defaults, 30/40/15 120 + 160 + 135 415 kcal.
Protein only, 100 g 100 × 4 400 kcal.
Fat only, 50 g 50 × 9 450 kcal.
Carbs only, 100 g 100 × 4 400 kcal.
Empty, 0/0/0 0 0 kcal.
Big meal, 50/80/30 200 + 320 + 270 790 kcal.
Half scoop, 12.5 g protein 12.5 × 4 50 kcal.

Who uses this

  • The meal prepper: a lunchbox with 30 g protein, 40 g carbs, and 15 g fat is 415 calories — the total goes straight onto the plan.
  • The label reader: a snack lists 12 g of fat and no calorie figure, and 12 × 9 = 108 calories is the missing number.
  • The baker: a recipe’s macros add up to 790 calories a serving, and fat is 34.2% of it — the figure the lighter version is judged against.
  • The student: checks why fat counts double — 9 calories a gram against 4 — with a 50 g example that makes it obvious.

Accuracy & limitations

The 4-4-9 factors are the standard Atwater values used on food labels everywhere, so the total matches the calorie figure a label is built from — within a few percent. Fibre is the main exception: it is listed as carbohydrate but yields about 2 calories a gram, so a high-fibre food reads a little high here; alcohol, at 7 calories a gram, is not a macro and is not counted. Grams may have decimals and must be between 0 and 10,000. To work out your daily calorie needs instead, use the calorie calculator; to split a calorie target into grams, use the macro calculator.

Cite this calculatorBright Side Kit. “Grams to Calories Calculator: Protein, Carbs & Fat” brightoolbox.com, 2026. Method: multiply protein by 4, carbs by 4, and fat by 9, then add the three — the Atwater factors.Bright Side Kit. "Grams to Calories Calculator: Protein, Carbs & Fat" https://brightoolbox.com/grams-to-calories-calculator/ Accessed November 5, 2026.
Embed this calculator

Paste this into any web page to embed the live calculator. The “Powered by Bright Side Kit” link below it must stay intact.

Frequently asked questions

How many calories are in a gram of protein?

4. Protein and carbohydrate each carry 4 calories a gram, while fat carries 9 — so 30 g of protein is 120 calories.

Why does fat have 9 calories a gram?

Fat is more energy-dense than protein or carbohydrate: its chemical bonds store more energy per gram. That is why 50 g of fat is 450 calories while 50 g of protein is only 200.

How do you convert 30 g of protein to calories?

Multiply by 4: 30 × 4 = 120 calories. Do the same for carbs, multiply fat by 9, and add the three together.

Does fibre count as 4 calories a gram?

On a label it is listed as carbohydrate, but the body absorbs roughly 2 calories a gram from fibre, not 4 — so a high-fibre food comes out a little lower than this calculator says.

What about alcohol?

Alcohol carries 7 calories a gram, but it is not a macro, so this calculator does not count it. A drink’s calories sit outside the protein, carbs, and fat on the label.

Can I enter decimal grams?

Yes — 12.5 g of protein is 50 calories. Grams may have decimals and must be between 0 and 10,000.

Why do the shares add to 100%?

Because every calorie comes from one of the three macros: 120 + 160 + 135 is 415, and 28.9% + 38.6% + 32.5% is 100.0%. If a share is missing, a macro is missing.

Is this the same as the label’s calorie count?

Yes, within a few percent: labels are built from the same 4-4-9 Atwater factors, so the total here matches the figure on the packet for the same grams.