How are calories calculated? Protein, carbs and fat

Quick answer: food calories are estimated from the grams of protein, carbohydrate, fat and alcohol in a food. The standard shortcut is 4 calories per gram of protein, 4 per gram of carbohydrate, 9 per gram of fat and 7 per gram of alcohol.

The 4-4-9 rule

These figures are called Atwater factors, after the 19th-century chemist who worked out how much usable energy the body gets from each nutrient.

NutrientCalories per gram
Fat9
Alcohol7
Protein4
Carbohydrate4

Fat carries more than twice the energy of protein or carbohydrate in each gram, which is why oils and nuts are so calorie-dense.

A worked example: a large egg

Per 100 g of raw whole egg, the USDA lists about 12.56 g of protein, 9.51 g of fat and 0.72 g of carbohydrate.

  • Protein: 12.56 x 4 = 50.2
  • Fat: 9.51 x 9 = 85.6
  • Carbohydrate: 0.72 x 4 = 2.9

Total: about 139 calories. The USDA lists 143. The two are close but not identical.

Why the shortcut is not exact

Try the same method on a banana. Per 100 g the USDA lists 1.09 g of protein, 0.33 g of fat and 22.84 g of carbohydrate.

  • 1.09 x 4 + 22.84 x 4 + 0.33 x 9 = about 99 calories

But the USDA lists 89. The difference is due to a few things:

  • Food-specific factors. The USDA uses adjusted energy factors for different foods, not just 4-4-9.
  • Fiber. Carbohydrate on a food database includes fiber, which the body uses less fully than starch or sugar. Counting all carbohydrate at 4 calories per gram over-states the energy.
  • Rounding and measurement. Nutrient amounts are averages.

For everyday use, the 4-4-9 rule is good for estimating. For exact figures, use the food’s listed calories.

How labels calculate calories

Manufacturers may use the general 4-4-9 factors, specific factors, or laboratory analysis, and are allowed to round. Two products with the same ingredients can show slightly different calories for that reason.

Using this to check a recipe

If you know the grams of protein, carbohydrate and fat in a dish, multiply and add. You should land within roughly 10 percent of the listed value, although foods high in fiber can be further off, as the banana example shows. Our food pages show the share of calories from each nutrient using the same factors, so you can see whether a food is mostly carbohydrate, protein or fat. Find any food in our nutrition facts.

Related: how to read a nutrition facts label and net carbs vs total carbs.

Nutrition facts for the foods in this article

Food (per 100 g)CaloriesProteinCarbsFat
Bananas, raw 89 1.09 g 22.84 g 0.33 g
Egg, whole, raw, fresh 143 12.56 g 0.72 g 9.51 g

Values come from the USDA data used across this site. Open a food for serving sizes.