The fasting electrolyte calculator shows the general adult reference intakes for sodium, potassium and magnesium, then tells you what your fast length, activity, climate and supplement use change. Use it as a safety reference before a longer fast. It gives no supplement dose and no homemade electrolyte recipe, and the three reference numbers stay the same whatever you enter.
Last verified 6 Oct 2026 against the CDC sodium recommendation and the NIH Office of Dietary Supplements fact sheets for potassium and magnesium.
Fasting Hydration & Electrolyte Guide
Get a safer reference guide based on fast length, activity, climate, and current supplement use
Related Calculators
Medical Disclaimer: This calculator provides estimates for educational purposes only and does not constitute medical advice. Intermittent fasting is not appropriate for everyone. Do not fast if you are pregnant or breastfeeding, under 18 years of age, have a history of eating disorders, or have been diagnosed with Type 1 diabetes. If you take medications (especially insulin or blood pressure medication), have any chronic health conditions, or are recovering from surgery, consult your physician before beginning any fasting protocol. If you experience chest pain, fainting, persistent dizziness, or heart palpitations during a fast, stop immediately and seek medical attention.
How your result is worked out
The calculator does two separate things. It prints three fixed reference values for adults, and it picks notes from your inputs. No input changes the numbers.
1. The three reference values
Each value is a published intake for healthy adults from food, drinks and supplements combined. None of them is a dose to take during a fast.
| Mineral | Value shown | What it is | Source |
|---|---|---|---|
| Sodium | 2,300 mg a day or less | An upper limit: the CDC recommends less than 2,300 mg a day for teens and adults | CDC |
| Potassium | 2,600 to 3,400 mg a day | Adequate intake for adults aged 19 to 50: 2,600 mg for women, 3,400 mg for men | NIH Office of Dietary Supplements |
| Magnesium | 310 to 420 mg a day | Recommended intake for adults, which varies by age and sex | NIH Office of Dietary Supplements |

2. What your inputs change
Your inputs choose which notes appear under “What Your Inputs Change”. These cut-offs are the calculator’s own rules, not clinical thresholds.
| Your input | Note the calculator shows |
|---|---|
| Fast of 16 to 23 hours | For a shorter fast, avoid adding electrolytes automatically. Use thirst, meals and your clinician’s advice as the starting point. |
| Fast of 24 to 47 hours | A fast of 24 hours or longer raises the stakes, but duration alone cannot determine a safe electrolyte dose. |
| Fast of 48 hours or longer | A fast of 48 hours or longer carries higher risk. Duration alone cannot determine a safe electrolyte dose. |
| Moderate or Very Active, or a Hot or Hot & Humid climate | Your activity or climate may increase sweat loss. Exact fluid and sodium replacement requires measured sweat loss or clinician guidance. |
| Any other activity and climate | Your selected activity and climate do not indicate unusually high sweat loss. |
| “I’m already taking electrolyte supplements” ticked | You selected current supplement use. Add up every serving on every label before taking more. |

3. Safety checks
Every result ends with the same four checks. The magnesium line follows the NIH upper limit of 350 mg a day of supplemental magnesium for adults; the NIH notes that the risk of too much magnesium from food is low in healthy people. The potassium line follows the NIH warning that kidney disease and some medicines change how your body handles potassium.
- Do not use the reference intakes as doses for salt, potassium chloride, magnesium powder or electrolyte mixes.
- For adults, the NIH upper limit for magnesium from supplements and medicines is 350 mg a day; magnesium from food does not count toward that limit.
- Kidney or heart disease, pregnancy, blood-pressure medicines, diuretics and medicines that affect potassium require clinician guidance.
- Stop fasting and seek urgent care for confusion, fainting, chest pain, severe weakness, persistent vomiting or palpitations.
4. Food first
When you are eating, the calculator points you to normal meals. Americans eat more than 3,300 mg of sodium a day on average, above the 2,300 mg limit, according to the CDC. The NIH lists fruits, vegetables, some legumes and potatoes among good potassium sources, and green leafy vegetables, legumes, nuts, seeds and whole grains among good magnesium sources.
Sources: CDC, About Sodium and Health; NIH Office of Dietary Supplements, Potassium and Magnesium fact sheets for health professionals.
Worked example: the default inputs
A 24-hour fast, Light activity, a Moderate climate, and no supplements ticked. These are the inputs the calculator starts with.
| Part of the result | What you see |
|---|---|
| Sodium | 2,300 mg a day or less (upper limit) |
| Potassium | 2,600 to 3,400 mg a day (adequate intake) |
| Magnesium | 310 to 420 mg a day (recommended intake) |
| Fast length note | A fast of 24 hours or longer raises the stakes, but duration alone cannot determine a safe electrolyte dose. |
| Sweat loss note | Your selected activity and climate do not indicate unusually high sweat loss. |
| Next step offered | Plan an extended fast |
Change the fast to 48 hours or pick a Hot climate and the notes change. The three reference values stay the same.
Fasting electrolyte questions
Do electrolytes break a fast?
That depends on the product and on your fasting goal. Sugar, calories and some sweeteners can change the answer. Check a specific product in What Breaks a Fast.
Should everyone take electrolytes during a fast?
The calculator does not recommend a supplement for anyone. It sets no dose from body weight or fasting hours, and for a fast under 24 hours it tells you not to add electrolytes by default. Ask a clinician before you take electrolyte supplements during a long fast, and always if you have kidney or heart disease or take blood-pressure medicines or diuretics.
Why does the calculator not include a homemade electrolyte recipe?
Potassium chloride, concentrated salt mixtures and magnesium salts can cause harm when the amount is wrong, or when kidney function, a heart condition or a medicine changes how your body handles them. A recipe cannot account for those. Never take Epsom salt by mouth unless a clinician tells you to use a product labeled for oral use.
Where do the reference values come from?
Sodium comes from the CDC recommendation of less than 2,300 mg a day. Potassium and magnesium come from the intake tables in the NIH Office of Dietary Supplements fact sheets. The Sources list below links all three.
Sources
- About Sodium and Health. Centers for Disease Control and Prevention (CDC).
- Potassium: Fact Sheet for Health Professionals. NIH Office of Dietary Supplements, updated 2 June 2022.
- Magnesium: Fact Sheet for Health Professionals. NIH Office of Dietary Supplements, updated 6 January 2026.
More fasting tools
- Extended fasting calculator: plan a fast of 24 hours or more with checkpoints and refeeding guidance.
- What breaks a fast: check a drink, food or supplement against your fasting goal.
- Fasting timer: track the fast you are on against a target duration.
- All fasting calculators: every fasting calculator in one list.


