Calculating ketogenic macro ratios looks deceptively simple until two practical errors distort the plate: misreading dietary fiber across European and American nutrition labels, and overlooking intracellular electrolytes when high-carb staples leave the menu. Because dietary fat supplies 9 kcal per gram while protein and available carbohydrates supply 4 kcal per gram, small shifts in ingredient mass transform a meal’s energy distribution rapidly.
Treating a ketogenic framework strictly as quantitative food composition—rather than guesswork—starts with three verified pillars: classical mass-to-mass ratio math, jurisdiction-aware carbohydrate accounting, and whole-food mineral density for potassium, magnesium, and sodium.
Key Takeaway (BLUF): A culinary ketogenic framework typically targets 70%–80% of energy from fat, 15%–20% from protein, and 5%–10% from available carbohydrates, corresponding to a classical mass ratio of 1.5:1 to 2.0:1 alongside deliberate potassium (≥3,510 mg/day benchmark) and magnesium sourcing.
How Ketogenic Macro Ratios Work: Mass vs. Caloric Percentages
Most meal logs display macronutrients in two completely different currencies: percentage of calories and gram-to-gram mass ratios. Confusing the two leads to inconsistent meal building.
In classical food composition engineering, the Ketogenic Ratio divides total dietary fat mass in grams by the combined mass of protein and available (net) carbohydrates. Because fat carries more than double the energy density of protein or carbohydrate (9 kcal/g vs. 4 kcal/g), a seemingly modest 1.59:1 mass ratio already derives roughly 78% of its total calories from dietary lipids.
Canonical Ketogenic Ratio & Energy Distribution Formulas:
Ketogenic Ratio = Fat (g) ÷ [Protein (g) + Available Net Carbs (g)]Fat Energy % = (Fat g × 9) ÷ [(Fat g × 9) + (Protein g × 4) + (Available Carbs g × 4)] × 100
[Ratio < 1.0:1] ──► Non-Ketogenic (protein + net carbs mass exceeds dietary fat)
[Ratio 1.0–1.49:1] ──► Mild Low-Carb / Culinary Transition (~60%–72% fat kcal)
[Ratio 1.5–2.0:1] ──► Standard Culinary Ketogenic Zone (~75%–82% fat kcal)
[Ratio ≥ 3.0:1] ──► High-Ratio Specialized Formulation (~87%–90% fat kcal)

Test Your Plate Ketogenic Ratio Live
Enter dietary fat (g), protein (g), and available net carbohydrates (g) below to compute both the classical mass ratio and exact calorie percentage breakdown in real time. To browse whole foods tagged for low-carbohydrate composition, open the Ketogenic Reference Food Catalog or review framework ranges on our Ketogenic Dietary Framework Hub.
EU Regulation 1169/2011 vs. US FDA: Stopping the Net Carb Error
When available carbohydrates sit near 20 g to 50 g per day, a 6-gram label miscalculation changes a plate’s macro math substantially. The most frequent bug in generic nutrition trackers is the Double-Subtraction Fallacy—subtracting dietary fiber from European food labels.
Under US FDA 21 CFR § 101.9 (and USDA FoodData Central), Total Carbohydrate is calculated by difference, meaning indigestible fiber remains inside the carbohydrate line item. You subtract fiber once to obtain available net carbohydrates: Available Carbs = max(0, Total Carbs - Fiber).
Under European Regulation (EU) No 1169/2011 (used across Spain, the EU, the UK, and ANSES CIQUAL), the declared Carbohydrate line already represents available, digestible carbohydrates. Dietary fiber appears on a separate, non-indented line. Subtracting fiber from an EU label subtracts it twice—turning 136g of Hass avocado (2.8g EU declared carbs and 9.2g fibre) into a mathematical impossibility of -6.4g.
Unitrition binds the carbohydrate regime (carbRegime: 'eu' | 'us') directly to each food record rather than guessing from user language settings, ensuring deterministic available-carb math on every plate.
Electrolyte Density: Potassium, Magnesium & Sodium Architecture
Shifting away from grains, legumes, potatoes, and sweet fruits removes several high-volume dietary sources of potassium and magnesium. Meanwhile, lower carbohydrate intake is associated in metabolic physiology literature with increased renal natriuresis (excretion of water and sodium), making whole-food electrolyte density a central design priority in ketogenic meal composition (Phinney, 2004).
- Potassium-Rich Low-Carb Greens & Fruits: Leafy greens and botanical fruits like raw baby spinach (557 mg potassium per 100g) and Hass avocado (507 mg potassium per 100g) deliver high potassium alongside minimal available carbohydrates.
- Magnesium-Dense Seeds & Nuts: Roasted pumpkin seeds (557 mg magnesium per 100g scaled from 28g), chia seeds (333 mg magnesium per 100g), raw almonds (271 mg per 100g), and raw English walnuts (161 mg per 100g) rebuild magnesium density without high starch loads.
- Mineral Null-Safety (No Zero-Value Fallacy): Pure extracted fats such as extra-virgin olive oil naturally contain negligible minerals, whereas commercial packaged products often leave potassium or magnesium blank on nutrition panels. Unitrition never turns missing mineral fields into
0.0 mgin mineral balance models, and returnsN/AforK:Naratios whenever sodium is zero.
Practical 437g Ketogenic Reference Plate Walkthrough (1.59:1 Ratio)
Notice how serving weights work in Unitrition: every food scales strictly by its true database serving weight (weight / servingWeight) rather than assuming every item is stored per 100g. In the Keto Avocado & Egg Starter Preset, combining 100g hard-boiled eggs, 80g avocado, 100g baked Atlantic salmon, and 10g olive oil starts at a protein-forward 0.90:1 ratio (67% fat kcal).
Scaling the avocado up to a full 136g fruit, increasing extra-virgin olive oil to 28g, and adding 60g raw spinach plus 28g raw walnuts lifts the plate into a crisp 1.59:1 culinary ketogenic ratio (78% fat, 19% protein, 3% net carbs) while tripling magnesium to 169 mg and delivering 1,659 mg of potassium:

| Ingredient (Portion) | Fat | Protein | Total Carbs | Fiber | Net Carbs | K / Mg / Na (mg) |
|---|---|---|---|---|---|---|
| Extra-Virgin Olive Oil (28g) | 27.0g | 0.0g | 0.0g | 0.0g | 0.0g | 0 / 0 / 0 |
| Hass Avocado (136g) | 21.0g | 3.0g | 12.0g | 9.2g | 2.8g | 690 / 40 / 10 |
| Raw English Walnuts (28g) | 18.5g | 4.3g | 3.9g | 1.9g | 2.0g | 125 / 45 / 1 |
| Hard-Boiled Eggs (100g) | 10.6g | 12.6g | 1.2g | 0.0g | 1.2g | 126 / 10 / 124 |
| Baked Atlantic Salmon (85g) | 8.0g | 25.0g | 0.0g | 0.0g | 0.0g | 384 / 26 / 52 |
| Raw Baby Spinach (60g) | 0.2g | 1.8g | 2.2g | 1.4g | 0.8g | 334 / 48 / 48 |
| Plate Total (437g, 996 kcal) | 85.3g | 46.7g | 19.3g | 12.5g | 6.8g | 1,659 / 169 / 235 |
Notice that the 235 mg sodium total represents intrinsic food sodium only (resulting in an elevated K:Na mass ratio of 7.06 before optional culinary sea salt). You can load the starter template and customize these gram weights inside the Interactive Meal Builder.
Whole-Food Ketogenic Reference Table (Per 100g Database Values)
The reference table below summarizes serving-normalized per-100g composition metrics from Unitrition’s verified USDA FoodData Central and ANSES CIQUAL food entries:
| Whole Food (100g) | USDA FDC ID | Fat | Protein | Net Carbs | Fiber | K / Mg (mg) |
|---|---|---|---|---|---|---|
| Olive Oil, extra-virgin | 171413 | 96.4g | 0.0g | 0.0g | 0.0g | 0 / 0 |
| Walnuts, raw | 170187 | 66.1g | 15.4g | 7.1g | 6.8g | 446 / 161 |
| Almonds, whole raw | 170567 | 50.7g | 21.4g | 9.3g | 12.5g | 743 / 271 |
| Cheddar Cheese, aged | 173414 | 33.6g | 23.9g | 1.8g | 0.0g | 75 / 29 |
| Avocado, Hass raw | 171705 | 15.4g | 2.2g | 2.1g | 6.8g | 507 / 29 |
| Atlantic Salmon, baked | 175168 | 9.4g | 29.4g | 0.0g | 0.0g | 452 / 31 |
| Cauliflower, raw florets | 169986 | 0.3g | 2.0g | 3.0g | 2.0g | 299 / 15 |
| Spinach, raw fresh | 168462 | 0.3g | 3.0g | 1.3g | 2.3g | 557 / 80 |
Scientific & Regulatory References
- Phinney SD. Ketogenic diets and physical performance. Nutrition & Metabolism (London). 2004;1(1):2. DOI: 10.1186/1743-7075-1-2. PMID: 15507148. PubMed PMID 15507148.
- Feng S, et al. Effects of carbohydrate-restricted diets and macronutrient replacements on cardiovascular health and body composition in adults: a meta-analysis of randomized trials. American Journal of Clinical Nutrition. 2025;122(5). DOI: 10.1016/j.ajcnut.2025.09.012. PMID: 40935153. PubMed PMID 40935153.
- Lovegrove JA, et al. Importance of dietary fibre, strategies for increasing intake and maintenance of the supply chain in the UK. Philosophical Transactions of the Royal Society B. 2025;380. DOI: 10.1098/rstb.2024.0148. PMID: 40963353. PubMed PMID 40963353.
- European Parliament and Council. Regulation (EU) No 1169/2011 on the provision of food information to consumers. Official Journal of the European Union, 2011. EUR-Lex Official Text.
- U.S. Food and Drug Administration (FDA). 21 CFR § 101.9 — Nutrition labeling of food & USDA FoodData Central. USDA FoodData Central.
Frequently Asked Questions
What is the difference between a 1.5:1 ketogenic macro ratio and 75% fat calories?
A 1.5:1 ketogenic macro ratio compares mass in grams—1.5 grams of fat for every 1 gram of combined protein plus net carbs. Because fat provides 9 kcal/g compared to 4 kcal/g for protein and carbohydrates, a 1.5:1 to 1.6:1 mass ratio translates to roughly 77%–78% of total calories from fat.
Should I subtract dietary fiber to calculate ketogenic net carbs in Europe?
No. On food labels governed by European Regulation (EU) 1169/2011, declared carbohydrates already represent available carbohydrates with fiber excluded. Subtracting fiber again causes double-subtraction errors. Only subtract dietary fiber from Total Carbohydrates on US FDA 21 CFR § 101.9 or USDA FoodData Central entries.
Which low-carbohydrate whole foods provide the highest potassium and magnesium density?
Raw spinach (557 mg potassium and 80 mg magnesium per 100g) and Hass avocado (507 mg potassium per 100g) lead low-carb produce, while roasted pumpkin seeds (557 mg magnesium per 100g), chia seeds (333 mg/100g), and raw almonds (271 mg/100g) supply concentrated magnesium.
Why do some packaged keto products show incomplete mineral or K:Na ratio data?
Many commercial barcode entries omit potassium, magnesium, or phosphorus. Rather than falsely imputing 0.0 mg (the Zero-Value Fallacy), Unitrition flags missing mineral fields with an uncertainty indicator and displays N/A for ratios when sodium is zero.

