{"success":true,"version":"v1","request":{"tool":"get_calculator_schema","calculator_id":"macros"},"result":{"entity_type":"calculator","id":"macros","calculator_id":"macros","canonical_url":"https://tttkmbb.com/health/macros","name":"Macro Calculator","title":"Macronutrient Calculator – Protein, Carbohydrate and Fat Grams from Calories","category":"health","category_name":"Health","tool_name":"calculate_macros","featured_mcp_tool":false,"description":"Splits a daily calorie target into grams of protein, carbohydrate and fat using a preset ratio (balanced, low-carb, high-protein, keto) or custom percentages.","use_when":"You have a calorie target (from tdee) and want gram targets for each macronutrient.","do_not_use_when":"Medical diets (renal, diabetic, PKU) are involved; those need individualised prescriptions.","inputs":[{"name":"calories_per_day","label":"Calories","type":"number","unit":"kcal/day","required":true,"min":500,"max":10000,"description":"Daily calorie target.","example":2000},{"name":"preset","label":"Ratio preset","type":"enum","required":false,"default":"balanced","values":[{"value":"balanced","label":"Balanced 30% protein / 40% carbs / 30% fat"},{"value":"low_carb","label":"Low-carb 40 / 20 / 40","aliases":["lowcarb","low-carb"]},{"value":"high_protein","label":"High-protein 40 / 30 / 30"},{"value":"keto","label":"Keto 25 / 5 / 70","aliases":["ketogenic"]},{"value":"custom","label":"Custom (use the percent inputs)"}],"description":"Macronutrient ratio preset. Choose custom to supply your own percentages.","example":"balanced"},{"name":"protein_percent","label":"Protein %","type":"number","unit":"%","required":false,"min":0,"max":100,"description":"Only for preset=custom.","example":30},{"name":"carbs_percent","label":"Carbohydrate %","type":"number","unit":"%","required":false,"min":0,"max":100,"description":"Only for preset=custom.","example":40},{"name":"fat_percent","label":"Fat %","type":"number","unit":"%","required":false,"min":0,"max":100,"description":"Only for preset=custom.","example":30}],"outputs":[{"name":"protein_g","label":"Protein","type":"number","unit":"g/day","decimals":0,"description":"Protein grams (4 kcal/g)."},{"name":"carbs_g","label":"Carbohydrate","type":"number","unit":"g/day","decimals":0,"description":"Carbohydrate grams (4 kcal/g)."},{"name":"fat_g","label":"Fat","type":"number","unit":"g/day","decimals":0,"description":"Fat grams (9 kcal/g)."},{"name":"ratio","label":"Ratio used","type":"string","decimals":4,"description":"Protein/carbs/fat percentages applied."}],"input_schema":{"type":"object","properties":{"calories_per_day":{"description":"Daily calorie target. Unit: kcal/day.","type":"number","minimum":500,"maximum":10000,"examples":[2000],"x-unit":"kcal/day"},"preset":{"description":"Macronutrient ratio preset. Choose custom to supply your own percentages.","type":"string","enum":["balanced","low_carb","high_protein","keto","custom"],"default":"balanced","examples":["balanced"]},"protein_percent":{"description":"Only for preset=custom. Unit: %.","type":"number","minimum":0,"maximum":100,"examples":[30],"x-unit":"%"},"carbs_percent":{"description":"Only for preset=custom. Unit: %.","type":"number","minimum":0,"maximum":100,"examples":[40],"x-unit":"%"},"fat_percent":{"description":"Only for preset=custom. Unit: %.","type":"number","minimum":0,"maximum":100,"examples":[30],"x-unit":"%"}},"additionalProperties":false,"required":["calories_per_day"]},"output_schema":{"type":"object","properties":{"protein_g":{"description":"Protein grams (4 kcal/g). Unit: g/day.","type":"number","x-unit":"g/day"},"carbs_g":{"description":"Carbohydrate grams (4 kcal/g). Unit: g/day.","type":"number","x-unit":"g/day"},"fat_g":{"description":"Fat grams (9 kcal/g). Unit: g/day.","type":"number","x-unit":"g/day"},"ratio":{"description":"Protein/carbs/fat percentages applied.","type":"string"}}},"formula":"grams = calories × percent / (4 kcal/g for protein and carbohydrate, 9 kcal/g for fat)","sources":[{"name":"USDA Dietary Guidelines for Americans 2020–2025 – Acceptable Macronutrient Distribution Ranges","url":"https://www.dietaryguidelines.gov/","type":"standard","retrieved_at":"2026-09-23"},{"name":"Atwater general factors (FAO Food energy – methods of analysis and conversion factors)","url":"https://www.fao.org/4/y5022e/y5022e00.htm","type":"standard","retrieved_at":"2026-09-23"}],"freshness":{"type":"static","max_age_seconds":null,"note":"Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output."},"examples":[{"name":"2000 kcal balanced","inputs":{"calories_per_day":2000,"preset":"balanced"},"expected":{"protein_g":150,"carbs_g":200,"fat_g":67,"ratio":"30/40/30"},"url":"https://tttkmbb.com/api/v1/calculate/macros?calories_per_day=2000&preset=balanced"},{"name":"2200 kcal custom 35/35/30","inputs":{"calories_per_day":2200,"preset":"custom","protein_percent":35,"carbs_percent":35,"fat_percent":30},"expected":{"protein_g":193,"carbs_g":193,"fat_g":73},"url":"https://tttkmbb.com/api/v1/calculate/macros?calories_per_day=2200&preset=custom&protein_percent=35&carbs_percent=35&fat_percent=30"}],"faq":[{"q":"Which preset should I use?","a":"Balanced suits most people; high-protein helps preserve muscle in a deficit; keto requires carbs below ~50 g/day and is not suitable for everyone."},{"q":"Do the percentages have to sum to 100?","a":"Yes for custom ratios; the calculator returns an error otherwise."}],"tags":["macros","macronutrients","protein carbs fat","iifym","keto macros"],"related":[{"calculator_id":"tdee","reason":"Get the calorie target first."},{"calculator_id":"protein-intake","reason":"Check protein against body-weight based recommendations."}],"links":{"html":"https://tttkmbb.com/health/macros","markdown":"https://tttkmbb.com/health/macros.md","json":"https://tttkmbb.com/health/macros.json","api":"https://tttkmbb.com/api/v1/calculate/macros","schema":"https://tttkmbb.com/api/v1/calculators/macros","openapi":"https://tttkmbb.com/openapi.json","mcp":"https://tttkmbb.com/mcp"},"version":"v1","updated_at":"2026-09-23"},"timestamp":"2026-09-23T23:29:08Z","next_actions":[{"tool":"run_calculator","calculator_id":"macros","reason":"Run Macro Calculator with the inputs above."}],"links":{"markdown":"https://tttkmbb.com/health/macros.md"}}