Magnesium Replacement Calculator
Calculate magnesium replacement dose from serum level and weight for hypomagnesemia. Enter values for instant results with step-by-step formulas.
Reviewed for accuracy by Rahul Singh, Health & Wellness Specialist
Medical disclaimer: This calculator is provided for educational and informational purposes only and does not constitute medical advice, diagnosis, or treatment. Results are general estimates and may not reflect your individual circumstances. Always consult a qualified healthcare professional before making decisions about your health.
Magnesium Replacement Calculator
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser โ no data is sent to any server.
Formula: Severity-based dosing: Severe (<1.0): 4-8g MgSO4 IV; Moderate (1.0-1.5): 2-4g IV; Mild (1.5-1.8): 1-2g IV or oral
Worked example โ IV: 2 g MgSO4 over 2 hours | Oral: MgOxide 400 mg BID | Recheck in 12 hours
Formula
Severity-based dosing: Severe (<1.0): 4-8g MgSO4 IV; Moderate (1.0-1.5): 2-4g IV; Mild (1.5-1.8): 1-2g IV or oral
Magnesium replacement dosing is based on severity of hypomagnesemia rather than a precise deficit formula because only 1% of total body magnesium is extracellular. 1 g MgSO4 = 8.12 mEq = 4.06 mmol elemental Mg. Approximately 50% of IV magnesium is renally excreted within 24 hours, so repeated dosing over days is needed for full repletion.
Worked Examples
Example 1: Moderate Hypomagnesemia in Post-Surgical Patient
Problem:A 75 kg patient post-colectomy has a serum Mg of 1.3 mg/dL with normal renal function. Target Mg 2.0 mg/dL. The patient is tolerating oral intake but has mild muscle cramps.
Solution:Current Mg: 1.3 mg/dL (moderate hypomagnesemia) Target: 2.0 mg/dL IV dose: 2 g MgSO4 (16.2 mEq, 8.1 mmol) Dilute in 200 mL NS, infuse over 2 hours Follow with oral Mg oxide 400 mg twice daily Recheck serum Mg in 12 hours Also check K+ and Ca2+ levels
Result:IV: 2 g MgSO4 over 2 hours | Oral: MgOxide 400 mg BID | Recheck in 12 hours
Example 2: Severe Hypomagnesemia with Torsades de Pointes
Problem:A 65 kg patient on furosemide presents with Mg 0.8 mg/dL and torsades de pointes on telemetry. Normal renal function.
Solution:Current Mg: 0.8 mg/dL (SEVERE hypomagnesemia) MEDICAL EMERGENCY - torsades de pointes present Immediate: 2 g MgSO4 IV push over 2-5 minutes Followed by: 4-6 g MgSO4 IV over 12-24 hours Continuous cardiac monitoring mandatory Repeat dosing daily for 2-5 days to replete stores Check and replace K+ and Ca2+ concurrently
Result:STAT: 2 g MgSO4 IV push | Then 6 g over 24 hrs | Continuous monitoring | Multi-day repletion
Frequently Asked Questions
What are the symptoms and clinical manifestations of hypomagnesemia?
Hypomagnesemia produces a wide range of clinical manifestations that often overlap with other electrolyte disorders. Neuromuscular symptoms include muscle weakness, tremors, fasciculations, tetany, and in severe cases seizures. Cardiovascular manifestations are particularly dangerous and include prolonged QT interval, ST segment depression, T wave flattening, cardiac arrhythmias including torsades de pointes (a form of polymorphic ventricular tachycardia), atrial fibrillation, and increased sensitivity to digoxin toxicity. Metabolic effects include refractory hypokalemia and refractory hypocalcemia, both of which will not correct until magnesium is repleted. Chronic hypomagnesemia has been associated with insulin resistance, metabolic syndrome, hypertension, atherosclerosis, and osteoporosis. Many mild cases are asymptomatic and detected only through routine laboratory testing.
How is the IV magnesium dose calculated?
IV magnesium dosing is primarily based on the severity of hypomagnesemia rather than on a precise deficit calculation because the relationship between serum levels and total body stores is unreliable. For severe hypomagnesemia below 1.0 mg/dL, the typical dose is 4 to 8 grams of magnesium sulfate (MgSO4) administered IV over 12 to 24 hours. For moderate hypomagnesemia of 1.0 to 1.5 mg/dL, 2 to 4 grams IV is typical. For mild hypomagnesemia of 1.5 to 1.8 mg/dL, 1 to 2 grams IV or oral replacement may suffice. One gram of MgSO4 contains approximately 8.12 mEq (4.06 mmol) of elemental magnesium. Because approximately half of administered IV magnesium is excreted by the kidneys within 24 hours, repeated dosing over 2 to 5 days is often needed to fully replete total body stores, especially in severe deficiency.
What is the maximum safe IV magnesium infusion rate?
The maximum safe IV magnesium infusion rate depends on the clinical urgency and the patient clinical status. For routine replacement in non-emergency situations, the standard maximum rate is 1 gram of MgSO4 per hour, diluted in 100 mL of normal saline or D5W and infused slowly to avoid adverse effects. For life-threatening situations such as torsades de pointes or eclamptic seizures, 2 grams can be given as an IV push over 2 to 5 minutes. Rapid infusion carries risks including hypotension due to magnesium vasodilatory effects, facial flushing, warmth, bradycardia, and potentially dangerous hypermagnesemia. During infusion, patients should be monitored for signs of magnesium toxicity including loss of deep tendon reflexes (earliest sign at serum Mg of 7 to 10 mg/dL), respiratory depression, and cardiac conduction abnormalities. Calcium gluconate should be available at the bedside as a reversal agent.
What oral magnesium formulations are available?
Several oral magnesium formulations are available, each with different bioavailability and side effect profiles. Magnesium oxide contains the highest percentage of elemental magnesium (60 percent) but has poor bioavailability of only 4 to 5 percent and commonly causes diarrhea and gastrointestinal upset. Magnesium citrate has moderate bioavailability (approximately 25 to 30 percent) and is better absorbed but is also used as an osmotic laxative. Magnesium glycinate (chelated) has good bioavailability and is better tolerated with fewer GI side effects, making it preferred for chronic supplementation. Magnesium chloride has reasonable bioavailability of approximately 20 percent. Magnesium lactate and gluconate are also well absorbed. For acute oral replacement in hospitalized patients, magnesium oxide 400 to 800 mg (240 to 480 mg elemental magnesium) divided into two to three daily doses is commonly prescribed. The primary limitation of oral replacement is diarrhea, which paradoxically can worsen magnesium losses.
Why does hypomagnesemia cause refractory hypokalemia?
Hypomagnesemia causes refractory hypokalemia through two primary mechanisms involving the ROMK (renal outer medullary potassium) channel in the kidney. First, magnesium normally inhibits the ROMK potassium secretory channel in the cortical collecting duct of the nephron. When magnesium is depleted, this inhibition is lost, and the ROMK channel becomes constitutively active, leading to increased renal potassium wasting regardless of the body potassium status. This means that no matter how much potassium is administered, it will be rapidly excreted by the kidneys until magnesium is corrected. Second, magnesium is a cofactor for the Na-K-ATPase pump that drives potassium into cells, so magnesium depletion impairs intracellular potassium uptake. This dual mechanism makes concurrent magnesium repletion essential in any patient with hypokalemia that is not responding appropriately to potassium replacement therapy.
How should magnesium be monitored during replacement?
Monitoring during magnesium replacement therapy involves both laboratory and clinical assessments. Serum magnesium levels should be checked every 6 to 12 hours during active IV replacement and daily during oral supplementation until levels stabilize in the normal range. Because serum levels can appear normal while total body stores remain depleted, replacement should typically continue for several days beyond normalization of serum levels. Deep tendon reflexes should be checked regularly during IV infusion, particularly at higher rates, as loss of reflexes is the first clinical sign of hypermagnesemia. Blood pressure and heart rate monitoring is important because magnesium causes vasodilation and can potentiate hypotension. Renal function should be assessed because magnesium is primarily excreted by the kidneys and can accumulate to dangerous levels in renal insufficiency. Concurrent potassium and calcium levels should be monitored since these electrolytes are commonly deranged alongside magnesium.
What causes hypomagnesemia in ICU patients?
ICU patients are particularly susceptible to hypomagnesemia through multiple mechanisms that often coexist. Gastrointestinal losses from diarrhea, nasogastric suction, and malabsorption syndromes are common in critically ill patients. Renal magnesium wasting is frequently caused by medications including loop diuretics (furosemide), aminoglycosides, amphotericin B, cisplatin, calcineurin inhibitors (tacrolimus, cyclosporine), and proton pump inhibitors with chronic use. Sepsis and systemic inflammation cause magnesium redistribution and increased urinary losses. Massive fluid resuscitation with non-magnesium-containing crystalloids causes dilutional hypomagnesemia. Refeeding syndrome in malnourished patients causes intracellular magnesium shifts as cells resume anabolic metabolism. Diabetic ketoacidosis causes osmotic diuresis with magnesium wasting. Chronic alcohol use, which is common in many ICU admissions, causes both poor dietary intake and increased renal excretion of magnesium.
How does renal function affect magnesium replacement?
Renal function is the primary determinant of magnesium homeostasis because the kidneys are responsible for excreting approximately 90 to 95 percent of the filtered magnesium load under normal conditions. In patients with renal insufficiency, impaired magnesium excretion means that standard replacement doses can rapidly produce dangerous hypermagnesemia, which can cause respiratory failure, cardiac arrest, and death. For patients with mild to moderate renal impairment (GFR 30 to 60 mL/min), magnesium replacement doses should be reduced by approximately 50 percent with more frequent monitoring of serum levels every 4 to 6 hours. For patients with severe renal impairment (GFR below 30 mL/min), IV magnesium should be used very cautiously at 25 percent of standard doses or avoided entirely unless the hypomagnesemia is severe and symptomatic. Dialysis patients represent a unique situation where magnesium levels are influenced by the dialysate magnesium concentration, and replacement should be coordinated with the nephrology team.
What is the relationship between magnesium and cardiac arrhythmias?
Magnesium plays a critical role in cardiac electrophysiology and its deficiency is strongly associated with several dangerous arrhythmias. The most important association is with torsades de pointes (TdP), a polymorphic ventricular tachycardia that occurs in the setting of prolonged QT interval. Magnesium is the first-line treatment for TdP regardless of the serum magnesium level because it stabilizes cardiac membrane potential and suppresses early afterdepolarizations that trigger the arrhythmia. Hypomagnesemia also increases the risk of atrial fibrillation, particularly in post-cardiac surgery patients where prophylactic magnesium supplementation has been shown to reduce AF incidence. Digoxin toxicity is potentiated by hypomagnesemia because both magnesium and digoxin compete for binding sites on the Na-K-ATPase pump. Additionally, hypomagnesemia causes refractory ventricular arrhythmias in acute myocardial infarction. Current guidelines recommend maintaining serum magnesium above 2.0 mg/dL in patients with acute coronary syndromes and cardiac arrhythmias.
References
Background & Theory
History
Reviewed for accuracy by Rahul Singh, Health & Wellness Specialist ยท Editorial policy
Related Calculators
๐งฎPotassium Replacement Calculator
Calculate potassium replacement dosing from deficit and target serum potassium level.
๐งฎSodium Deficit Calculator
Calculate sodium replacement needs for hyponatremia from current and target sodium levels.
๐งฎIron Deficit Calculator: Ganzoni Replacement Dose
Calculate iron deficit and replacement dose from hemoglobin, weight, and target levels.
๐งฎBicarbonate Deficit Calculator
Calculate sodium bicarbonate replacement needs for metabolic acidosis correction.
๐งฎChads2 Score Calculator
Calculate the CHADS2 stroke risk score for patients with non-valvular atrial fibrillation.
๐งฎCha2ds2-Vasc Score Calculator
Calculate CHA2DS2-VASc score for stroke risk stratification in atrial fibrillation patients.
๐งฎHas-Bled Score Calculator
Assess bleeding risk in patients on anticoagulation using the HAS-BLED scoring system.
๐งฎHEART Score Calculator for Chest Pain Risk
Risk-stratify emergency department patients with chest pain using the HEART score.