Free Keto Tool

Keto Electrolyte Calculator

Get personalized daily sodium, potassium, and magnesium targets for your ketogenic diet. This free electrolyte calculator accounts for your keto phase, activity level, sweat level, and current symptoms — so your targets actually fit your life, not a generic recommendation. No signup required.

Body weight

lbs

Keto phase

Activity level

Sweat level

Current symptoms (optional)

Select any symptoms you are currently experiencing

Do you drink coffee?

How to use this calculator

01

Enter your weight and keto phase

Tell us your body weight and whether you are still adapting (first 4 weeks) or fat-adapted (1+ month on keto).

02

Select activity and sweat level

Your activity level and how much you sweat significantly affects how much sodium and potassium you lose each day.

03

Add symptoms (optional)

If you are experiencing keto flu symptoms, select them. Your targets will be adjusted upward to address the specific deficiency indicated.

Related calculators

Why electrolytes are critical on a ketogenic diet

Electrolyte management is not optional on a ketogenic diet — it is the difference between a smooth transition and a miserable first week. When carbohydrate intake drops, insulin levels fall sharply. Under normal conditions, insulin signals the kidneys to reabsorb sodium from the filtrate before it exits as urine. Without that insulin signal, the kidneys excrete sodium at a dramatically higher rate — often two to three times normal urinary sodium losses.

Sodium is an osmotic driver of fluid balance. When sodium is excreted, water follows. And sodium is the primary electrolyte — when it depletes rapidly, potassium and magnesium losses increase through coupled mechanisms. The result is a rapid, multi-electrolyte deficiency that produces every classic keto flu symptom: headache (from reduced blood volume and sodium), muscle cramps (magnesium and potassium depletion), fatigue (sodium and magnesium), heart palpitations (potassium), and dizziness (blood pressure drop from fluid loss).

The critical insight is that none of this is inevitable. Most people who experience severe keto flu simply did not replace electrolytes proactively. The same transition, with appropriate sodium, potassium, and magnesium intake from day one, is typically symptom-free or nearly so. This calculator generates personalized targets that account for your individual circumstances — not a one-size-fits-all recommendation.

Sodium, potassium, and magnesium on keto — what you need to know

Sodium: the foundation

Sodium is the most important electrolyte to address on keto and the one most people underestimate. Standard dietary guidelines recommend 2,300mg per day for carb-eating adults. On keto, that recommendation is too low — most adapting ketoers need 3,000–5,000mg per day just to maintain normal blood volume and prevent symptoms. The simplest approach: salt all food generously. A teaspoon of table salt provides approximately 2,300mg sodium. Drinking 1–2 cups of bone broth daily adds another 800–1,800mg. Eating cured meats, olives, and pickles provides additional sodium in flavorful forms.

Potassium: food first

Potassium needs on keto are typically 2,000–3,500mg per day. The challenge is that high-dose potassium supplements are restricted to 99mg per pill in the US due to cardiac risks of excessive supplementation — making food sources essential rather than optional. The best keto-compatible potassium sources are avocados (975mg each), salmon (800mg per serving), spinach (840mg per cooked cup), mushrooms (555mg per cup), and broccoli (450mg per cup). Two avocados per day, combined with leafy greens and some fatty fish, can cover potassium targets without any supplementation. If you are experiencing muscle cramps or heart palpitations, potassium is the primary electrolyte to investigate.

Magnesium: the silent deficiency

Magnesium is widely deficient even in people eating a standard diet — studies estimate 48% of Americans do not meet the RDA from food alone. On keto, the challenge is compounded by urinary losses from reduced insulin. The best food sources are dark chocolate (85%+, 64mg per ounce), pumpkin seeds (150mg per ounce), spinach (157mg per cooked cup), almonds (80mg per ounce), and Brazil nuts. For most people, a 200–400mg magnesium glycinate supplement taken before bed is the most practical solution — magnesium glycinate is well absorbed, does not cause digestive issues at moderate doses, and can improve sleep quality as a secondary benefit. Muscle cramps that persist despite adequate sodium and potassium typically indicate magnesium deficiency.

When to use electrolyte supplements

Food should be the foundation for all three electrolytes. But there are circumstances where supplementation makes more practical sense: heavy exercisers and endurance athletes lose sodium at rates that are difficult to replace through food alone without eating excessively salty meals; people in hot climates or physical jobs may similarly need supplemental sodium and potassium; and magnesium from food sources is generally insufficient for people on keto. An electrolyte supplement without sugar or maltodextrin — such as LMNT, Precision Hydration, or Nuun Sport (sugar-free) — fills these gaps efficiently. When evaluating any electrolyte product, check the sodium, potassium, and magnesium content per serving against your targets from this calculator.

Keto flu symptoms and what they tell you

Different keto flu symptoms point to different electrolyte deficiencies, which is why this calculator adjusts targets based on symptoms selected. Understanding the mechanism helps you troubleshoot:

  • Headaches primarily indicate low sodium and reduced blood volume. The brain is exquisitely sensitive to blood pressure changes. Drinking a cup of bone broth or adding a pinch of salt to water often provides relief within 20–30 minutes — faster than any medication.
  • Muscle cramps indicate magnesium deficiency (most commonly) or potassium deficiency. Nighttime calf cramps that wake you up are the classic presentation of magnesium deficiency on keto. Magnesium glycinate at 300–400mg before bed resolves this in most people within 1–2 nights.
  • Heart palpitations are the symptom that most alarms people and that most reliably indicates potassium deficiency. The heart is a muscle with very precise potassium requirements for proper electrical conduction. Eating an avocado and salting food more aggressively typically resolves palpitations within hours.
  • Fatigue and brain fog early in the keto transition are normal — they reflect the brain learning to use ketones, which takes several days. Persistent fatigue beyond day 5–7 usually indicates inadequate sodium or magnesium, or caloric intake that is too low.
  • Dizziness and lightheadedness — particularly on standing up quickly — indicates low blood pressure from sodium and fluid depletion. This is the most direct manifestation of the kidneys' sodium-wasting response.

Electrolyte needs change as you fat-adapt

The acute electrolyte depletion of the first 2–4 weeks on keto is the most demanding period. During adaptation, the body is rapidly excreting sodium while simultaneously building new enzymatic machinery for ketone metabolism. Once fat adaptation is complete — typically 4–8 weeks in — sodium needs stabilize at a lower level, though still above standard dietary recommendations.

Fat-adapted keto dieters typically find that their electrolyte needs become easier to meet through food alone, with less reliance on broth or supplements. Sodium needs drop from 3,000–5,000mg to closer to 2,000–3,500mg per day. Potassium and magnesium targets also decrease modestly. The kidneys become more efficient at electrolyte retention as the body acclimates to the low-insulin state.

This calculator distinguishes between adapting and fat-adapted targets precisely because the difference is clinically meaningful. Using adapting-phase targets indefinitely means over-supplementing, which is generally unnecessary but can become uncomfortable. Using fat-adapted targets during the adaptation phase means under-supplementing and risking keto flu. Select your phase accurately for the most useful targets.

Frequently asked questions

Medical Disclaimer: This calculator provides estimates for informational purposes only and does not constitute medical or nutritional advice. Results may vary based on individual factors. Consult a registered dietitian or qualified healthcare provider before making significant dietary changes, particularly if you have a medical condition, are pregnant or breastfeeding, or take prescription medications.