Grams to Calories Calculator
Test cases replayed : 3 of 3 match · Methodology · Sources
Enter the grams of each macronutrient, for example from a nutrition label.
Result
Total calorieskcal
Share from carbohydrate (%)
Reading the result
At a glance
What moves the result
Method and sources: How this calculator works, Sources
- Share from protein (%)
- Share from fat (%)
- Total energy (kJ)
Estimate for planning only, not tax, legal, financial or medical advice. Check important figures with the official source listed on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- Carbohydrate, in g: enter 0 or more.
- Protein, in g: enter 0 or more.
- Fat, in g: enter 0 or more.
- Alcohol, in g: enter 0 or more.
- Read the result: Total calories; the panel also shows Share from carbohydrate (%), Share from protein (%), Share from fat (%) and Total energy (kJ).
Sources
- 21 CFR 101.9: Nutrition labeling of food U.S. Government Publishing Office (Code of Federal Regulations) checked on 2026-11-04
- NIST Guide to the SI, Appendix B.8: Factors for Units Listed Alphabetically National Institute of Standards and Technology (NIST) checked on 2026-11-01
How this calculator works
Calories = 4 × carbohydrate g + 4 × protein g + 9 × fat g + 7 × alcohol g. These are the general Atwater factors that the FDA allows for nutrition labels (21 CFR 101.9).
kJ = kcal × 4.184. A label's total may differ slightly because of rounding and fiber, which supplies less energy than other carbohydrate.
The formula
| Symbol | Meaning | Unit |
|---|---|---|
| Carbohydrate | g | |
| Protein | g | |
| Fat | g | |
| Alcohol | g | |
| Total calories | kcal |
Worked example
| Carbohydrate | 30 g |
|---|---|
| Protein | 20 g |
| Fat | 10 g |
| Alcohol | 0 g |
| Share from carbohydrate (%) | 41.4 |
|---|---|
| Share from protein (%) | 27.6 |
| Share from fat (%) | 31.0 |
| Total energy (kJ) | 1,213.36 |
Total calories 290 kcal
Each step uses the unrounded value of the step before it; figures on this page are rounded for display.
Frequently asked questions
How many calories are in 1 gram of fat?
9 kcal, against 4 kcal for a gram of carbohydrate or protein and 7 kcal for a gram of alcohol.
How many calories are 30 g carbs, 20 g protein and 10 g fat?
290 kcal.