Magnesium leaves the body mainly in urine and stool, with a small extra amount lost in sweat. The two main exits work very differently. The gut mostly passes along what was never absorbed, while the kidneys actively decide how much to let go. So when magnesium drifts too low or too high, the cause usually traces back to the kidneys, the gut, or something interfering with one of them.
How the Kidneys Control How Much Magnesium You Lose
Blood is filtered in the kidneys, and magnesium passes into the fluid that will become urine. The kidneys filter far more magnesium each day than they ever let go. Most of it is reclaimed before urine leaves the kidney, and only the leftover share after the final adjustment is excreted.
The reclaiming happens in stages along the kidney’s long, thin channels that fluid travels through. In the first part of the tubule and in a looped section further along, magnesium slips back into the body through gaps between cells.1PubMed Central. Magnesium Handling in the Kidney Specialized proteins act as magnesium-sized pores in those gaps, letting it pass back through.2PubMed Central. Molecular Mechanisms of Renal Magnesium Reabsorption3PubMed. Magnesium reabsorption in the kidney This movement depends on the pull created as the kidney reabsorbs sodium.1PubMed Central. Magnesium Handling in the Kidney
In a later stretch, magnesium is drawn back through the cells themselves by dedicated channels, and this is where the final fine-tuning happens.3PubMed. Magnesium reabsorption in the kidney That last channel controls how much magnesium ends up in urine and, through that, the body’s overall supply.4PubMed Central. Molecular Determinants of Magnesium Homeostasis: Insights from Human Disease
A calcium-sensing switch in the kidney also adjusts how magnesium, calcium and sodium are handled. That links magnesium loss to calcium balance and helps explain why the two minerals’ results often move together.
Inherited faults show how much these parts matter. People born with faulty versions of the gap proteins lose magnesium in urine and develop low blood magnesium and kidney calcium deposits.4PubMed Central. Molecular Determinants of Magnesium Homeostasis: Insights from Human Disease A faulty final channel causes low magnesium along with low calcium.4PubMed Central. Molecular Determinants of Magnesium Homeostasis: Insights from Human Disease
How Your Body Holds On When Magnesium Runs Low
On a low-magnesium diet, urine magnesium losses can drop to about a third within a day.5PubMed. Early adaptation of renal magnesium reabsorption in response to magnesium restriction The kidney’s looped section adapts within about 5 hours, before blood levels even fall.5PubMed. Early adaptation of renal magnesium reabsorption in response to magnesium restriction If intake stays low, blood magnesium eventually falls and the kidneys conserve even harder.5PubMed. Early adaptation of renal magnesium reabsorption in response to magnesium restriction
Because the kidneys respond first, a few days of poor eating doesn’t usually cause a shortage on its own. Blood magnesium can stay normal while the body quietly draws on its reserves.
The limits are real. Kidneys can only cut what they let go; they can’t make magnesium, and stool losses continue regardless. A long-lasting shortfall eventually outruns the defense and shows up in the blood. Eating magnesium-rich foods like nuts, beans and leafy greens restores supply.
Breastfeeding is a real-life example. Women who breastfeed pass about 1 mmol of magnesium a day into milk.6PubMed. Magnesium homeostasis: conservation mechanism in lactating women consuming a controlled-magnesium diet They offset this by excreting noticeably less in urine than women who aren’t pregnant or nursing.6PubMed. Magnesium homeostasis: conservation mechanism in lactating women consuming a controlled-magnesium diet
Magnesium in Stool and Why Too Much Causes Diarrhea
Much of the magnesium you eat is never absorbed and simply passes out in stool. The body also releases some magnesium into the gut, and in animals this amount rises roughly in step with intake.7PubMed. Fractional intestinal absorption of magnesium is directly proportional to dietary magnesium intake in rats So higher intake means more leaves through both the gut and the kidneys.
In healthy people, stool normally carries no more than about 14.6 mmol of dissolved magnesium a day.8PubMed. Diagnosis of magnesium-induced diarrhea Taking magnesium hydroxide, as in milk of magnesia, always pushed stool magnesium above that limit.8PubMed. Diagnosis of magnesium-induced diarrhea Each extra millimole of stool magnesium added about 7 grams to stool weight, mostly water.8PubMed. Diagnosis of magnesium-induced diarrhea
What stays in the bowel holds water in with it. Magnesium oxide is poorly absorbed, which is part of why it works as a laxative at higher doses. Diarrhea is a sign the dose is more than your gut handles well, not a sign of an allergy.
If a supplement upsets your bowels, lowering the dose or splitting it into smaller amounts through the day is a reasonable first step, since smaller amounts draw less water in. If loose stools continue after you’ve cut back, stop the supplement and ask a doctor. Ongoing diarrhea drains magnesium and other minerals, so it can backfire.
Gut problems can also be a route of loss on their own. Ongoing diarrhea or vomiting removes magnesium, and seriously ill people often lose it through both the gut and the kidneys.9PubMed. Magnesium deficiency in critical illness With a long-term gut illness, it makes sense to have your levels checked with a doctor.
Sweat Is a Minor Exit
Sweat contains only a small amount of magnesium, around 0.28 mEq per liter during work in the heat.10PubMed. Changes in serum and sweat magnesium levels during work in the heat Yet blood magnesium can dip during hard exercise in heat by more than sweat alone explains.10PubMed. Changes in serum and sweat magnesium levels during work in the heat Some magnesium likely moves into muscles and other tissues rather than leaving the body. People used to the heat also lose less magnesium in sweat.11PubMed. Effect of heat exposure and physical exercise until exhaustion in normothermic and hyperthermic conditions on serum, sweat and urinary concentrations of magnesium and phosphorus
For athletes, sweat losses are modest compared with urine and stool, and a post-workout dip in blood levels isn’t necessarily a loss. A normal diet usually covers active people. The case to watch is heavy, prolonged sweating combined with a poor diet.
Your Urine Magnesium Changes Through the Day
Urine magnesium output rises and falls on a daily cycle.12PubMed. Circadian variation in the urinary excretion of electrolytes and trace elements in men Excretion is generally higher while you’re awake and lower during sleep.13PubMed Central. Diurnal rhythms of urine volume and electrolyte excretion in healthy young men under differing intensities of daytime light exposure From the lowest to the highest point of the day, output can more than double.12PubMed. Circadian variation in the urinary excretion of electrolytes and trace elements in men Blood magnesium, though, stays steady across the day.14PubMed Central. Diurnal variation of magnesium and the mineral metabolism in patients with chronic kidney disease So the rhythm reflects how the kidneys handle magnesium, not your supply rising and falling.
This matters for testing. A sample taken at the high point of the day could look quite different from one taken at the low point in the same healthy person, so a single spot sample can mislead. That’s why doctors often use 24-hour or fasting samples, and why collection instructions should be followed exactly.
Medicines, Alcohol and Diabetes That Increase Magnesium Loss
Low blood magnesium, which a report may list as hypomagnesemia, often comes from losing too much through urine or the gut.9PubMed. Magnesium deficiency in critical illness Both main kinds of diuretics, or water pills, raise magnesium loss in urine.15PubMed Central. The role of calbindin-D28k on renal calcium and magnesium handling during treatment with loop and thiazide diuretics Long-term heavy drinking makes the kidneys let magnesium leak away.16PubMed Central. Magnesium Metabolism in Chronic Alcohol-Use Disorder: Meta-Analysis and Systematic Review An inherited kidney condition called Gitelman syndrome also causes low magnesium, though exactly why is unclear.17PubMed Central. Renal calcium and magnesium handling in Gitelman syndrome
Diabetes works through two routes: high sugar in urine and high insulin both increase urine magnesium.18PubMed. Magnesium in diabetes mellitus When blood sugar runs high, sugar spills into urine and carries extra fluid and magnesium with it.
Acid-reflux pills called proton pump inhibitors can lower magnesium too, but not through urine.19PubMed Central. Proton pump inhibitors and hypomagnesemia They seem to reduce how much the gut absorbs.19PubMed Central. Proton pump inhibitors and hypomagnesemia
Some medicines help. A newer class of diabetes and kidney drugs has raised magnesium in people who were losing it because of other medicines.20PubMed Central. Magnesium Balance in Chronic Kidney Disease: Mineral Metabolism, Immunosuppressive Therapies and Sodium-Glucose Cotransporter 2 Inhibitors
Low magnesium can show up as muscle cramps, twitches or weakness, though mild cases often cause no symptoms. In more severe cases there can be fatigue and an irregular heartbeat. These symptoms are vague, so testing is needed to know.
If you take a water pill or reflux pill long term, ask your doctor whether your magnesium should be checked. Don’t stop prescribed medicine on your own. Mention any supplements you take, since forms differ. Cutting back on alcohol also helps your kidneys keep magnesium.
When Magnesium Can’t Leave Fast Enough
In chronic kidney disease, less magnesium is filtered out of the blood.21PubMed. Magnesium Balance in Chronic and End-Stage Kidney Disease The kidneys compensate by reclaiming less, up to a point.21PubMed. Magnesium Balance in Chronic and End-Stage Kidney Disease In early disease the remaining kidney tissue keeps magnesium in a normal range for a long time. By advanced disease, stage 4, magnesium tends to build up.21PubMed. Magnesium Balance in Chronic and End-Stage Kidney Disease The risk rises as kidney function falls, because the kidneys can no longer let go of extra magnesium taken in.
Laxatives are the common trigger. Dangerously high magnesium has been reported in people over 65 with kidney problems taking magnesium oxide laxatives.22PubMed Central. Severe hypermagnesemia induced by magnesium oxide ingestion: a case series These patients often couldn’t describe symptoms because of stroke or dementia.22PubMed Central. Severe hypermagnesemia induced by magnesium oxide ingestion: a case series
Some magnesium is absorbed from laxatives and antacids. Healthy kidneys remove it, but weak kidneys may not.
If you’re looking after an older relative, check whether their laxative or antacid contains magnesium, and ask the doctor before long-term use if their kidneys are weak. Drowsiness, weakness or low blood pressure can be warning signs. Non-magnesium laxatives exist as alternatives.
How Doctors Tell Where Magnesium Is Being Lost
Most magnesium sits inside cells, so blood levels can look normal when stores are low.23PubMed Central. Comparison of Magnesium Status Using 24-h Urine Magnesium Content and Magnesium Fraction Excretion in PCOS with Non-PCOS Control Women: a Cross-sectional Study Doctors may add urine tests,23PubMed Central. Comparison of Magnesium Status Using 24-h Urine Magnesium Content and Magnesium Fraction Excretion in PCOS with Non-PCOS Control Women: a Cross-sectional Study which show what the kidneys are letting go and whether the body is conserving or wasting magnesium. Less than 12 mg in a 24-hour urine suggests deficiency when the kidneys are working normally, but a higher amount doesn’t rule it out, since the kidneys themselves may be wasting magnesium.23PubMed Central. Comparison of Magnesium Status Using 24-h Urine Magnesium Content and Magnesium Fraction Excretion in PCOS with Non-PCOS Control Women: a Cross-sectional Study
Comparing urine and blood magnesium on a fasting sample is the best way to tell kidney loss from gut loss.24Kidney International Reports. Identifying the Origin of Hypomagnesemia: Performance of Urinary Magnesium-Based Indexes A 24-hour urine total alone isn’t reliable for that question.24Kidney International Reports. Identifying the Origin of Hypomagnesemia: Performance of Urinary Magnesium-Based Indexes High urine magnesium despite low blood levels points to the kidneys. Low urine with low blood suggests the gut or diet. Your doctor reads the result alongside your medicines and symptoms.
For a 24-hour collection, you discard the first morning urine, then collect everything for the next 24 hours. Missing a sample skews the results. Ask whether to pause supplements beforehand.

