How the Macro Calculator Works
AnyTool Macro Calculator splits a daily calorie target into the three macronutrients entirely in the browser. Protein and carbohydrate provide 4 kcal per gram and fat provides 9, so grams = (calories × that macro’s share) ÷ its calorie density. Calories can be entered directly or derived from a Basal Metabolic Rate (Mifflin-St Jeor, Harris-Benedict or Katch-McArdle) multiplied by an activity factor to give TDEE, then adjusted for the chosen goal — cut at −20 %, maintain, or bulk at +12.5 %. Percentage presets (balanced 30/40/30, high-protein 40/30/30, low-carb 40/20/40, keto 25/5/70, Zone 40/30/30, or custom sliders that must total 100 %) decide the share. All arithmetic is pure client-side JavaScript shared through a unit-tested engine that reuses the BMR module.
- Protein & carbs = 4 kcal/g; fat = 9 kcal/g
- grams = (calories × macro %) ÷ kcal-per-gram
- Calories direct, or TDEE × goal factor (cut 0.8, maintain 1.0, bulk 1.125)
- Presets balanced, high-protein, low-carb, keto, Zone and custom
- All math is client-side JavaScript — no server round-trip
