Magnesium: The Underdiagnosed Electrolyte Deficiency

Reviewed by AskAnything Clinical Team, MD-reviewedLast updated 2026-04-26

A patient is admitted with leg cramps, fatigue, and a potassium that won't stay up no matter how much you replace. Three days in, somebody finally checks magnesium. It's 1.3. Replace it, and overnight the potassium holds, the cramps stop, and they go home.

This story repeats itself constantly because magnesium isn't on the basic metabolic panel. You have to order it separately, and most of the time nobody does. Compound that with the fact that serum magnesium captures only about 1% of total body magnesium (the rest sits in cells and bone), and you end up with the most underdiagnosed electrolyte deficiency in medicine.

If you've ever seen refractory hypokalemia, the answer is almost always magnesium. Same for refractory hypocalcemia. Same for the muscle cramps no one can explain.

What magnesium measures

The serum value samples only a small extracellular pool. Most magnesium is locked inside cells (especially muscle) and bone. The blood number reliably catches severe deficiency and acute changes, but borderline values miss a lot of chronic, milder deficiency.

Two practical takeaways:

  • A "normal" serum magnesium does not rule out deficiency. If symptoms or refractory electrolyte abnormalities point that direction, an empirical trial of supplementation is reasonable.
  • RBC magnesium and intracellular assays are more sensitive but rarely available outside research settings. Useful as a second-line check when needed.

In routine practice, the most reliable signal is functional. Refractory low potassium, refractory low calcium, or cramps that resolve when you replace magnesium.

Magnesium reference ranges

DemographicLowHighUnit
Adults — normal1.72.2mg/dL
Mild hypomagnesemia1.41.6mg/dL
Moderate hypomagnesemia11.3mg/dL
Severe hypomagnesemia00.9mg/dL
Hypermagnesemia2.35mg/dL
  • Normal: 1.7–2.2 mg/dL (0.70–0.91 mmol/L).
  • Mild hypomagnesemia: 1.4–1.6 mg/dL. Often asymptomatic; common with diuretics, PPIs.
  • Moderate hypomagnesemia: 1.0–1.3 mg/dL. Cramps, palpitations, fatigue, refractory hypokalemia.
  • Severe hypomagnesemia: below 1.0 mg/dL. Arrhythmia risk; often hospital management.
  • Hypermagnesemia: above 2.3 mg/dL. Almost always iatrogenic (IV magnesium, antacids in CKD).

Some clinicians argue that "optimal" magnesium runs in the upper half of the range (2.0 to 2.2). Evidence is mixed. There's no harm in keeping levels above 2.0 in patients with cardiovascular disease, diabetes, or chronic muscle complaints, and probably some upside.

What high magnesium (hypermagnesemia) means

High magnesium is uncommon and almost always iatrogenic. Healthy kidneys clear an oral load with no trouble, so high levels usually require both an external source and impaired excretion.

Common causes:

  • Magnesium-containing antacids and laxatives in CKD. The leading outpatient cause. Milk of Magnesia and a creatinine of 2.5 don't mix.
  • IV magnesium for eclampsia, asthma, or arrhythmia. Therapeutic in the right dose, dangerous in the wrong one.
  • Acute or chronic kidney failure. Any magnesium load gets stuck.
  • Tumor lysis, rhabdomyolysis. Cellular release.
  • Adrenal insufficiency. Uncommon, but classic.

Symptoms appear above 4 to 5 mg/dL: nausea, flushing, weakness, decreased reflexes. Higher levels bring hypotension, respiratory depression, and cardiac arrest. Treatment is calcium gluconate, IV fluids, loop diuretics, and dialysis if it's severe.

What low magnesium (hypomagnesemia) means

Low magnesium is common and frequently missed. Major causes cluster into a few categories.

Drug-induced (the biggest bucket):

  • Proton pump inhibitors (omeprazole, pantoprazole, esomeprazole). Long-term use blocks intestinal magnesium absorption. The FDA issued a warning in 2011. Anyone on a PPI longer than a year deserves a magnesium check, especially if they're also on a diuretic.
  • Loop and thiazide diuretics. Direct renal magnesium wasting.
  • Aminoglycosides, amphotericin B, cisplatin, cyclosporine, tacrolimus. All waste magnesium through the kidneys.
  • Laxative abuse. Chronic GI losses.

GI losses and malabsorption:

  • Chronic diarrhea, inflammatory bowel disease, celiac disease, post-bariatric surgery.
  • Short bowel syndrome, pancreatic insufficiency.

Other causes:

  • Alcohol use disorder. Poor intake, GI losses, and renal wasting all at once.
  • Uncontrolled diabetes. Osmotic diuresis flushes magnesium out.
  • Inadequate intake. Western diets average 60 to 70% of the RDA. Whole grains, leafy greens, nuts, seeds, legumes carry it. Processed food does not.
  • Hungry bone syndrome, refeeding syndrome. Rapid cellular uptake.

The symptom list is long: cramps and muscle twitches, restless legs, fatigue, palpitations, anxiety, migraines, insomnia, constipation. Severe deficiency causes tetany, seizures, and ventricular arrhythmias including torsades de pointes.

Reading magnesium over time

Magnesium isn't on the basic metabolic panel and rarely gets trended. The patients who benefit most from periodic monitoring:

  • Long-term PPI users. Annual at minimum, more often if also on diuretics.
  • Anyone on chronic diuretics. Every 6 to 12 months.
  • Heart failure or arrhythmia patients. Magnesium below 2.0 tracks with worse outcomes, and many cardiologists target above 2.0.
  • Diabetics. Deficiency is more prevalent in this group and worsens insulin resistance.
  • Chronic alcohol use. Periodic monitoring in recovery, active replacement in withdrawal.
  • Anyone with chronic cramps, restless legs, or migraines. At least one check before chalking it up to idiopathic anything.

For oral repletion: glycinate, citrate, malate, and threonate are well absorbed. Magnesium oxide is poorly absorbed and mostly works as a laxative. Typical dose is 200 to 400 mg of elemental magnesium daily. Cut the dose if stools get loose.

Track this biomarker over time in AskAnything.health — upload your lab results and see trends at a glance.

When to act on magnesium

  • Magnesium below 1.0 mg/dL. Hospital evaluation, IV replacement, ECG monitoring. Risk of torsades de pointes.
  • Refractory hypokalemia or hypocalcemia. Check magnesium first. These almost never correct without magnesium repletion.
  • New cramps, palpitations, or restless legs in a patient on PPIs or diuretics. Check magnesium and replace if low or low-normal.
  • Magnesium 1.4–1.6 mg/dL. Replace if symptomatic, on diuretics, in heart failure, or post-MI. Many cardiologists treat to above 2.0.
  • Persistent atrial fibrillation or PVCs. Replenish magnesium and potassium; both lower the arrhythmia threshold.
  • Magnesium above 2.5 in a CKD patient on antacids. Review for magnesium-containing OTC products.

This information is for educational purposes only and is not a substitute for professional medical advice. Always consult your healthcare provider about your lab results.

Tests that complete the magnesium picture

  • Potassium. Refractory hypokalemia is the loudest functional sign of magnesium deficiency.
  • Calcium (and ionized calcium). Magnesium is required for parathyroid hormone secretion; severe hypomagnesemia causes functional hypoparathyroidism and hypocalcemia.
  • Phosphate. Often disturbed alongside magnesium in malabsorption and refeeding states.
  • Vitamin D. Magnesium is a cofactor in vitamin D activation; deficiencies cluster.
  • BUN and creatinine. Kidney function determines clearance and dictates safe replacement strategy.
  • ECG. For symptomatic or severely low magnesium; assess QT interval and look for U waves.

Patterns to recognize

Combinations of values that together point at a specific clinical picture. One number rarely tells the whole story.

Refractory hypokalemia from magnesium deficiency

  • Potassium <3.5 mEq/L despite oral KCl
  • Magnesium <1.7 mg/dL
  • On loop or thiazide diuretic, PPI, or chronic alcohol use

Low magnesium opens renal K channels and the kidneys leak potassium. Replacement of K alone fails until Mg is replete.

Next: Replace magnesium (oral glycinate/citrate or IV) before continuing aggressive potassium repletion.

Refractory hypocalcemia from hypomagnesemia

  • Corrected calcium <8.5 mg/dL
  • Magnesium <1.4 mg/dL
  • PTH inappropriately low or normal
  • Often post-bariatric surgery, alcohol use, or PPI exposure

Magnesium is required for PTH secretion and action. Severe hypomagnesemia causes functional hypoparathyroidism.

Next: Replace magnesium first; calcium will start to rise within 24–48 hours as PTH function returns.

PPI-induced hypomagnesemia

  • Magnesium <1.6 mg/dL
  • Long-term PPI use (>1 year)
  • Often co-prescribed with diuretic
  • Cramps, palpitations, or paresthesias

Long-term PPIs impair intestinal magnesium absorption — an FDA-recognized adverse effect that often resists oral repletion while the drug continues.

Next: Stop or de-escalate the PPI when feasible; if continuation is required, IV magnesium or high-dose oral may be needed.

Refeeding syndrome

  • Phosphate <2.5 mg/dL
  • Potassium <3.5 mEq/L
  • Magnesium <1.7 mg/dL
  • Within days of reintroducing nutrition in a malnourished patient

Insulin surge during refeeding drives phosphate, potassium, and magnesium into cells, causing dangerous electrolyte drops and arrhythmia risk.

Next: Slow caloric advancement, replace electrolytes proactively, monitor on telemetry; supplement thiamine.

Hypermagnesemia from antacids in CKD

  • Magnesium >2.5 mg/dL
  • eGFR <30 mL/min/1.73m²
  • Use of Mg-containing antacids or laxatives (Milk of Magnesia)
  • Hyporeflexia, hypotension at higher levels

Impaired renal clearance of an exogenous magnesium load — the classic outpatient cause of true hypermagnesemia.

Next: Stop the magnesium-containing OTC product; IV calcium gluconate and dialysis if symptomatic.

Frequently Asked Questions

1.7–2.2 mg/dL (0.70–0.91 mmol/L). However, serum magnesium reflects only about 1% of total body magnesium, so a "normal" value does not rule out tissue depletion. Many clinicians consider levels in the upper half of the range (above 2.0) optimal for cardiac and muscle health.

Magnesium is not part of the basic or comprehensive metabolic panel. It must be ordered separately. Many primary care doctors do not order it routinely, which is why deficiency is underdiagnosed. If you have cramps, palpitations, restless legs, or take PPIs or diuretics long-term, ask for it specifically.

Yes — well documented. Long-term PPI use impairs intestinal magnesium absorption. The FDA issued a warning in 2011. Anyone on a PPI longer than a year should have magnesium checked, particularly if also on a diuretic. PPI-induced hypomagnesemia often does not respond to oral supplementation while the PPI is continued.

Magnesium is required for muscle relaxation — it antagonizes calcium at the neuromuscular junction. Deficiency lowers the threshold for spontaneous muscle contraction. Trials show modest benefit for nocturnal leg cramps and pregnancy cramps, with the strongest signal in people whose magnesium is low or low-normal to start with.

Magnesium glycinate, citrate, malate, and threonate are all well absorbed. Glycinate is gentler on the gut and good for sleep and anxiety; citrate is mildly laxative; threonate crosses the blood-brain barrier and may help cognition; malate may help fatigue. Magnesium oxide is cheap and widely sold but poorly absorbed — it mostly works as a laxative.

In healthy adults with normal kidney function, oral magnesium is hard to overdose because excess causes diarrhea before it raises serum levels meaningfully. In CKD, magnesium-containing antacids and laxatives can cause clinically significant hypermagnesemia. Avoid Milk of Magnesia and magnesium hydroxide products in moderate to severe kidney disease.

Magnesium is required for the kidney channels that hold onto potassium, and for parathyroid hormone secretion that regulates calcium. Magnesium deficiency creates a state where the body cannot retain potassium and cannot mobilize calcium normally. That is why refractory hypokalemia and hypocalcemia are signature signs of magnesium deficiency.

There is reasonable evidence that magnesium glycinate or threonate at 200–400 mg in the evening improves sleep onset and subjective anxiety, particularly in people with low or low-normal magnesium. The effect is modest but real and the safety profile is excellent in people with normal kidneys.

Track your lab results over time

Upload your blood work and see trends, reference ranges, and AI-powered insights — all in one place.

Get Started

Not medical advice. AskAnything.health is an AI-powered second-opinion tool designed to help you understand your health data. It does not diagnose, treat, or replace professional medical care. Always consult a qualified healthcare provider before making medical decisions. Your data is processed securely and never shared with third parties — see our Privacy Policy.