# Macro calculator > How many grams of protein, fat and carbs is that? Turn a daily calorie target and a split in percent into grams of protein, fat and carbohydrate, a day and per meal. Convert your daily calories and a protein, fat and carb split into grams a day and per meal, with the 4, 9 and 4 kcal per gram energy factors. - Page: https://how.box/macros/ - Runs entirely in the browser. - License: HowToolbox's own text and data (titles, explanations, FAQs, tool descriptions and schemas, this file) are CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/); AI training and answers are welcome. Attribute "HowToolbox (how.box)" with a link to the page used. Third-party data keeps its own terms; the name and logo are not licensed. Publisher: HowToolbox, contact@how.box. Terms: https://how.box/about/terms/ ## Inputs Answer link: https://how.box/macros/?kcal={kcal}&p={p}&f={f}&m={m} - `kcal` (number 500 to 10000): Energy a day in kilocalories. Example: `2500`. - `p` (number 0 to 100): Protein share of the energy, percent. Example: `30`. - `f` (number 0 to 100): Fat share of the energy, percent; carbohydrate gets the rest. Example: `30`. - `m` (whole number 1 to 8): Meals a day. Example: `4`. Example answer: https://how.box/macros/?kcal=2500&p=30&f=30&m=4 A complete link carries the primary answer in the page HTML; a missing or invalid value shows the default page. ## Agent tools - `macros_calculate`: Grams of protein, fat and carbohydrate a day that supply a daily energy target in a chosen split. - MCP, one POST to https://how.box/mcp: `{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"macros_calculate","arguments":{"kcal":2500,"protein_pct":30,"fat_pct":30,"meals":4}}}` - GET: https://how.box/mcp/run/macros_calculate?kcal=2500&protein_pct=30&fat_pct=30&meals=4 ## How it works Food energy comes from three macronutrients: protein, fat and carbohydrate. A split such as 20 % protein, 30 % fat and 50 % carbohydrate says how much of your energy each one supplies. To shop, cook or read labels you need grams, so the calculator turns the split into grams. Grams = energy × share ÷ energy per gram. EU food labelling counts 4 kcal per gram of protein and of carbohydrate and 9 kcal per gram of fat (Regulation (EU) No 1169/2011, Annex XIV). For example, 2,000 kcal with 20 % protein is 400 kcal ÷ 4 = 100 g of protein; 30 % fat is 600 kcal ÷ 9 ≈ 67 g of fat; the remaining 50 % is 1,000 kcal ÷ 4 = 250 g of carbohydrate. The calculator only does the arithmetic: it does not tell you which split or how many calories suit you. Alcohol (7 kcal per gram) and fibre (2 kcal per gram) are not counted, and labels round their numbers, so your day will never match to the gram. ## FAQ **Why does fat give so few grams?** A gram of fat carries 9 kcal, more than twice the 4 kcal of a gram of protein or carbohydrate. The same share of energy is therefore fewer than half as many grams of fat. **What split should I choose?** That depends on your health, your goals and your food habits. National nutrition recommendations give ranges for adults, and a dietitian or doctor can help you choose. This tool only converts the split you choose. **Are the grams of food or of nutrients?** Of the nutrients themselves. 100 g of protein is not 100 g of chicken: check the nutrition label of each food to see how much protein, fat and carbohydrate it contains. **What happens if protein and fat add up to 100%?** Carbohydrate is zero. The calculator rejects a combined share above 100%. **Do I have to eat the same macros at every meal?** No. The per-meal figures divide the daily totals equally for convenience. They are not a meal-timing recommendation. More: [HowToolbox index](https://how.box/llms.txt) · [Agent Skill](https://how.box/skill.md) · [agent terms](https://how.box/about/agents/)