UTILS.
Private by default
🍗

Macro & Keto Calculator

Split daily calories into grams of protein, carbs and fat from a ratio preset, or build a keto plan from your body stats with a net-carb cap.

Your files stay on this device

Files are processed in your browser, never uploaded. The site downloads code and assets to run the tools. No accounts or trackers.

Use Download to save this tool as one HTML file for offline use.

Privacy →

About this tool

Choose a method. With a calorie target and ratio preset, enter your daily calories and pick a balanced, low-carb, high-protein or keto ratio to see how many grams of protein, carbohydrate and fat to eat, plus the calories each provides.

Keto from body stats builds a ketogenic plan instead. It estimates your basal metabolic rate with the Mifflin-St Jeor equation, scales it by your activity level, applies your deficit or surplus goal, then keeps net carbs at your cap (typically 20–50 g), sets protein from lean body mass (about 1.76 g per kg of lean mass, i.e. 0.8 g per lb) and gives all remaining calories to fat. It needs a body-fat percentage; an estimate from a scale, calipers or a visual chart is fine.

Everything is computed live in your browser. The results are estimates for information only — not medical advice.

Frequently asked questions

How are grams derived from calories?
Each ratio splits your total calories, then the calories per macro are divided by 4 kcal per gram for protein and carbs and 9 kcal per gram for fat.
Which preset should I pick?
Balanced is 30/40/30, low-carb shifts energy to protein and fat, high-protein favours protein, and keto keeps carbs very low — pick the one matching your plan.
Why does fat get the leftover calories?
On keto, carbs are capped and protein is fixed by lean mass, so fat is the adjustable energy lever — the calculator converts whatever calories remain after protein (4 kcal/g) and carbs (4 kcal/g) into grams of fat at 9 kcal/g.
What are net carbs?
Net carbs are total carbohydrates minus fiber (and most sugar alcohols); most ketogenic plans cap them around 20–50 g per day to maintain ketosis, and you can set any cap up to 100 g here.

More tools