Free tools

Macro Calculator: Calories to Grams & Back

Convert calories and chosen macro percentages to grams, or protein, carbs and fat back to calories. Free calculator with worked examples; no sign-up.

English
Your starting details

Carbohydrates use the remaining percentage.

Your inputs stay on this page. They are not saved or sent to TrainAI.

Your result

Enter your details to see a result.

Worked examples

These examples use 25% protein, 30% fat and 45% carbohydrates. Choose your own percentages in the calculator; this split is not a recommendation.

Macro Calculator: Calories to Grams & Back — Worked examples
Calorie totalProteinFatCarbohydrates
1,500 kcal93.8 g50 g168.8 g
2,000 kcal125 g66.7 g225 g
2,500 kcal156.3 g83.3 g281.3 g

Examples illustrate the calculation. They are not recommended targets.

Grams to calories calculator

Already have grams of protein, carbohydrates and fat? Enter them below to calculate their energy total.

Your inputs stay on this page. They are not saved or sent to TrainAI.

Common questions

Why do calories and macro grams sometimes differ?

The calculation uses 4 kcal/g for protein and carbohydrates and 9 kcal/g for fat. Rounded labels, fibre and sugar alcohols can make a food label differ. Your chosen percentages must total 100%.

Free workout log →

How it works

Protein and carbohydrates provide about 4 kcal per gram; fat provides 9. The percentages are your choices, not recommended targets. Rounded grams may not add up exactly to the calorie total.

protein / carbs: kcal × % / 100 / 4 = g
fat: kcal × % / 100 / 9 = g

Source: USDA: Food and Nutrition Information Center

These tools provide general information, not medical advice. Nutrition estimates are not intended for children, pregnancy, breastfeeding or managing a medical condition.

App Store

Get TrainAI on your phone

Some social apps keep links inside their own browser, which can prevent the store from opening.

  1. Tap the menu (⋯) or share icon in this browser.
  2. Choose “Open in browser”, Safari or Chrome. The wording varies by app.
  3. Tap the download button again, then install TrainAI from the store.
Continue to the store

Or open the App Store or Google Play on your phone and search for “TrainAI”.

Free to download. Premium features require a purchase. Availability and pricing depend on your region.