Grams to Calories Calculator

Convert grams of protein, carbs, fat, and alcohol to calories using the Atwater factors (4, 4, 9, 7 per gram), with each macro's share of the total.

Total Calories

Every calorie on a nutrition label comes from just four things: protein, carbohydrate, fat, and sometimes alcohol. Each delivers a fixed amount of energy per gram, and those numbers are the Atwater factors. Protein and carbohydrate give about 4 calories per gram. Fat is the dense one at 9 calories per gram, more than double the others, which is why a spoonful of oil carries so much energy. Alcohol sits at 7.

So converting grams to calories is just multiply and add. Twenty grams of protein is 80 calories, 30 grams of carbs is 120, and 10 grams of fat is 90, for 290 calories total. This calculator does that for whatever macros you enter and then shows what fraction of the total each one contributes, which is the part most people actually care about when they read a label or plan a meal.

One honest caveat. The number you get may not match the manufacturer’s stated calories to the last digit, for two reasons.

Labels round. A US label rounds anything up to 50 calories to the nearest 5, and anything above that to the nearest 10, so a 287-calorie bar is printed as 290.

And fiber is counted at about 2 calories per gram, not 4, because your body cannot fully digest it. That is the rule on US labels and in the EU. Enter the fiber in its own box and the calculator counts it at 2. Where the fiber sits depends on the label: on a US or Canadian label “Total Carbohydrate” already includes it, so the calculator takes it out of the carbohydrate first. On a UK, EU, Australian or New Zealand label carbohydrate and fibre are listed separately, so nothing is taken out. Pick the label style below. For a candy bar or a steak the difference is a few calories; for a bowl of beans it is worth getting right.

Enter the grams of each macro from a label or a recipe. Leave any field blank if it does not apply.


How we build and check this calculator

This calculator runs entirely in your browser, so the numbers you enter stay on your device. The math behind it is written by hand and tested against worked examples and standard references before the page goes live.

SuperGlobalCalculator is independently built and maintained. See how we build and verify our calculators.


Embed This Calculator

Copy the code below and paste it into your website or blog.
The calculator will work directly on your page.