0–100Every food scoredScore a meal

Electrolyte Calculator

⚡

Electrolyte Balance Calculator

Sodium, potassium & magnesium optimizer

Quick Answer

Electrolytes (sodium, potassium, magnesium) regulate hydration, muscle function, and nerve signals. Keto dieters need 2-3x more sodium to prevent keto flu.

Keto targets: 5,000mg sodium | 4,700mg potassium | 500mg magnesium

Electrolyte FAQ

What are symptoms of electrolyte imbalance?

Symptoms: muscle cramps/spasms, extreme fatigue, headaches, nausea, dizziness, irregular heartbeat, confusion, weakness. Severe imbalance (rare): seizures, heart arrhythmia, death. Most common causes: keto diet, fasting, intense exercise, vomiting/diarrhea, diuretic medications. Fix: drink electrolyte drinks (Gatorade, Pedialyte, LMNT).

How do I fix keto flu?

Keto flu = electrolyte depletion (especially sodium). Fix in 24-48 hours: 1) Drink bone broth (1,000mg sodium per cup), 2) Salt your food heavily (5,000mg sodium/day on keto), 3) Take magnesium 400mg before bed, 4) Eat avocados (potassium), 5) Drink pickle juice (instant sodium boost). Keto flu is 100% preventable with proper electrolytes.

What are the 3 main electrolytes?

Sodium: Regulates hydration, blood pressure, nerve signals. Need: 2,300mg (5,000mg on keto). Potassium: Controls muscle contractions, heartbeat. Need: 3,500mg. Magnesium: Regulates 300+ enzyme reactions, sleep, muscle function. Need: 400mg. Calcium and chloride are also important but less commonly deficient.

Should I drink electrolytes while fasting?

YES! Fasting (especially 16:8+) depletes sodium, potassium, magnesium via increased urination. Symptoms: headaches, fatigue, muscle cramps. Solution: drink 'snake juice' (water + 1/2 tsp pink salt + 1/4 tsp potassium chloride). Zero-calorie electrolyte drinks DON'T break your fast. Avoid: Gatorade (has sugar/calories).

Can you drink too much electrolyte water?

YES! Excess sodium (>6,000mg/day long-term) raises blood pressure, causes bloating, strains kidneys. Excess potassium (dangerous): irregular heartbeat, heart attack risk (rare except with supplements >3,000mg). Excess magnesium: diarrhea. Safe: 1-2 electrolyte drinks/day. Water is best for general hydration.

What foods are high in potassium?

Top potassium foods (mg per serving): Baked potato with skin (926mg), White beans (1,189mg), Spinach cooked (839mg), Avocado (690mg), Banana (422mg), Salmon (534mg), Coconut water (600mg). You need 3,500-4,700mg daily. Most people only get 2,500mg — supplement with potassium chloride or eat 2-3 servings above daily.

How do I get 5,000mg sodium on keto?

Keto requires 5,000mg sodium/day (vs 2,300mg standard diet). How to get it: 1) Salt all food liberally (1 tsp salt = 2,300mg), 2) Drink 2 cups bone broth daily (2,000mg), 3) Drink pickle juice (1,500mg per cup), 4) Add 1/2 tsp pink salt to water 2x daily. Don't fear salt on keto — low sodium causes keto flu.

What is the best electrolyte supplement?

Best brands: LMNT (1,000mg sodium, zero sugar, keto-friendly), Pedialyte (medical-grade, for illness/hangovers), Liquid IV (high sodium, tastes good), Nuun (low-calorie, for workouts). Avoid: Gatorade (too much sugar, too little electrolytes). DIY: Mix 1/2 tsp salt + 1/4 tsp potassium chloride (NoSalt) in water = free electrolyte drink.

Key Electrolytes and Their Roles: Sodium, Potassium, Magnesium, Calcium

Electrolytes are minerals that carry an electric charge when dissolved in bodily fluids. They regulate hydration, muscle contractions, nerve signals, blood pH, and heartbeat. The four key electrolytes, their roles, and daily targets from the Institute of Medicine (IOM) and National Institutes of Health (NIH):

MineralRoleDaily TargetSigns of LowSigns of High
SodiumFluid balance, blood pressure, nerve signals2,300 mg (5,000 mg keto)Cramps, fatigue, headache, nauseaHigh blood pressure, bloating
PotassiumMuscle contractions, heartbeat, nerve function3,500-4,700 mgWeakness, cramps, irregular heartbeatIrregular heartbeat (rare from food)
Magnesium300+ enzyme reactions, sleep, muscle function400 mgCramps, insomnia, fatigue, anxietyDiarrhea (from supplements)
CalciumBone health, muscle contraction, blood clotting1,000 mgTingling, muscle spasms, weak bonesKidney stones (long-term excess)

Most people get enough calcium and chloride from a standard diet. The most common deficiencies are sodium (on keto or fasting), potassium (in processed-food-heavy diets), and magnesium (in most adults).

Imbalance Signs: Too High vs Too Low

Electrolyte imbalance can go in either direction. Here are the medical terms and symptoms for each electrolyte:

ElectrolyteToo LowToo High
SodiumHyponatremia: headache, nausea, confusion, crampsHypernatremia: thirst, high blood pressure, swelling
PotassiumHypokalemia: weakness, cramps, irregular heartbeatHyperkalemia: dangerous irregular heartbeat (from supplements)
MagnesiumHypomagnesemia: cramps, insomnia, fatigue, anxietyHypermagnesemia: diarrhea, low blood pressure (rare)
CalciumHypocalcemia: tingling, spasms, brittle nailsHypercalcemia: kidney stones, constipation, fatigue

Important: Severe electrolyte imbalance is a medical emergency. If you experience chest pain, fainting, confusion, or seizures, seek immediate medical attention. The calculator above flags possible imbalance based on symptoms but does not diagnose. This is not medical advice — talk to your doctor.

Common Causes of Electrolyte Imbalance

Electrolyte depletion happens through sweat, urine, and digestion. Here are the most common causes and which electrolytes they deplete:

CauseElectrolytes LostNotes
Heavy sweating (exercise, heat)Sodium, potassium, chlorideReplace with electrolyte drink after 60+ min sessions
Keto or low-carb dietSodium (primary), potassium, magnesiumKidneys excrete more sodium when insulin drops
Fasting (16:8 or longer)Sodium, potassium, magnesiumIncreased urination depletes electrolytes
Vomiting or diarrheaSodium, potassium, chlorideUse oral rehydration solution for rapid replacement
Diuretic medicationsPotassium, magnesiumMonitor with your doctor if on diuretics
Inadequate diet (processed foods)Potassium, magnesiumWhole foods are the best source

Keto and fasting diets are the most common cause of electrolyte symptoms in otherwise healthy people. When insulin drops on a low-carb diet, the kidneys excrete sodium and water rapidly, which is why keto flu occurs in the first 1 to 2 weeks.

How the Assessment Works

The calculator estimates your daily electrolyte targets and flags possible imbalance based on three inputs:

Base targets (IOM/NIH):

Sodium: 2,300 mg · Potassium: 3,500 mg · Magnesium: 400 mg

Diet adjustment:

Keto: sodium → 5,000 mg, potassium → 4,700 mg, magnesium → 500 mg

Fasting: sodium → 4,000 mg (other targets unchanged)

Activity multiplier:

Low: ×1.0 · Moderate: ×1.2 · High: ×1.5

Symptom scoring:

0 symptoms = Likely Balanced · 1-2 = Possible Imbalance · 3+ = Likely Imbalanced

The symptom score is a screening tool, not a diagnosis. It helps you decide whether to focus on replenishment or seek medical evaluation. The electrolyte targets are estimates based on population guidelines and may not reflect your individual needs.

Replenishment Guidance: Food-First Table

The best way to replenish electrolytes is through food. Here are the highest single-food sources for each electrolyte (values from USDA FoodData Central):

ElectrolyteFoodAmountNotes
Sodium1 tsp table salt2,300 mgCheapest, most reliable source
Sodium1 cup bone broth~1,000 mgKeto-friendly, also provides minerals
Potassium1 medium potato with skin926 mgMore potassium than a banana
Potassium1 cup white beans1,189 mgHighest single-food source
Potassium1 avocado690 mgAlso provides healthy fats
Magnesium1 oz pumpkin seeds156 mgHighest single-food magnesium source
Magnesium1 oz almonds80 mgConvenient snack
Magnesium1 cup cooked spinach78 mgLow-calorie, nutrient-dense
Calcium1 cup milk300 mgStandard dietary source
Calcium3 oz sardines with bones325 mgAlso provides omega-3s

A potato with skin has more potassium than a banana. Pumpkin seeds are the highest magnesium source. For keto dieters, bone broth and salt are the most practical sodium sources. Food-first is safer than supplements because the body absorbs electrolytes more gradually from food.

When to Seek Medical Care

Most mild electrolyte imbalances resolve with food and fluids. However, seek immediate medical attention if you experience:

  • Chest pain or pressure
  • Fainting or loss of consciousness
  • Confusion, disorientation, or seizures
  • Severe or persistent vomiting and diarrhea (risk of rapid depletion)
  • Irregular heartbeat that does not resolve
  • Muscle weakness that prevents standing or walking

Disclaimer: This electrolyte balance calculator provides estimates for educational purposes only based on IOM and NIH guidelines. It does not diagnose electrolyte imbalance or any medical condition. If you have kidney disease, heart disease, high blood pressure, diabetes, or take diuretics or blood pressure medications, consult your healthcare provider before changing electrolyte intake. This is not medical advice — talk to your doctor.

Worked Example: Full Electrolyte Assessment

Here is a complete walkthrough for a 165 lb person on a keto diet with moderate activity and 2 symptoms (cramps and fatigue):

Step 1 — Base targets (keto):

Sodium: 5,000 mg · Potassium: 4,700 mg · Magnesium: 500 mg

Step 2 — Apply activity multiplier (moderate = 1.2):

Sodium: 5,000 × 1.2 = 6,000 mg

Potassium: 4,700 × 1.2 = 5,640 mg

Magnesium: 500 × 1.2 = 600 mg

Step 3 — Symptom score (2 symptoms):

Status: Possible Imbalance

Step 4 — Replenishment plan:

• 2 cups bone broth (2,000 mg sodium)

• 1 tsp salt on food (2,300 mg sodium)

• 1 avocado (690 mg potassium) + 1 potato (926 mg potassium)

• 1 oz pumpkin seeds (156 mg magnesium) + 1 cup spinach (78 mg magnesium)

This person needs roughly 6,000 mg sodium, 5,640 mg potassium, and 600 mg magnesium daily. The food plan above provides most of those targets. The 2 symptoms suggest possible imbalance — the replenishment plan should resolve them within 1 to 2 days. If symptoms persist, consult a doctor.

How to Use This Calculator & What to Do With Your Result

How to use it:

  1. Enter your body weight in pounds.
  2. Select your diet type (standard, keto, or fasting).
  3. Choose your activity level (low, moderate, or high).
  4. Check any imbalance symptoms you are currently experiencing.
  5. Click "Calculate Electrolyte Needs" to get your targets and status.

What to do with your result:

  • If status is "Likely Balanced," maintain your current intake and diet.
  • If "Possible Imbalance," increase electrolyte-rich foods (see the food-first table) and monitor symptoms for 1 to 2 days.
  • If "Likely Imbalanced," add an electrolyte drink (LMNT, Pedialyte, or DIY salt + potassium chloride in water) and consult a doctor if symptoms are severe.
  • For keto dieters, prioritize sodium — 5,000 mg daily is the single most important target.
  • Track your fluid intake alongside electrolytes (use the Water Intake Calculator).
  • If symptoms persist beyond 2 to 3 days despite replenishment, seek medical evaluation.

Electrolyte Balance Calculator FAQs

Related Calculators & Free Tools