How to use the Nutrition & Macro Calculator
Enter your own calorie goal and macro split, or type the values from food labels into rows. The Nutrition & Macro Calculator shows grams, calorie amounts, percentages, conversion factors, and the difference between entered calories and calories implied by macro grams.
Calculate targets from a calorie goal
- Open 1. Targets from calories. Enter Calorie goal (kcal), Fiber target (g), Protein (% of calories), Carbohydrate (% of calories), and Fat (% of calories).
- Set the three macro percentages to 100% in total, then select Calculate targets.
- Read the grams, calorie amounts, percentages, and kcal-per-gram values in the result table.
- Select Copy result or Download result (.txt) to keep the plain-text calculation.
The starting values produce these macro amounts:
Calorie goal (kcal): 2000
Protein (% of calories): 30
Carbohydrate (% of calories): 40
Fat (% of calories): 30
Fiber target (g): 28
Protein: 150.0 g
Carbohydrate: 200.0 g
Fat: 66.7 g
Fiber: 28.0 g
Total food macros by row
Open 2. Total food macros and fill in Food, Calories (kcal), Protein (g), Carbs (g), Fat (g), and Fiber (g) for each row. Select Add food row for another entry. Select Remove row on a row you want to delete.
The reset rows are Chicken breast (150g) and Brown rice (1 cup cooked). Together they contain 464 kcal, 51.5 g protein, 45.0 g carbohydrate, 7.2 g fat, and 3.5 g fiber from the entered values. The report converts the protein, carbohydrate, and fat grams to 451 kcal using 4, 4, and 9 kcal per gram, then displays the difference.
Report label is optional. A label such as Lunch appears in the result title. The report sums each numeric column, and fiber remains outside the macro-calorie percentage split.
What the calculator accepts and checks
Calorie, fiber, and food-row numbers must be 0 or greater. Each percentage must be between 0 and 100. Protein (% of calories), Carbohydrate (% of calories), and Fat (% of calories) must total 100% within 0.05 percentage points.
Food mode requires at least one row. Every row needs numbers for Calories (kcal), Protein (g), Carbs (g), Fat (g), and Fiber (g). When Food is blank, the result names that entry Row 1, Row 2, and so on. A blank or invalid numeric field produces an error instead of a report.
Fiber target is entered directly in grams. Protein and carbohydrate use 4 kcal per gram; fat uses 9 kcal per gram. The calculation runs in the browser, uses the values you enter, and does not fetch a food database or evaluate a diet or health condition.
Use the two modes for different entries
For a daily or meal target, enter 2000 for Calorie goal (kcal), 30 for Protein (% of calories), 40 for Carbohydrate (% of calories), 30 for Fat (% of calories), and 28 for Fiber target (g).
For a lunch record, enter the nutrition-label values for each food row, type Lunch in Report label, and compare entered calories with the macro-calorie total.
When the ingredient list changes, add or remove rows before selecting Calculate totals. Copy result and Download result (.txt) are available after the calculation.
Choose a different food calculator
Use Food Calculators to browse related recipe and nutrition tools. Choose the Recipe Scaling Calculator when you need to change an ingredient list from current servings to a target serving count.
Choose the Recipe Cost Calculator for batch or per-serving cost based on package prices, yield, waste, or markup. Choose the Cooking Conversion Calculator for volume, weight, temperature, density, precision, or batch-scaling conversions.
Frequently asked questions
How do I calculate macro targets from calories?
Enter a calorie goal and percentages that total 100%, then select Calculate targets. Protein and carbohydrate use 4 kcal per gram, while fat uses 9 kcal per gram.
Does fiber count in the macro percentage split?
Fiber stays outside the protein, carbohydrate, and fat percentage split. Enter it directly in Fiber target (g), and the calculator reports the gram amount separately.
How do I total food macros?
Open 2. Total food macros, enter each food's calories and macro grams, then select Calculate totals. The report sums the rows and compares entered calories with calories implied by protein, carbohydrate, and fat grams.
Why can entered calories differ from macro calories?
Entered calories can differ because the report calculates macro calories from the grams you supplied, while food-label calories may be rounded. The result shows the difference and percentage.