This test is most useful if any of these apply to you.
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.
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.
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.
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.
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.
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.
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.
| Tier | Range (mg/24 h) | What It Suggests |
|---|---|---|
| Low | Below 60 | Possible magnesium depletion, especially if serum magnesium is also low; associated with higher kidney stone risk |
| Lower normal | 60 to 80 | Kidneys may be conserving magnesium, or dietary intake is modest; worth pairing with serum magnesium |
| Typical | 80 to 120 | Within the central range for healthy adults in most cohorts |
| Higher normal | 120 to 210 | Adequate 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.
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.
Because this test reflects everything that happened to your magnesium balance over 24 hours, several common situations can distort a single reading.
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.
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.
Evidence-backed interventions that affect your Magnesium level
Magnesium is best interpreted alongside these tests.