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.
★ FOOD · NUTRITION
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.
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.
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.
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.
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 | 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. |
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.
Bright Side Kit. "Grams to Calories Calculator: Protein, Carbs & Fat" https://brightoolbox.com/grams-to-calories-calculator/ Accessed November 5, 2026.4. Protein and carbohydrate each carry 4 calories a gram, while fat carries 9 — so 30 g of protein is 120 calories.
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.
Multiply by 4: 30 × 4 = 120 calories. Do the same for carbs, multiply fat by 9, and add the three together.
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.
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.
Yes — 12.5 g of protein is 50 calories. Grams may have decimals and must be between 0 and 10,000.
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.
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.