Skip to content
Contania

Food Calorie Calculator

A food’s calories come from its macronutrients. Enter the grams of carbs, protein, fat and any alcohol to get the total calories and where they come from, using the Atwater factors.

Your numbers

g
g
g
g

Result

Total calories
415
kcal
From carbskcal
200
From proteinkcal
80
From fatkcal
135
Calories by macronutrient
MacronutrientCaloriesShare
Carbs (4 kcal/g)20048%
Protein (4 kcal/g)8019%
Fat (9 kcal/g)13533%
Alcohol (7 kcal/g)00%

The Atwater factors behind the math

Each macronutrient supplies a fixed number of calories per gram under the Atwater system: carbohydrate and protein at 4 kcal/g, fat at 9 kcal/g, and alcohol at 7 kcal/g. Total calories are just the sum of grams times factor. For 50 g carbs, 20 g protein and 15 g fat: 50×4 + 20×4 + 15×9 = 200 + 80 + 135 = 415 kcal. The same arithmetic works backward — it's how nutrition labels convert grams into the calorie count printed at the top.

Why your total will not exactly match a label

Labels round each macro to the nearest gram before multiplying, so the printed total can drift a few calories from the exact math, and manufacturers are allowed a margin of error on packaged food. Fiber adds a further wrinkle: it's a carbohydrate that contributes little usable energy, so some labeling approaches subtract it before applying the 4 kcal/g factor while others don't, which is part of why "net carbs" claims and total-calorie math sometimes disagree. None of this means the math is wrong — it means the inputs feeding it are rounded before you ever see them.

What a fixed factor per gram cannot capture

The Atwater factors are averages taken across broad food categories, not a measurement of the exact food in front of you. The actual energy your body extracts depends on how a food is processed and structured — whole almonds, for instance, have been measured to yield noticeably fewer usable calories than the Atwater estimate predicts, because some fat stays locked inside cell walls the body does not fully break down, while a more processed version of the same ingredients yields closer to the full estimate. Cooking, fiber content and individual digestion all shift the real number somewhat, in both directions, around what this calculator reports.

Why alcohol is counted differently

Alcohol carries 7 kcal/g — more than carbs or protein, just under fat — and unlike the other three, it supplies no nutrients the body needs. It also does not stack neatly with the other macros metabolically: the body prioritizes clearing alcohol first, which temporarily changes how fat is handled in the meantime. For calorie-counting purposes it is simplest to treat alcohol as its own category, exactly as this calculator does, rather than folding it into fat or carbs.

What this number is useful for

This calculator is built for checking arithmetic — verifying a label, comparing recipes, or understanding where a food's calories come from — not for measuring your own energy needs or building a meal plan. Someone managing a medical condition where carbohydrate or calorie counting matters clinically, such as diabetes, should get their counting method and targets from a registered dietitian or diabetes educator rather than relying on general label math alone.

Informational and educational result. Not a substitute for professional advice.

Frequently asked questions

Sources

Embed this calculator

Copy the code and paste it into your site or blog. Credit with a link back to Contania is included, and the height adjusts itself.

<iframe src="https://contania.app/embed/health/food-calories" title="Food Calorie Calculator (from macros)" width="100%" height="720" loading="lazy" style="border:1px solid #e5e0d8;border-radius:12px;max-width:640px"></iframe>
<script>window.addEventListener("message",function(e){if(e.data&&e.data.type==="contania:embed-height"){var f=document.querySelector('iframe[src="https://contania.app/embed/health/food-calories"]');if(f){f.style.height=e.data.height+"px"}}});</script>

Related calculators

Health & Fitness

Macros

Split your daily calories into carbs, protein and fat. Enter your calories and the ratio you want to see how many grams of each macro to eat per day.

Calculate
Health & Fitness

Calorie Deficit

Find the daily calories to lose weight at the rate you choose. The calculator works out your maintenance (TDEE) and the deficit for 0.25 to 1 kg a week.

Calculate
Health & Fitness

Daily Protein

Estimate how much protein to eat per day from your body weight and goal, in grams, with a per-meal target and the full range by goal.

Calculate
Health & Fitness

Ideal Weight

Find your ideal weight range for your height: the healthy band based on BMI (18.5–24.9) and the ideal weight from the Devine formula. Switch between kg and lb.

Calculate
Health & Fitness

Lean Body Mass

Estimate your lean body mass — everything that is not fat — from height, weight and sex using the Boer formula, plus your fat mass.

Calculate
Health & Fitness

1RM

Estimate your one-rep max (1RM) from a weight and the reps you did, using the Epley formula — plus the training loads at each percentage of your 1RM.

Calculate