What this calculator does
This tool converts the grams of fat, protein, carbohydrate and alcohol in a food, meal or recipe into total calories (kilocalories) and shows what percentage of energy each macronutrient supplies. It uses the standard Atwater energy factors used on nutrition labels worldwide, so it works for any food in any country.
How to use it
Enter the grams of each macronutrient from a nutrition label or recipe. Fat, protein and carbohydrates are required; alcohol is optional and defaults to zero. The calculator multiplies each value by its energy factor, adds them up, and breaks the result down by macro and percentage.
The formula explained
Energy density differs by macronutrient: fat = 9 kcal/g, protein = 4 kcal/g, carbohydrate = 4 kcal/g and alcohol = 7 kcal/g. The total is simply:
$$\text{kcal} = 9 \times \text{fat} + 4 \times \text{protein} + 4 \times \text{carb} + 7 \times \text{alcohol}$$
Fat is the most energy-dense macro, which is why fatty foods carry more calories per gram than equivalent-weight carbs or protein.
Worked example
Suppose a meal contains 10 g fat, 20 g protein, 30 g carbohydrate and 0 g alcohol. Fat = \(9 \times 10 = 90\) kcal, protein = \(4 \times 20 = 80\) kcal, carbs = \(4 \times 30 = 120\) kcal. Total = \(90 + 80 + 120 = 290\) kcal. Fat supplies \(90/290 \approx 31\%\), protein \(\approx 27.6\%\) and carbs \(\approx 41.4\%\) of the energy.
Macro Splits Compared: Same Calories, Different Grams
Six realistic meals and snacks, each run through \(E = 9F + 4P + 4C + 7A\). The point of the comparison is that similar totals can come from very different gram combinations, and that the percentage columns move independently of the grams.
| Meal | Fat (g) | Protein (g) | Carbs (g) | Alcohol (g) | Total kcal | % fat | % protein | % carb | % alcohol |
|---|---|---|---|---|---|---|---|---|---|
| Avocado toast (2 slices, half an avocado) | 22 | 10 | 40 | 0 | 398 | 49.7% | 10.1% | 40.2% | 0% |
| Grilled chicken breast with rice and vegetables | 8 | 45 | 60 | 0 | 492 | 14.6% | 36.6% | 48.8% | 0% |
| Cheeseburger (single patty, cheese, bun) | 30 | 28 | 35 | 0 | 522 | 51.7% | 21.5% | 26.8% | 0% |
| Whey protein shake with semi-skimmed milk | 5 | 35 | 12 | 0 | 233 | 19.3% | 60.1% | 20.6% | 0% |
| Leafy salad with 2 tbsp olive-oil dressing and seeds | 28 | 6 | 14 | 0 | 332 | 75.9% | 7.2% | 16.9% | 0% |
| 500 mL beer plus a 30 g bag of crisps | 10 | 3 | 31 | 20 | 366 | 24.6% | 3.3% | 33.9% | 38.3% |
How two of those rows are built:
$$E_\text{toast} = 9(22) + 4(10) + 4(40) = 198 + 40 + 160 = 398\ \text{kcal}$$
$$E_\text{beer+crisps} = 9(10) + 4(3) + 4(31) + 7(20) = 90 + 12 + 124 + 140 = 366\ \text{kcal}$$
Three observations worth drawing out. First, the avocado toast and the beer-and-crisps snack land within about 30 kcal of each other, yet one is 10% protein and the other 3% — gram counts, not totals, decide the split. Second, the salad is 76% fat but only 332 kcal: a high fat percentage does not mean a large meal, because the percentage is a share of a small denominator. Third, in the beer row the 20 g of alcohol supply 140 kcal, the single largest contribution in that row, and they are what compress protein to 3.3% of energy. Percentages in each row sum to 100% (the beer row to 100.1% after rounding).
Gram figures above are representative portion estimates used to illustrate the arithmetic, not values for any specific branded product; read the nutrition label of what you actually eat for accurate grams.
Energy Factors Beyond the Standard 9/4/4/7
The familiar 9/4/4/7 set covers fat, protein, carbohydrate and alcohol, but food-labelling law assigns specific energy factors to several other components too — fibre, polyols, glycerol and organic acids among them. These matter whenever a product contains sugar alcohols or added fibre, because using 4 kcal/g for those components overstates the energy. The values below are the conversion factors listed in Annex XIV of EU Regulation (EU) No 1169/2011 on the provision of food information to consumers, with notes where US FDA labelling practice differs.
| Component | kcal/g | kJ/g (as listed in law) | Jurisdiction / notes |
|---|---|---|---|
| Fat | 9 | 37 | EU Reg. 1169/2011; same factor used in US FDA labelling and in general Atwater practice |
| Protein | 4 | 17 | EU Reg. 1169/2011; same in US labelling |
| Carbohydrate (excluding polyols; usually determined "by difference") | 4 | 17 | EU Reg. 1169/2011; same in US labelling |
| Alcohol (ethanol) | 7 | 29 | EU Reg. 1169/2011; the same 7 kcal/g figure is used for ethanol in US practice |
| Dietary fibre | 2 | 8 | EU Reg. 1169/2011. US labelling practice differs: some fibres are counted at 0 kcal/g and others carry an assigned value, so a US and an EU label for the same product can disagree. |
| Erythritol | 0 | 0 | EU Reg. 1169/2011 lists erythritol at 0. US FDA has accepted 0.2 kcal/g for erythritol. |
| Polyols (other sugar alcohols, e.g. sorbitol, maltitol, xylitol) | 2.4 | 10 | EU Reg. 1169/2011 uses a single 2.4 kcal/g factor for polyols other than erythritol; US FDA accepts individual per-polyol values, so figures differ by polyol. |
| Glycerol | 4.3 | 18 | EU Reg. 1169/2011 |
| Organic acids | 3 | 13 | EU Reg. 1169/2011 |
| Salatrim (a reduced-energy triglyceride fat replacer) | 6 | 25 | EU Reg. 1169/2011 |
Converting between kcal and kJ
One kilocalorie is defined as 4.184 kilojoules, so:
$$\text{kJ} = \text{kcal} \times 4.184 \qquad\text{and}\qquad \text{kcal} = \frac{\text{kJ} }{4.184}$$
The kJ figures written into the regulation are rounded whole numbers, not the exact products. Fat is a clear case: \(9 \times 4.184 = 37.656\), which the law rounds to 37 kJ/g. Likewise \(4 \times 4.184 = 16.736 \to 17\), \(7 \times 4.184 = 29.288 \to 29\), and \(2 \times 4.184 = 8.368 \to 8\) kJ/g for fibre. Because of this rounding, a label's kJ value and its kcal value multiplied by 4.184 can differ slightly; both are correct within the rounding the regulation permits.
EU labels are required to show energy in both kJ and kcal, in that order; US Nutrition Facts panels show Calories (kcal) only. Note that in everyday English-language nutrition writing, a capital-C "Calorie" on a food label means one kilocalorie — the same unit this calculator reports.
This calculator applies the standard 9/4/4/7 factors only. If you are working from a label that lists polyols, erythritol or a significant fibre content, the label's own energy figure will be lower than a plain 4 kcal/g treatment of those grams would suggest; use the table above to account for them.
FAQ
Why might my total differ slightly from the label? Labels sometimes use rounded gram values or country-specific factors (e.g. fibre at 2 kcal/g), so small differences are normal.
Are these calories or kilocalories? The "calories" shown on food labels are kilocalories (kcal). This tool reports kcal.
Should I include fibre or sugar alcohols? This calculator treats all entered carbohydrate at 4 kcal/g. If you want net carbs, subtract fibre before entering, or adjust manually for sugar alcohols.