Instalab

Magnesium Test 24 Hour Urine

One of the most sensitive reads on your body's magnesium balance, catching depletion that a standard blood test misses.

Should you take a Magnesium test?

This test is most useful if any of these apply to you.

Taking Magnesium Supplements
See whether your supplement is actually being absorbed, and whether the form you chose is working for you.
Worried About Kidney Stones
Low urinary magnesium is tied to higher stone risk. This test shows whether your levels are protective.
On Long-Term PPIs or Diuretics
These medications quietly drain magnesium. This test catches the loss before symptoms appear.
Watching Your Blood Pressure
Lower urinary magnesium is linked to higher hypertension risk, even when blood pressure looks normal today.

About Magnesium

Magnesium is involved in over 300 enzyme reactions in your body, from building bone to keeping your heart rhythm steady to regulating blood sugar. Yet a standard blood test for magnesium can look perfectly normal even when your body's stores are running low. That gap between what your blood shows and what your cells actually have is exactly what this test was designed to close.

A 24-hour urine magnesium test measures the total amount of magnesium your kidneys excrete over a full day. Because your kidneys tightly conserve magnesium when your body is running short, a drop in urinary excretion is often the earliest signal that you are not absorbing enough from your diet or that your kidneys are losing more than they should. In a study of patients with gut failure, every patient had low 24-hour urine magnesium, yet over half still had normal blood magnesium levels. The urine test caught the deficiency; the blood test did not.

What This Test Reflects

Your kidneys filter roughly 2,400 mg of magnesium from your blood every day and reabsorb about 95% of it, sending only around 100 mg into the urine under normal conditions. The amount that ends up in your urine is shaped by three things: how much magnesium you absorb from food and supplements, how well your kidney tubules (the tiny filtering channels inside each kidney) reclaim magnesium before it leaves, and your hormonal environment, which signals the kidneys to hold on to or release more magnesium.

This makes 24-hour urine magnesium a dynamic readout of your net magnesium balance, not a snapshot of a single moment. When intake goes up, excretion rises. When your body is depleted, the kidneys clamp down and excretion falls. When a medication or disease forces the kidneys to waste magnesium, excretion stays high even as your body's stores drain. Knowing which pattern you fit matters for deciding what to do next.

Hypertension Risk

The strongest outcome data linking 24-hour urinary magnesium to a specific disease come from the PREVEND study (Prevention of Renal and Vascular End-Stage Disease), which followed 5,511 Dutch adults who were free of high blood pressure at baseline for a median of 7.6 years. Researchers found that higher urinary magnesium excretion was associated with a roughly 21% lower risk of developing hypertension for each unit increase on a logarithmic scale, after adjusting for age, sex, BMI, kidney function, sodium, potassium, calcium, and other standard risk factors.

The relationship was roughly continuous across the normal range, meaning there was no obvious floor below which protection disappeared. If your 24-hour magnesium sits well below the population median of about 92 mg per day (the PREVEND median), your risk profile for developing high blood pressure is less favorable, even if your blood pressure readings are still normal today.

Heart Disease

A companion analysis from the same PREVEND cohort, this time including 7,664 adults, found that lower urinary magnesium excretion was independently associated with a higher risk of ischemic heart disease (heart attacks and related events caused by blocked arteries). This held after adjusting for the usual cardiovascular risk factors. The WHO-CARDIAC study, which spanned 41 populations across 25 countries and included roughly 3,960 middle-aged adults, reinforced this: people whose 24-hour urinary magnesium-to-creatinine ratio was at or above the population average of about 82.8 mg per gram of creatinine had significantly lower blood pressure, lower BMI, lower total cholesterol, and a more favorable atherogenic index than those below the average.

These cardiovascular associations are consistent with what is seen in broader magnesium research using blood levels and dietary intake. A meta-analysis pooling data from over 532,000 people found that those with the highest serum magnesium had about 23% lower risk of total cardiovascular events compared with the lowest. The 24-hour urine test adds a dimension that blood magnesium alone cannot: it reveals whether your kidneys are conserving or wasting magnesium, which points toward different causes and solutions.

Kidney Stone Risk

Magnesium in the urine binds to oxalate, one of the main building blocks of kidney stones, and helps prevent crystals from forming. Large U.S. prospective cohorts involving over 6,200 participants confirmed that higher 24-hour urinary magnesium is associated with lower kidney stone risk, with a near-linear dose-response relationship.

In a study of 157 patients with asymptomatic primary hyperparathyroidism (a condition that raises calcium levels), those whose 24-hour urinary magnesium fell below 60 mg per day had roughly six times the odds of harboring silent kidney stones compared with those above that threshold. This was independent of the calcium level. If you have ever had a kidney stone or carry risk factors for them, this test provides information that a blood magnesium level simply cannot.

Metabolic Syndrome and Diabetes Risk

An analysis of over 15,500 adults from the U.S. National Health and Nutrition Examination Survey (NHANES) found that higher magnesium depletion, captured through a score that incorporates urinary magnesium loss from medications and other factors, was linearly associated with higher odds of metabolic syndrome, roughly 30% higher per point on the depletion scale, independent of age, sex, race, and lifestyle factors.

Diabetes itself changes how this test reads. In a study comparing people with type 1 diabetes, type 2 diabetes, prediabetes, and healthy controls, both diabetes groups had significantly higher urinary magnesium excretion than controls, while their blood magnesium was lower. High blood sugar drives the kidneys to waste magnesium. So a high 24-hour urine magnesium in the context of diabetes does not mean you have plenty of magnesium; it means you are losing it faster than you should be.

Reference Ranges

There is no single internationally harmonized reference range for 24-hour urinary magnesium. Labs typically report a wide normal band, and the most commonly cited clinical range is 60 to 210 mg per 24 hours (roughly 2.5 to 8.6 mmol per 24 hours). Population medians from large cohorts cluster around 70 to 120 mg per day. These values come primarily from European and North American populations with normal kidney function, so your lab may use slightly different cutpoints.

TierRange (mg/24 h)What It Suggests
LowBelow 60Possible magnesium depletion, especially if serum magnesium is also low; associated with higher kidney stone risk
Lower normal60 to 80Kidneys may be conserving magnesium, or dietary intake is modest; worth pairing with serum magnesium
Typical80 to 120Within the central range for healthy adults in most cohorts
Higher normal120 to 210Adequate absorption and excretion; higher end may reflect generous dietary intake or supplementation

Compare your results within the same lab over time rather than treating any single cutpoint as absolute. Different assay methods and collection protocols can shift numbers meaningfully.

Why One Reading Is Not Enough

This test has one of the highest day-to-day swings of any common lab marker. In a study of 60 healthy men, the within-person coefficient of variation for 24-hour urinary magnesium was 36%, with an additional 26% variation between different people. That means a single collection can easily be 30% to 40% higher or lower than your true average, depending on what you ate, how much water you drank, and how active you were that day.

For this reason, a single reading should never drive a major clinical decision on its own. Get a baseline, then retest in 3 to 6 months if you are making dietary or supplement changes. If both readings tell the same story, you have a reliable signal. If they diverge, a third collection will clarify which direction your body is actually trending. For ongoing monitoring, at least one collection per year is reasonable. If you are taking magnesium supplements and want to verify they are working, a repeat collection 8 to 12 weeks after starting is a practical interval, since the urinary response to supplementation plateaus by about 40 weeks.

When Results Can Be Misleading

Because this test reflects everything that happened to your magnesium balance over 24 hours, several common situations can distort a single reading.

  • Incomplete collection: Missing even one or two voids during the 24-hour window can drop your result by 10% to 20%. Most labs ask you to collect a simultaneous creatinine to check whether the collection was complete. If 24-hour creatinine is unexpectedly low, the magnesium value is probably artifactually low too.
  • Proton pump inhibitors (PPIs): Chronic use of acid-blocking medications like omeprazole can reduce intestinal magnesium absorption, lowering 24-hour urine magnesium by roughly 0.8 mmol per day. Your result may look normal or low not because of diet but because of your medication. In kidney transplant recipients, PPI use was associated with about twice the odds of low blood magnesium, with higher doses producing a stronger effect.
  • Recent intense exercise or acute stress: Physical stress shifts magnesium from cells into the blood, followed by increased urinary excretion for up to about two days. A collection that overlaps with a hard training session may read higher than your true baseline.
  • Diabetes or high blood sugar: Elevated glucose directly increases renal magnesium loss. A high urinary magnesium in someone with diabetes or prediabetes does not mean magnesium is plentiful; it means the kidneys are leaking it. Pair this result with serum magnesium and HbA1c for proper context.

How This Test Compares to Serum Magnesium

Serum magnesium (the standard blood test) is tightly regulated by the body and represents less than 1% of total body magnesium. It can sit comfortably within the reference range even when tissue stores are significantly depleted. Reviews consistently emphasize that serum magnesium correlates poorly with total body magnesium.

The 24-hour urine test fills a different niche: it shows how much magnesium is flowing through your system and whether your kidneys are holding on to it or letting it go. A low urinary magnesium with normal serum magnesium is a classic pattern in early depletion, where the kidneys are compensating by clamping down on excretion. A high urinary magnesium with low serum magnesium points to renal wasting, a pattern seen with certain medications, genetic conditions, or kidney tubule problems. Neither test alone tells the whole story, and they are most informative together.

What to Do with an Abnormal Result

If your 24-hour urine magnesium is low (below about 60 mg per day), the first step is to retest with a careful, complete collection to rule out a missed void. If the repeat confirms a low value, check your serum magnesium and blood glucose. Low urine magnesium with low serum magnesium strongly suggests depletion. Low urine magnesium with normal serum magnesium suggests your kidneys are working hard to conserve a dwindling supply, which is early-stage deficiency.

If your result is high (above 150 to 200 mg per day) without supplementation, evaluate for kidney-driven magnesium wasting. Check kidney function markers like creatinine and cystatin C, review your medication list for loop diuretics or other drugs that increase magnesium loss, and consider whether uncontrolled blood sugar could be the driver. A nephrologist or endocrinologist can help sort out whether the loss is coming from the kidney tubules themselves or from a metabolic condition upstream.

For anyone with a history of kidney stones, pair this test with a full 24-hour urine stone risk panel that includes calcium, oxalate, citrate, and urine volume. Magnesium is one piece of a larger puzzle in stone prevention, and optimizing it in isolation is less effective than addressing the full mineral balance.

What Moves This Biomarker

Evidence-backed interventions that affect your Magnesium level

↑ Increase
Take oral magnesium supplements (citrate, oxide, or sulfate)
Oral magnesium supplementation reliably raises your 24-hour urine magnesium, confirming that your body is absorbing the supplement. A meta-analysis of 48 randomized controlled trials found an average increase of about 1.52 mmol per 24 hours (roughly 37 mg per day, or about a 32% increase) compared with placebo. The response is dose-dependent and time-dependent, plateauing at about 400 mg per day of elemental magnesium and around 40 weeks of use. In a head-to-head trial of 164 overweight and obese adults given 450 mg per day for 24 weeks, magnesium citrate produced the largest urinary increase at about 3.12 mmol per 24 hours, outperforming oxide and sulfate forms.
SupplementStrong Evidence
↓ Decrease
Use proton pump inhibitors (PPIs) like omeprazole chronically
Chronic PPI use reduces intestinal magnesium absorption, lowering 24-hour urinary magnesium by about 0.82 mmol per day (roughly 20 mg per day). In a study of 686 kidney transplant recipients, PPI users had about twice the odds of low blood magnesium compared with non-users, and higher PPI doses (above the equivalent of 20 mg omeprazole per day) produced a stronger effect. This is a genuine reduction in magnesium absorption, not just a testing artifact, so the low urine magnesium reflects real depletion.
MedicationModerate Evidence
↑ Increase
Take loop diuretics (e.g., furosemide) for heart failure or fluid retention
Loop diuretics block magnesium reabsorption in the kidney, increasing urinary magnesium loss and eventually depleting body stores. In a study of 34 heart failure patients on loop diuretics, those also taking an ACE inhibitor had lower 24-hour urinary magnesium (18.5 vs 26.0 mmol per 24 hours) because the ACE inhibitor reduced the amount of magnesium reaching the kidney in the first place. But the diuretic itself drives ongoing magnesium wasting, which is why people on chronic loop diuretics are at high risk for magnesium depletion over time.
MedicationModerate Evidence
↑ Increase
Eat a magnesium-rich diet (green leafy vegetables, nuts, seeds, whole grains, legumes)
Dietary magnesium is the primary input that determines how much ends up in your urine. Higher habitual magnesium intake is consistently associated with higher 24-hour urinary excretion in population studies. In the WHO-CARDIAC study of 41 populations across 25 countries, people with above-average urinary magnesium had significantly lower blood pressure, lower BMI, and lower cholesterol. The PREVEND cohort showed a continuous inverse relationship between urinary magnesium and hypertension risk across the normal dietary intake range.
DietModerate Evidence

Frequently Asked Questions

References

20 studies
  1. Xi Zhang, Liana C. Del Gobbo, a. Hruby, a. Rosanoff, K. He, Q. Dai, R. Costello, Wen Zhang, Yiqing SongThe Journal of Nutrition2016
  2. M. M. Joosten, R. Gansevoort, K. Mukamal, Jenny E. Kootstra-ros, E. Feskens, J. Geleijnse, G. Navis, S. BakkerHypertension2013
  3. M. M. Joosten, R. Gansevoort, K. Mukamal, P. Van Der Harst, J. Geleijnse, E. Feskens, G. Navis, S. BakkerThe American Journal of Clinical Nutrition2013
  4. J. Schutten, P. Joris, Iris Groendijk, Coby Eelderink, D. Groothof, Yvonne Van Der Veen, R. Westerhuis, F. Goorman, Richard M. Danel, M. D. De Borst, S. BakkerJournal of the American Heart Association2022