Keto CalculatorKeto Macro Calculator: Fat, Protein & Net Carbs

Get personal ketogenic macros, with protein set from your lean body mass, a net-carb cap of your choice and fat filling the rest. It also gives the electrolyte targets that prevent keto flu, and pharmacist medication warnings.

Manzoor Ahmad

Built & medically reviewed by Manzoor Ahmad, Pharmacist & Calculator Developer · Updated

Built on Mifflin-St Jeor energy needs, the Deurenberg body-fat equation and published ketogenic diet research.

What should my keto macros be?

A standard keto diet is about 70–75% fat, 20–25% protein and 5% carbs. In grams: keep net carbs at 20–50 g a day, eat about 1.4–2.2 g of protein per kg of lean body mass, and fill the rest of your calories with fat. A 143 lb woman dieting on keto might eat 1,700 kcal: 144 g fat, 82 g protein and 20 g net carbs.

Your keto setup

Units
Sex
Height

feet · inches

Goal
Net carb limit
Protein level

grams per kg of lean body mass

Daily keto target
1,700kcal
144 gFat
82 gProtein
20 gNet carbs

Your plate, by calories

Ketosis zone

Deep keto
<20 g
Keto
20–50 g
Low carb
50–100 g
Not keto
>100 g

Daily electrolytes (prevents “keto flu”)

Food guide

Net carbs in common keto foods

Net carbs = total carbs − fibre. Check labels, because brands vary.

FoodServingNet carbsKeto fit
Avocado½ medium (100 g)≈ 2 gExcellent
Eggs2 large≈ 1 gExcellent
Spinach, raw2 cups≈ 0.5 gExcellent
Broccoli, cooked1 cup≈ 6 gGood
Almonds1 oz (28 g)≈ 3 gGood, watch portions
Cheddar cheese1 oz≈ 0.4 gExcellent
Strawberries½ cup≈ 4 gSmall portions
Banana1 medium≈ 24 gAvoid
White rice, cooked1 cup≈ 44 gAvoid
Methodology

How we calculate keto macros

Unlike calculators that use fixed percentages, we build your keto macros in a fixed order: carbs first, then protein, with fat filling the rest. Protein is based on your lean body mass, because fat tissue doesn’t need protein.

Calories = Mifflin-St Jeor TDEE × (1 − 20% to lose / +10% to gain) Net carbs = your limit (20, 30 or 50 g) Protein = lean body mass (kg) × 1.4 / 1.8 / 2.2 g Fat = (calories − protein×4 − carbs×4) ÷ 9 Body fat (if blank) = 1.2×BMI + 0.23×age − 10.8×(male) − 5.4
Worked example

Woman, 30, 5’5″, 143 lb, moderately active, losing fat

  • Estimated body fat: 1.2 × 23.8 + 0.23 × 30 − 5.4 ≈ 30%, so lean mass ≈ 45 kg
  • Calories: 2,125 × 0.8 = 1,700 kcal
  • Net carbs: 20 g (80 kcal)
  • Protein: 45 × 1.8 = 82 g (327 kcal)
  • Fat: (1,700 − 327 − 80) ÷ 9 = 144 g, about 76% of calories
What to expect

Your first 4 weeks on keto

  • Days 1–3: 2–5 lb drops fast. That’s glycogen and water, not fat.
  • Days 2–7: possible “keto flu” (headache, fatigue, cramps). It’s mostly low sodium, so add salt and broth.
  • Week 2: ketones rise. Blood ketones of 0.5–3.0 mmol/L mean you’re in nutritional ketosis.
  • Weeks 3–4: energy and exercise performance usually recover as you adapt to using fat for fuel.
  • Ongoing: fat loss continues at the rate of your calorie deficit, as with any diet.
Pharmacist’s note

Keto is a drug interaction waiting to happen

Cutting carbs this sharply affects several common medicines. Insulin and sulfonylureas can cause hypoglycaemia within days. SGLT2 inhibitors (empagliflozin, dapagliflozin, canagliflozin) carry a risk of ketoacidosis with normal-looking blood sugar, and keto is generally not advised with them. Diuretics and blood-pressure tablets combined with keto’s early fluid loss can cause dizziness and low potassium. People taking lithium need their levels checked, because fluid shifts change them.

Keto is also not suitable during pregnancy or breastfeeding, or for people with pancreatitis, liver failure, gallbladder disease or rare fat-metabolism disorders, unless a specialist is supervising.

Keep going

Related calculators

FAQ

Keto calculator FAQs

Set net carbs at 20–50 g a day. Set protein at about 1.4–2.2 g per kg of lean body mass (roughly 0.6–1.0 g per lb of lean mass). Fill the rest of your calories with fat. For most people that works out at roughly 70–75% fat, 20–25% protein and 5% carbs.

Most people stay in ketosis on 20–50 g of net carbs a day. Starting at 20 g makes ketosis almost certain. Active people and those who are already keto-adapted can often eat 30–50 g and stay in ketosis.

Protein on keto should be moderate to adequate, not low. Aim for about 1.4–2.2 g per kg of lean body mass. Fears that protein will ‘kick you out of ketosis’ are largely overstated at these levels, and enough protein protects muscle.

No. Fat is a ceiling, not a target. If you want to lose fat and you’re full before reaching your fat grams, stop eating. Carbs and protein are the numbers to hit.

Net carbs are total carbohydrates minus fibre, and minus most sugar alcohols such as erythritol. Fibre isn’t digested into glucose, so it doesn’t affect ketosis much. Use our Net Carbs Calculator for labels with mixed sweeteners.

Usually 2–4 days of eating fewer than 20–50 g of net carbs, depending on your activity and metabolism. Full fat adaptation, when energy and performance return to normal, takes about 3–6 weeks.

Keto flu is mostly caused by losing sodium and fluid. Get 3,000–5,000 mg of sodium (salted broth, salting food), drink enough water, eat potassium-rich vegetables and avocado, and consider a magnesium supplement. Symptoms usually pass within a week.

No. Keto isn’t recommended during pregnancy or breastfeeding, or for people with pancreatitis, liver failure, gallbladder disease or certain rare metabolic disorders. Anyone on diabetes medicines (especially SGLT2 inhibitors or insulin) or blood-pressure medicines needs their doctor’s supervision.

Manzoor Ahmad

Manzoor Ahmad

Pharmacist · Supplement & Nutrition Writer (9+ yrs) · Calculator Developer (13+ yrs)

I’m a practising pharmacist and I build DexoCalc’s calculators. I’ve seen keto go wrong when someone starts it without their prescriber knowing they’re on diabetes or blood-pressure medicines. So this calculator sets protein from lean mass, gives electrolyte targets for keto flu, and puts the medication warnings right next to your results.

About the author · LinkedIn

References

  1. Paoli A, et al. Beyond weight loss: a review of the therapeutic uses of very-low-carbohydrate (ketogenic) diets. Eur J Clin Nutr. 2013;67(8):789–796. PubMed
  2. Deurenberg P, et al. Body mass index as a measure of body fatness. Br J Nutr. 1991;65(2):105–114. PubMed
  3. Mifflin MD, et al. Am J Clin Nutr. 1990;51(2):241–247. PubMed
  4. FDA Drug Safety Communication. SGLT2 inhibitors and ketoacidosis.
  5. Masood W, et al. Ketogenic Diet. StatPearls.

Medical disclaimer: Keto macros are educational estimates for healthy adults and are not medical advice. Don’t start a ketogenic diet without medical supervision if you have diabetes, kidney, liver, pancreas or gallbladder disease, are pregnant or breastfeeding, or take prescription medicines.