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.
Get a Personalized Plan
Tell our AI your goal — get a custom diet & macro plan in 60 seconds.
Upgrade to Premium
$9.99/month. Unlimited scans, food diary, meal plans. Cancel anytime.
No medical advice. For informational purposes only.
Scan Food, Get Instant Calories
Photo → Nutrition facts in 3 seconds. No typing, no guessing.
🧮 All 37 Free Calculators
See All →Top Features
📱 Free Mobile App
All 37 calculators + AI food scanner in one app
🧮 All 37 Free Health Calculators
See All →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):
| Mineral | Role | Daily Target | Signs of Low | Signs of High |
|---|---|---|---|---|
| Sodium | Fluid balance, blood pressure, nerve signals | 2,300 mg (5,000 mg keto) | Cramps, fatigue, headache, nausea | High blood pressure, bloating |
| Potassium | Muscle contractions, heartbeat, nerve function | 3,500-4,700 mg | Weakness, cramps, irregular heartbeat | Irregular heartbeat (rare from food) |
| Magnesium | 300+ enzyme reactions, sleep, muscle function | 400 mg | Cramps, insomnia, fatigue, anxiety | Diarrhea (from supplements) |
| Calcium | Bone health, muscle contraction, blood clotting | 1,000 mg | Tingling, muscle spasms, weak bones | Kidney 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:
| Electrolyte | Too Low | Too High |
|---|---|---|
| Sodium | Hyponatremia: headache, nausea, confusion, cramps | Hypernatremia: thirst, high blood pressure, swelling |
| Potassium | Hypokalemia: weakness, cramps, irregular heartbeat | Hyperkalemia: dangerous irregular heartbeat (from supplements) |
| Magnesium | Hypomagnesemia: cramps, insomnia, fatigue, anxiety | Hypermagnesemia: diarrhea, low blood pressure (rare) |
| Calcium | Hypocalcemia: tingling, spasms, brittle nails | Hypercalcemia: 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:
| Cause | Electrolytes Lost | Notes |
|---|---|---|
| Heavy sweating (exercise, heat) | Sodium, potassium, chloride | Replace with electrolyte drink after 60+ min sessions |
| Keto or low-carb diet | Sodium (primary), potassium, magnesium | Kidneys excrete more sodium when insulin drops |
| Fasting (16:8 or longer) | Sodium, potassium, magnesium | Increased urination depletes electrolytes |
| Vomiting or diarrhea | Sodium, potassium, chloride | Use oral rehydration solution for rapid replacement |
| Diuretic medications | Potassium, magnesium | Monitor with your doctor if on diuretics |
| Inadequate diet (processed foods) | Potassium, magnesium | Whole 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):
| Electrolyte | Food | Amount | Notes |
|---|---|---|---|
| Sodium | 1 tsp table salt | 2,300 mg | Cheapest, most reliable source |
| Sodium | 1 cup bone broth | ~1,000 mg | Keto-friendly, also provides minerals |
| Potassium | 1 medium potato with skin | 926 mg | More potassium than a banana |
| Potassium | 1 cup white beans | 1,189 mg | Highest single-food source |
| Potassium | 1 avocado | 690 mg | Also provides healthy fats |
| Magnesium | 1 oz pumpkin seeds | 156 mg | Highest single-food magnesium source |
| Magnesium | 1 oz almonds | 80 mg | Convenient snack |
| Magnesium | 1 cup cooked spinach | 78 mg | Low-calorie, nutrient-dense |
| Calcium | 1 cup milk | 300 mg | Standard dietary source |
| Calcium | 3 oz sardines with bones | 325 mg | Also 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:
- Enter your body weight in pounds.
- Select your diet type (standard, keto, or fasting).
- Choose your activity level (low, moderate, or high).
- Check any imbalance symptoms you are currently experiencing.
- 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.