AnyTool
Your files never leave your device. All processing happens locally in your browser.

How do I calculate my macros (protein, carbs and fat)?

Enter your daily calorie target directly, or let AnyTool Macro Calculator derive it from your sex, age, height, weight, activity level and goal (cut, maintain or bulk). Then pick a macro preset — Balanced 30/40/30, High-protein 40/30/30, Low-carb 40/20/40, Keto 25/5/70, Zone 40/30/30 or Custom — or switch to protein-anchored mode, which fixes protein to 1.6–2.2 g per kg of bodyweight, fat to 20–35 % of calories and lets carbs fill the rest. The page instantly shows protein, carbs and fat in grams, calories and percent, a visual split, and a per-meal breakdown for 3, 4 or 5 meals. Everything runs in your browser, so nothing is uploaded.

  • Protein and carbs are 4 kcal/g; fat is 9 kcal/g
  • Presets: Balanced, High-protein, Low-carb, Keto, Zone, Custom
  • Protein-anchored mode: 1.6–2.2 g/kg protein, 20–35 % fat, carbs fill the rest
  • Goal adjusts calories: cut −20 %, maintain, bulk +12.5 %
  • 100% in your browser — no upload, no signup, works offline

What is

Macronutrient split (macros)

A macronutrient split is how a daily calorie target is divided among the three energy-providing macronutrients — protein and carbohydrate at 4 kcal per gram, and fat at 9 kcal per gram. The split can be set as percentages of calories (for example a balanced 30 % protein / 40 % carbs / 30 % fat) or anchored to protein grams per kilogram of bodyweight with fat as a percentage of calories and carbohydrate filling the remainder. Macros are typically built from maintenance calories (TDEE) adjusted for a fat-loss, maintenance or muscle-gain goal.

Calculators

Related terms

Protein per kilogramIIFYM (flexible dieting)TDEE / maintenance caloriesCaloric deficit and surplus

Frequently Asked Questions

Set your daily calories, then split them: protein and carbs at 4 calories per gram and fat at 9, using a preset percentage or a protein target in grams per kilogram.

First fix a daily calorie target — directly, or from your TDEE adjusted for your goal. Then divide it among the macros: grams = (calories × that macro’s percentage) ÷ its calorie density, where protein and carbohydrate are 4 kcal per gram and fat is 9. AnyTool does this live for presets like balanced 30/40/30 or keto 25/5/70, and also offers a protein-anchored mode that sets protein from grams per kilogram of bodyweight first.

There is no single best ratio. Hit enough protein (about 1.6–2.2 g/kg) and fat (20–35 % of calories); the rest is personal preference.

Research shows that, at equal calories, most macro splits work about the same as long as you can stick to them. What matters more is meeting minimums: roughly 1.6–2.2 g of protein per kilogram of bodyweight to preserve muscle, and 20–35 % of calories from fat for hormones and satiety, with carbohydrate fuelling training. AnyTool’s protein-anchored mode is built around exactly this, while the percentage presets give popular starting points for cutting, maintaining or bulking.

It depends on your calories. For example, a 2,000-calorie balanced 30/40/30 split is about 150 g protein, 200 g carbs and 67 g fat.

Enter your calorie target and AnyTool converts your chosen split into daily grams. As a worked example, 2,000 calories at a balanced 30 % protein / 40 % carbs / 30 % fat gives roughly 150 g protein (600 kcal), 200 g carbs (800 kcal) and 67 g fat (600 kcal). The page also divides those grams into 3, 4 or 5 meals so you can plan your plate.

Nothing is uploaded — it all runs in your browser. It is general guidance, not a personalised nutrition prescription.

AnyTool Macro Calculator computes everything locally in your browser, so your metrics are never sent to a server and the page works offline after first load. The results are general educational guidance based on population averages; individual protein and fat needs vary with training, age, health and goals. For medical conditions, pregnancy, or a history of disordered eating, consult a registered dietitian or clinician.

Detailed Explanation

Methodology

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
Use Cases

Protein-Anchored Mode: A Best-Practice Alternative

Beyond fixed percentages, the calculator offers a protein-anchored mode that mirrors how dietitians and physique coaches actually program macros. Protein is set from grams per kilogram of bodyweight — the evidence-based range is about 1.6–2.2 g/kg for active people preserving or building muscle — fat is set as a percentage of calories (20–35 % supports hormones and satiety), and carbohydrate fills whatever calories remain to fuel training. This reflects the research finding that, at equal calories, most macro splits perform similarly as long as protein and fat minimums are met, so hitting thresholds matters more than any single ratio. If protein and fat together exceed the calorie budget, carbohydrate floors at zero and the page explains the squeeze.

  • Protein from 1.6–2.2 g/kg bodyweight (evidence-based range)
  • Fat set at 20–35 % of calories; carbs fill the remainder
  • Reflects that hitting protein/fat minimums beats any fixed ratio
  • Carbs floor at zero with a clear reason if protein + fat exceed calories
  • A practical alternative to rigid percentage presets
Limitations

General Guidance, Not a Nutrition Prescription

Macro targets here are general educational guidance built on population averages and predictive calorie estimates, which are themselves only accurate to about ±10 %. Individual protein and fat needs vary with training status, age, body composition, health and goals, and there is no universally optimal split — the best one is the one a person can sustain. The calculator frames its numbers as a starting point: track results over 2–3 weeks and adjust. It is not medical or nutritional advice, and the page recommends consulting a registered dietitian or clinician for medical conditions, pregnancy, or a history of disordered eating.

  • Built on calorie estimates accurate to roughly ±10 %
  • Protein and fat needs vary by individual and goal
  • No single optimal split — sustainability matters most
  • Use as a baseline and adjust from tracked results
  • Not medical or nutritional advice
Privacy & Security

Privacy and Offline Use

Because all computation runs in the browser, your calorie target and any body metrics are never sent to a server, there is no account or tracking, and the page works offline after first load. The calculator is built on a shared, unit-tested macro engine (reusing the BMR engine) so its behaviour is consistent and verifiable.

Macros: in-browser (AnyTool) vs typical online macro calculators
CapabilityAnyToolTypical online calculators
ProcessingRuns in your browserOften server-side
Calorie sourceDirect entry or TDEE from metricsUsually metrics only
PresetsBalanced, high-protein, low-carb, keto, Zone, customOften a single split
Protein-anchored modeYes (g/kg + fat %)Rarely offered
Per-meal breakdown3, 4 and 5 mealsFrequently omitted
HonestyStates it is guidance, not a prescriptionRarely noted
Works offlineYes (PWA)No
Cost / signupFree, no signupOften ad-heavy or gated

AnyTool computes every macro split and meal breakdown locally and uploads nothing.