Calorie Formula

The calories in food come from its macronutrients. Each gram of protein, carbohydrate, and fat contributes a fixed amount of energy.

Calories = (Protein × 4) + (Carbs × 4) + (Fat × 9)

Where

Protein grams of protein
Carbs grams of carbohydrate
Fat grams of fat

Worked example

A food with 30 g protein, 40 g carbs, and 10 g fat has (30×4) + (40×4) + (10×9) = 120 + 160 + 90 = 370 calories.

Alcohol adds 7 calories per gram. Fat is the most energy-dense at 9 per gram, which is why high-fat foods are calorie-heavy for their size.

FAQ

Does this formula account for cooking losses like fat rendering out of meat? Not directly. It calculates calories from the ingredients as measured, so if fat renders out and is discarded during cooking, like draining ground beef, the finished dish typically has somewhat fewer calories than the raw ingredient total would suggest.

Estimate needs with the Calorie and TDEE calculator in the cooking calculators.

Scroll to Top

The calculators and tools on Formula Factory are provided for general guidance and informational purposes only. Results are estimates based on standard formulas and the values you enter — they do not constitute professional engineering, electrical, or architectural advice. Always verify calculations with a qualified professional before making decisions for any safety-critical, code-compliance, or commercial application. Formula Factory makes no representations or warranties as to the accuracy or completeness of any result, and accepts no liability for errors, omissions, or any outcomes arising from reliance on this information.