Grams to Calories Calculator

Quick answer

The grams to calories calculator converts grams of carbohydrate, protein, fat and alcohol into kilocalories using the Atwater factors (4, 4, 9 and 7 kcal per gram), and shows where the calories come from.

g
g
g
g
Total energy
— kcal
In kilojoules
— kJ
From carbohydrate
— kcal
From protein
— kcal
From fat
— kcal
From alcohol
— kcal
Share from fat
— %

Nutrition labels list macronutrients in grams. The general Atwater factors convert those grams into energy: fat has more than twice the energy per gram of carbohydrate or protein.

How to use the Grams to Calories Calculator

  1. Carbohydrate
  2. Protein
  3. Fat
  4. Alcohol
  5. Every result field is editable: type into Total energy and Fat plus every other field update to match.

Results update as you type, and every field accepts the units shown in its menu.

How it works

Each macronutrient’s grams are multiplied by its energy factor and the results are added.

Inputs explained

Field What to enter
Carbohydrate In g
Protein In g
Fat In g
Alcohol In g

What each result means

  • Total energy = 4×[Carbohydrate] + 4×[Protein] + 9×[Fat] + 7×[Alcohol]
  • In kilojoules = (4×[Carbohydrate] + 4×[Protein] + 9×[Fat] + 7×[Alcohol]) × 4.184
  • From carbohydrate = 4×[Carbohydrate]
  • From protein = 4×[Protein]
  • From fat = 9×[Fat]
  • From alcohol = 7×[Alcohol]
  • Share from fat = 9×[Fat] ÷ (4×[Carbohydrate] + 4×[Protein] + 9×[Fat] + 7×[Alcohol]) × 100

Example values

How the main result changes when Fat changes and everything else stays at the example values above:

Fat (g) Total energy (kcal)
5 325
7.5 347.5
10 370
12.5 392.5
15 415
20 460

Formula

kcal = 4 × carbs + 4 × protein + 9 × fat + 7 × alcohol

Worked example

Inputs — Carbohydrate: 50 g; Protein: 20 g; Fat: 10 g; Alcohol: 0 g.
Results — Total energy = 370 kcal; In kilojoules = 1,548 kJ; From carbohydrate = 200 kcal; From protein = 80 kcal; From fat = 90 kcal; From alcohol = 0 kcal; Share from fat = 24.3 %.

Frequently asked questions

How many calories in a gram of fat?

9 kcal.

How many calories in a gram of carbohydrate?

4 kcal.

Does fibre count?

Labels often count fibre at about 2 kcal/g; this calculator uses the general factor for total carbohydrate.

What formula does the Grams to Calories Calculator use?

kcal = 4 × carbs + 4 × protein + 9 × fat + 7 × alcohol.

Sources

  1. FAO – Food energy: methods of analysis and conversion factors

Cite this calculator

Speedy Calculator. (2026). Grams to Calories Calculator. Speedy Calculator. https://speedycalculator.com/calculators/conversion/grams-to-calories/