This grams to calories calculator applies the Atwater general factor system: the published energy conversion factors that turn a mass of protein, carbohydrate, fat or alcohol into food energy. Enter the grams, get kilocalories and kilojoules, the energy density of the mixture, and the portion weight that corresponds to any calorie target you name.
Arb Digital publishes free reference tools, and this one takes the food's own energy density as an input rather than pretending to know it. There is no built-in food table here, because a table we could not source to a named database would be worse than no table at all. What the page does provide is the arithmetic, the factors, and the citation behind them.
What This Calculator Does
In macronutrient mode it multiplies each macro by its Atwater factor and sums the result: protein and carbohydrate at 4 kcal per gram, fat at 9, alcohol at 7, and dietary fibre at 2 where you choose to count it separately. It converts the total to kilojoules at the standard 4.184 kJ per kcal, divides by the total mass to give the mixture's own energy density in kcal per gram, and inverts that to show what weight a calorie target implies.
In energy-density mode it does the simpler job: portion weight multiplied by a kcal-per-100-g figure that you take from a label or a food composition database. Both modes feed the same result grid, so you can cross-check a label's calorie figure against the macros printed beside it — a genuinely useful check, and one that frequently reveals rounding.
How to Use It
- Pick a mode. Macro grams if you have the breakdown, portion weight and energy density if you have a label figure.
- Enter the macro grams as the label gives them. Watch the fibre field: most labels include fibre inside total carbohydrate, and entering it twice inflates the total.
- Add alcohol in grams if relevant. Drinks are usually labelled by volume and percentage rather than by mass, so this needs converting first.
- Read the energy density. Kilocalories per gram is the single most transferable number here, because it lets you scale any portion.
- Use the reverse field to turn a calorie target into a weight of this particular food.
The Atwater Factors and Their Source
The FAO's chapter on calculation of the energy content of foods — energy conversion factors sets out the Atwater general factor system in both units: protein at "17 kJ/g (4.0 kcal/g)", fat at "37 kJ/g (9.0 kcal/g)", carbohydrate at "17 kJ/g (4.0 kcal/g)" and alcohol at "29 kJ/g (7.0 kcal/g or an unrounded value of 6.9 kcal/g)". It also notes that an energy factor for dietary fibre of "8.0 kJ/g (2.0 kcal/g)" has been recommended but is not yet widely implemented, which is exactly why fibre is a separate, optional field on this page rather than baked into the carbohydrate total.
The unit conversion comes from the same source: "1 kJ = 0.239 kcal; and 1 kcal = 4.184 kJ". The word "calorie" on a food label means kilocalorie, which is why 500 dietary Calories is 500 kcal and 2,092 kJ rather than anything a thousand times smaller.
A Worked Example
Take 20 g of protein, 30 g of carbohydrate and 10 g of fat. Protein contributes 20 × 4 = 80 kcal, carbohydrate 30 × 4 = 120 kcal, fat 10 × 9 = 90 kcal, for a total of 290 kcal. In kilojoules that is 290 × 4.184 = 1,213 kJ. The macros weigh 60 g in total, so the energy density of that mixture is 290 ÷ 60 = 4.83 kcal per gram — though a real food containing those macros also contains water and ash, so its as-eaten density would be considerably lower.
That last point is the most common misreading of this calculation. The energy density this tool computes from macros is the density of the macronutrient mass, not of the food. A chicken breast is roughly three-quarters water; its macros are dense, and it is not.
Where the Conversion Is Approximate
The Atwater general factors are averages. FAO's own document describes the general system as one of several approaches, alongside specific factors that vary by food group, precisely because digestibility and metabolisable energy are not constant across foods. Protein from a legume and protein from an egg are not equally available; fibre fermentation varies between individuals; and the 2 kcal/g fibre figure is a recommendation rather than an established convention.
Label figures add their own approximation. Nutrition labels are rounded, often to the nearest gram or to the nearest 5 or 10 kcal, and permitted tolerances mean the declared figure and the analysed figure can differ by a meaningful margin. Values also vary between production batches, between cultivars, and with how a food is prepared. If your macro-derived total and a label's stated calories disagree by a few percent, rounding is by far the most likely explanation.
Where you need a composition figure you can cite rather than one printed on a packet, the USDA's FoodData Central is the usual reference. It publishes several distinct data types — Foundation Foods, SR Legacy, Survey (FNDDS) and Branded Foods among them — and they are not interchangeable, so it is worth noting which one a number came from when you record it. Branded Foods entries are label data with all of a label's rounding; Foundation Foods entries are analytical.
Alcohol Is Measured by Volume, Counted by Mass
The 7 kcal/g factor for alcohol applies to grams of ethanol, and drinks are labelled by percentage alcohol by volume. To get grams, multiply the volume in millilitres by the ABV as a decimal and then by 0.789, the density of ethanol. A 175 ml glass of wine at 13% ABV therefore contains 175 × 0.13 × 0.789 = 17.9 g of ethanol, which is about 126 kcal from the alcohol alone before any residual sugar is counted. Our alcohol units calculator and ABV calculator handle the volume side of that arithmetic.
Kilocalories, Kilojoules and the Capital C
Three units share a name and cause endless confusion. The scientific calorie, sometimes written with a small c, is the energy to heat one gram of water by one degree. The dietary Calorie, conventionally written with a capital C, is a kilocalorie — a thousand of those. Kilojoules are the SI unit and are what appear on labels across the European Union, Australia and New Zealand, usually alongside kcal. This tool reports kcal and kJ together for that reason. For pure unit conversion between joules and calories in any direction, our joules to calories converter is the dedicated page.
The Boundary With Our Other Nutrition Tools
Three neighbouring tools answer different questions. The meal calorie calculator totals a whole meal from its ingredients and gives per-serving figures — it starts from foods, not from macro grams. The macro calculator sets macronutrient targets from a calorie goal, so it runs in the opposite direction to this page. And the TDEE calculator estimates daily energy expenditure rather than the energy content of anything. This page does one narrow thing: it converts a weighed quantity into energy and back, with the factors on display.
We publish a large library of free tools that show their formulas and name their sources. Browse the hub, or tell us what is missing.
Browse Free Tools Contact Arb DigitalCommon Mistakes to Avoid
- Counting fibre twice. Most labels include fibre within total carbohydrate. Adding it again in the fibre field inflates the total.
- Treating macro energy density as food energy density. Water and ash carry no energy but do carry weight, so a food's as-eaten density is always lower than its macro mixture's.
- Confusing calories with Calories. A food label's Calorie is a kilocalorie. The factor between them is a thousand.
- Entering alcohol by volume. The 7 kcal/g factor needs grams of ethanol, which is millilitres multiplied by ABV and then by 0.789.
- Expecting an exact match with a label. Label values are rounded, subject to tolerances, and vary by product and batch.
Related Free Tools From Arb Digital
For a whole meal from its ingredients, use the meal calorie calculator; for targets rather than totals, the macro calculator or the TDEE calculator. Pure unit work belongs to the joules to calories converter and the grams to ounces converter, and drinkers will want the alcohol units calculator. Everything else is in the free online tools hub.
Frequently Asked Questions
They are the published energy conversion factors used to calculate food energy from composition. FAO gives protein at 17 kJ per gram or 4.0 kcal, fat at 37 kJ or 9.0 kcal, carbohydrate at 17 kJ or 4.0 kcal, and alcohol at 29 kJ or 7.0 kcal, with an unrounded alcohol value of 6.9 kcal per gram.
290 kilocalories. Protein contributes 20 times 4, which is 80; carbohydrate 30 times 4, which is 120; and fat 10 times 9, which is 90. In kilojoules that total is 290 multiplied by 4.184, or 1,213 kJ.
Only if your carbohydrate figure excludes it. FAO notes that an energy factor for fibre of 8.0 kJ or 2.0 kcal per gram has been recommended but is not yet widely implemented, and most labels count fibre inside total carbohydrate. Entering it in both places double-counts the energy.
Multiply by 4.184. FAO gives the conversion as 1 kcal equals 4.184 kJ, and 1 kJ equals 0.239 kcal. A 500 kcal portion is therefore 2,092 kJ, which is why European, Australian and New Zealand labels show both figures side by side.
Because label values are rounded, often to the nearest gram of macronutrient or the nearest few kilocalories, and because permitted tolerances allow the declared figure to differ from the analysed one. Values also vary between batches, cultivars and preparation methods, so a few percent of disagreement is normal.
Because a food composition table we could not attribute to a named database would be less useful than none. Energy density is taken as your own input instead, from a product label or from a food composition database such as USDA FoodData Central, so the figure driving the result is one you can verify.
The 7 kcal per gram factor applies to grams of ethanol, but drinks are labelled by volume and percentage. Multiply millilitres by the ABV as a decimal and then by 0.789, the density of ethanol. A 175 ml glass of wine at 13 percent gives 17.9 g of ethanol, or about 126 kcal from the alcohol alone.
No. In macronutrient mode it is the density of the macronutrient mass you entered, not of the food as eaten. Real foods contain water and ash that add weight without adding energy, so the as-eaten energy density is always lower, often by a large margin in high-moisture foods.
This calculator converts quantities using published conversion factors and is not dietary advice. Label values are rounded and vary by product and batch, the Atwater general factors are averages rather than exact figures for any one food, and questions about individual nutrition are for a qualified professional.