The ketogenic diet has a specific metabolic mechanism behind it, not just a general instruction to eat fewer carbs. Understanding the biochemistry — and the math — makes the difference between a diet that works and one that stalls after two weeks. The numbers are more precise than most people realize.
How Keto Works: The 20g Carb Threshold
Under normal conditions, your body runs on glucose derived from dietary carbohydrates. When carbohydrate intake drops below roughly 20–50 grams of net carbs per day, liver glycogen becomes depleted within 24–48 hours. At that point, the liver begins converting fatty acids into ketone bodies — acetoacetate, beta-hydroxybutyrate, and acetone — which serve as an alternative fuel for the brain and muscles.
This metabolic state is called nutritional ketosis. Blood ketone levels in ketosis typically measure 0.5–3.0 mmol/L, compared to under 0.1 mmol/L in a standard carbohydrate-fed state.
The 20g figure is conservative and works for most people. Some individuals can maintain ketosis at 30–50g net carbs, particularly those who are physically active. However, 20g is the safe starting point because it reliably induces ketosis across a wide range of metabolic backgrounds.
Net Carbs = Total Carbohydrates − Dietary Fiber − Sugar Alcohols
Standard Keto Macro Split: 70/25/5
The classic ketogenic macro ratio divides daily calories as follows:
| Macro | % of Calories | Calories per gram |
|---|---|---|
| Fat | 70–75% | 9 cal/g |
| Protein | 20–25% | 4 cal/g |
| Carbs | 5–10% | 4 cal/g |
The high fat percentage often surprises people. It's not about eating unlimited fat for its own sake — it's that when carbohydrates are nearly eliminated, fat must replace them as the primary caloric fuel. Protein is moderate, not high, because excess protein can be converted to glucose through gluconeogenesis, potentially disrupting ketosis.
A common mistake is treating keto as a high-protein diet. Protein should be sufficient to preserve muscle mass (roughly 1.2–1.6g per kg of lean body mass) but not excessive.
Calculating Your Personal Keto Macros
The calculation starts with your Total Daily Energy Expenditure (TDEE), then applies the macro ratios.
Step 1: Estimate TDEE
Use the Mifflin-St Jeor equation for Basal Metabolic Rate (BMR):
Men: BMR = (10 × weight kg) + (6.25 × height cm) − (5 × age) + 5
Women: BMR = (10 × weight kg) + (6.25 × height cm) − (5 × age) − 161
Multiply BMR by activity factor: sedentary (1.2), lightly active (1.375), moderately active (1.55), very active (1.725).
Step 2: Apply macro ratios
Example: a 35-year-old woman, 68kg, 165cm, moderately active. TDEE ≈ 2,100 calories.
For weight loss, apply a 20% deficit: 2,100 × 0.80 = 1,680 calories/day target.
Fat: 1,680 × 0.72 = 1,210 cal ÷ 9 = 134g fat/day
Protein: 1,680 × 0.23 = 386 cal ÷ 4 = 97g protein/day
Carbs: 1,680 × 0.05 = 84 cal ÷ 4 = 21g carbs/day
This 21g carb ceiling keeps her solidly in ketosis while protein is sufficient to preserve muscle at 1.4g/kg lean body mass (assuming 25% body fat, lean mass ≈ 51kg → 51 × 1.4 = 71g minimum protein).
Net Carbs vs Total Carbs
Keto tracks net carbs, not total carbs. The distinction matters significantly for food choices.
Net Carbs = Total Carbs − Fiber − Sugar Alcohols
Dietary fiber cannot be digested and does not raise blood glucose. Sugar alcohols (erythritol, xylitol, sorbitol) have partial or negligible impact depending on type. Erythritol is typically subtracted entirely; sorbitol is not.
A 100g serving of avocado has 9g total carbs, but 7g is fiber:
Net Carbs = 9 − 7 = 2g net carbs
This makes avocado a keto staple despite its apparent carbohydrate content.
Common Foods and Their Net Carbs
| Food (100g serving) | Total Carbs | Fiber | Net Carbs | Keto-Friendly? |
|---|---|---|---|---|
| Spinach (raw) | 3.6g | 2.2g | 1.4g | Yes |
| Avocado | 8.5g | 6.7g | 1.8g | Yes |
| Broccoli | 7.0g | 2.6g | 4.4g | Yes (moderate) |
| Almonds | 21.6g | 12.5g | 9.1g | Yes (portion control) |
| Raspberries | 11.9g | 6.5g | 5.4g | Yes (small serving) |
| Blueberries | 14.5g | 2.4g | 12.1g | Limit carefully |
| White bread (1 slice) | 28g | 1.2g | 26.8g | No (entire day's carbs) |
| White rice (cooked) | 28g | 0.4g | 27.6g | No |
| Pasta (cooked) | 31g | 1.8g | 29.2g | No |
| Apple (medium) | 25g | 4.4g | 20.6g | No (entire day's carbs) |
| Banana (medium) | 27g | 3.1g | 23.9g | No |
A single medium apple consumes essentially the entire daily carb budget. This is why fruit — often considered health food — must be dramatically limited or eliminated on keto. Berries are the exception because of their high fiber-to-sugar ratio.
Keto Adaptation Timeline: What to Expect
The transition to ketosis follows a predictable physiological timeline that most people experience in similar stages.
| Timeline | What's Happening | Common Symptoms |
|---|---|---|
| Days 1–3 | Glycogen depletion; body burning stored glucose | Normal energy, possible carb cravings |
| Days 4–7 | Glycogen depleted; ketone production beginning | "Keto flu": headache, fatigue, brain fog |
| Weeks 1–2 | Electrolyte loss accelerates as insulin drops | Muscle cramps, lethargy, poor sleep |
| Weeks 2–4 | Ketone production stable; body adapting | Improving energy, reduced appetite |
| Week 4+ | Fat-adapted; efficient ketone use | Stable energy, mental clarity, satiety |
The "keto flu" occurs because insulin levels fall sharply as carbs are eliminated. Lower insulin signals the kidneys to excrete sodium, which takes potassium and magnesium with it. The symptoms are almost entirely explained by electrolyte loss, not ketosis itself.
Mitigation strategy:
Sodium: 2,000–4,000mg/day (salt food liberally, use bouillon)
Potassium: 3,500–4,700mg/day (avocado, leafy greens, salt substitute)
Magnesium: 300–500mg/day (supplement with magnesium glycinate)
By week 4–6, fat adaptation is typically complete. Fat-adapted athletes often report more stable energy during endurance activity, less reliance on mid-workout fueling, and a blunted hunger response compared to their carbohydrate-fueled baseline. The adaptation period is real, measurable, and temporary — the math and the biology both point the same direction if you stay consistent through the first month.