What this calculator does
This food calorie calculator works out how many calories a meal or portion contains directly from its protein, carbohydrate and fat content, rather than needing to look up a packaged food’s printed calorie count. It uses the standard energy factors nutrition labelling is built on: 4 calories per gram of protein, 4 per gram of carbohydrate, and 9 per gram of fat.
This is a different question from calculators that estimate how many calories a person needs each day. Those work from body weight, age and activity level to estimate a target; this one works from the actual macronutrient content of specific food to total up how many calories are actually in it, whether checking a recipe, a homemade meal, or a food label’s numbers against its stated calorie count.
The formula
Multiply protein grams by 4, carbohydrate grams by 4, and fat grams by 9, then add the three together for calories in one serving. Multiply by the number of servings for the total across the whole meal or batch.
| Term | Meaning |
|---|---|
| 4/4/9 rule | The standard energy density used on nutrition labels: 4 kcal per gram of protein, 4 kcal per gram of carbohydrate, 9 kcal per gram of fat. |
| kcal (kilocalorie) | What food labels call "Calories": one kcal is the energy needed to raise 1 kg of water by 1°C. |
| Serving | One portion of the food as measured by the protein, carbohydrate and fat figures entered; the total scales up by however many servings are being eaten. |
The inputs explained
| Field | What to enter |
|---|---|
| Protein per serving (g) | Protein content of one serving, in grams (check a nutrition label or a food database for this figure). |
| Carbohydrate per serving (g) | Carbohydrate content of one serving, in grams. |
| Fat per serving (g) | Fat content of one serving, in grams. |
| Servings | How many servings are being counted, which can include fractions such as 1.5. |
When to use it
Checking a recipe’s total calories
Adding up the protein, carbohydrate and fat in a recipe, per serving, gives a calorie count for a homemade meal that has no packaging or label to read from.
Cross-checking a food label
Multiplying a label’s own protein, carbohydrate and fat figures through the 4/4/9 rule and comparing it against the label’s printed calorie count is a quick way to sanity-check the numbers or spot a label that used a different energy factor, such as counting fibre separately.
Scaling a meal up or down
Once the per-serving macros are known, changing the servings figure alone shows the total calorie cost of eating a bigger or smaller portion, or the whole batch rather than one serving.
Worked examples
Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.
How do calories change as protein content increases, at a fixed serving size?
Fixed carbohydrate and fat, across a range of protein content.
| Protein | Total calories | Share from protein / carbs / fat |
|---|---|---|
| 0 g | 295 kcal | 0% / 54% / 46% |
| 10 g | 335 kcal | 12% / 48% / 40% |
| 20 g | 375 kcal | 21% / 43% / 36% |
| 30 g | 415 kcal | 29% / 39% / 33% |
| 40 g | 455 kcal | 35% / 35% / 30% |
| 60 g | 535 kcal | 45% / 30% / 25% |
How does total calorie count scale with servings?
A fixed per-serving macro breakdown, across a range of serving counts.
| Servings | Total calories | Calories per serving |
|---|---|---|
| 1 | 395 kcal | 395 kcal |
| 1.5 | 593 kcal | 395 kcal |
| 2 | 790 kcal | 395 kcal |
| 3 | 1,185 kcal | 395 kcal |
| 4 | 1,580 kcal | 395 kcal |
| 6 | 2,370 kcal | 395 kcal |
Questions
Why 4, 4 and 9 calories per gram, and not something else?
These are the Atwater factors, long-standing average figures for how much usable energy the body gets from each macronutrient after digestion. Fat contains more than twice the energy per gram of protein or carbohydrate, which is why high-fat foods are calorie-dense relative to their weight.
What about fibre and alcohol?
Fibre is a type of carbohydrate the body cannot fully digest, so some labelling standards count it at a lower energy value or exclude it from the carbohydrate figure used for calories; check which convention a given label follows. Alcohol carries its own energy factor, around 7 kcal per gram, which this calculator does not include.
Why might my own calculation not exactly match a food label?
Small rounding on the label’s protein, carbohydrate and fat figures, different treatment of fibre, and label-to-label variation in exactly which energy factors were used can all produce a small difference from a hand calculation. A gap of a few percent is normal; a large gap is worth double-checking against the label’s serving size.
How is this different from a calculator that estimates my daily calorie needs?
A daily-needs calculator such as a TDEE or maintenance calorie calculator estimates how much energy a person burns in a day, from body weight, age and activity level. This calculator instead totals up how many calories are actually contained in a given food or meal, which is an entirely separate question answered from the food’s own macronutrient content.
To work out how many calories your own body needs in a day, see the maintenance calories calculator or the TDEE calculator.