A ketogenic diet keeps carbohydrates low enough – usually 20–50 g of net carbs a day – that the body shifts to burning fat and producing ketones. Protein is set moderately, from lean mass, so it does not interfere with ketosis.
How to use the Keto Calculator
- Sex
- Age
- Weight
- Height
- Body fat
- Activity level
- Net carbs
- Protein ratio
- Calorie deficit
Results update as you type, and every field accepts the units shown in its menu.
How it works
Enter your details, body fat, activity, net-carb limit, protein ratio and deficit. The calculator works out your TDEE, target calories and each macro in grams and as a percentage of calories.
Inputs explained
| Field | What to enter |
|---|---|
| Sex | Choose one: Male, Female |
| Age | In years |
| Weight | Units: kg, lb, st, g |
| Height | Units: cm, in, m, ft, mm |
| Body fat | In % |
| Activity level | Choose one: Basal metabolic rate (no activity), Sedentary – little or no exercise, Light – exercise 1–3 times a week, Moderate – exercise 4–5 times a week … |
| Net carbs | In g/day |
| Protein ratio | In g per kg lean mass |
| Calorie deficit | In % |
What each result means
- Lean body mass = [Weight]×(1 – [Body fat]÷100)
- TDEE = (370 + 21.6×[Lean body mass])×[Activity level]
- Target calories = [TDEE]×(1 – [Calorie deficit]÷100)
- Protein = [Lean body mass]×[Protein ratio]
- Fat = max(([Target calories] – [Net carbs]×4 – [Protein]×4)÷9, 0)
- Fat share of calories = [Fat]×9÷[Target calories]×100
- Protein share = [Protein]×4÷[Target calories]×100
- Carb share = [Net carbs]×4÷[Target calories]×100
Example values
How the main result changes when Age changes and everything else stays at the example values above:
| Age (years) | Target calories (kcal/day) |
|---|---|
| 15 | 1,852 |
| 22.5 | 1,852 |
| 30 | 1,852 |
| 37.5 | 1,852 |
| 45 | 1,852 |
| 60 | 1,852 |
Health note: this calculator is for education and screening only and is not a diagnosis or treatment advice. Discuss your results with a qualified clinician.
Formula
Lean mass = weight × (1 − body fat %)
Target kcal = TDEE × (1 − deficit %)
Protein g = lean mass × protein g/kg
Fat g = (target − net carbs × 4 − protein × 4) ÷ 9
Worked example
Inputs — Sex: Male; Age: 30 years; Weight: 75 kg; Height: 178 cm; Body fat: 25 %; Activity level: Light – exercise 1–3 times a week; Net carbs: 25 g/day; Protein ratio: 1.6 g per kg lean mass; Calorie deficit: 15 %.
Results — Lean body mass = 56.3 kg; TDEE = 2,179 kcal/day; Target calories = 1,852 kcal/day; Protein = 90 g/day; Net carbs = 25 g/day; Fat = 155 g/day; Fat share of calories = 75 %; Protein share = 19 %; Carb share = 5 %.
Key terms
- Net carbs
- Total carbohydrate minus fibre (and sugar alcohols).
- Ketosis
- A state where the body uses fat-derived ketones for fuel.
Frequently asked questions
How many carbs can I eat on keto?
Usually 20–50 g of net carbs a day; 20–25 g is the most reliable for ketosis.
Does too much protein kick you out of ketosis?
Moderate protein (about 1.2–2.0 g/kg of lean mass) is fine for most people.
Is keto safe?
Many people do well on it short term; people with diabetes on medication, kidney disease or pregnancy should get medical advice first.
Sources
- Mifflin MD et al. A new predictive equation for resting energy expenditure in healthy individuals. Am J Clin Nutr, 1990
- Roza AM, Shizgal HM. The Harris Benedict equation reevaluated. Am J Clin Nutr, 1984
- McArdle WD, Katch FI, Katch VL. Exercise Physiology: Nutrition, Energy and Human Performance
- Masood W et al. Ketogenic diet. StatPearls, 2023