Calculator
What the Macro Calculator does
Macro Calculator: calculates Protein (g), Carbs (g) and Fat (g) from Daily Calories, Protein % and Carbs %. Example: daily calories 2000 kcal, protein % 30 % and carbs % 40 % gives protein (g) 150.
Give the Macro Calculator your Daily Calories, Protein %, Carbs % and Fat % and it works out Protein (g), Carbs (g) and Fat (g). Values update as you type, so comparing options is a matter of editing one field.
Typical users are readers checking a number from a clinic. Knowing how a figure is derived makes it much easier to interpret sensibly.
No sign-up, no data collection, no processing queue, just code running locally.
The field table, the method and a worked example are documented after the tool for anyone who wants to check the working.
What do the Macro Calculator fields mean?
The Macro Calculator uses 4 inputs. Nothing is blank on load, so you can see the shape of the answer before supplying your own figures.
| Field | What to enter | Default |
|---|---|---|
| Daily Calories | measured in kcal | 2000 |
| Protein % | measured in %; accepts 5 to 60 | 30 |
| Carbs % | measured in %; accepts 5 to 70 | 40 |
| Fat % | measured in %; accepts 5 to 60 | 30 |
How does the Macro Calculator work?
Each output is derived from the inputs above in a single pass; there is no hidden state carried between runs, so the same inputs always give the same calculation.
Validation runs before the calculation, which is why a mistyped value shows an error rather than a plausible-looking result.
Worked example
These are the values the Macro Calculator loads by default, and the result it produces from them. These are the exact values loaded when the page opens, and the answer they produce.
| Daily Calories | 2000 kcal |
|---|---|
| Protein % | 30 % |
| Carbs % | 40 % |
| Fat % | 30 % |
| Protein (g) | 150 |
|---|---|
| Carbs (g) | 200 |
| Fat (g) | 66.6667 |
| What this means | Macros add up to 100%. Aim for about 150 g protein, 200 g carbs, 67 g fat. |
Read next: BMR and TDEE: Why Every Calculator Gives You a Different Number
How to use it
- Set Daily Calories in kcal.
- Put Protein % in % (5 to 60).
- Key in Carbs % in % (5 to 70).
- Fill in Fat % in % (5 to 60).
- Skip the submit button; there is not one. Editing is enough.
- Check Protein (g), Carbs (g), Fat (g) and What this means on the right.
- Print gives a tidy version without the navigation, which is handy for attaching to a file.
What this tool does not do
- These formulas come from population averages and cannot account for your medical history.
- This is a screening estimate, not a diagnosis.
- Intermediate steps are rounded only for display; if you need full precision, work from the source figures.
- The tool trusts your numbers completely, so a mis-keyed digit propagates straight through.
Frequently asked questions
Enter Daily Calories in kcal, Protein % in %, Carbs % in % and Fat % in %. Every input names its unit, and every output does too, which removes the usual source of error.
Protein % accepts 5 to 60 %. Go outside it and you get an error against that specific field instead of a misleading number.
With the values loaded when the page opens, protein (g) comes out as 150. Overwrite any of the starting values and the result follows.
No. Your browser is doing the computing, so we could not see the values even if we wanted to.
No payment and no login. Advertising covers the running costs.
The formula is applied correctly, but it was derived from study populations that may not resemble you in age, build, ancestry or training history. That gap, not the arithmetic, is where the uncertainty lives.