Story
Magnesium
Last updated
In one pass To get more magnesium, start at the table: the greener the vegetable and the less refined the grain, the more magnesium it usually carries.
Educational content, not medical advice — consult a clinician.
Three phosphates, a row of negative charge The three phosphates of ATP carry negative charges and repel each other, but cellular enzymes barely recognise free ATP, only its shape once bound to Mg²⁺.
Contract · Ca²⁺ release from SR When an action potential reaches the T-tubule, the SR floods the cytoplasm with stored Ca²⁺, which binds troponin C and makes the fibre contract.
Story path
Chapter 1
Greener foods, more magnesium
Green and magnesium go together. At the center of every chlorophyll molecule sits a magnesium ion (Mg²⁺), held by a ring-shaped structure called a porphyrin that grips it like pincers (chemists call this chelation), much as hemoglobin grips iron and vitamin B12 grips cobalt. So leafy greens always bring some magnesium with them. Weight for weight, though, the densest sources are seeds and nuts such as pumpkin seeds; the strength of dark leafy greens is that people eat them often.
The US Recommended Dietary Allowance () is 320 mg a day for women and 420 mg for men, counting food and supplements together.
Going further: which foods carry the most magnesium, why modern diets run short, and why a blood test cannot tell you your magnesium status.
Clinical · Why serum magnesium misleads
The serum magnesium on a routine blood panel says almost nothing about whether your body has enough magnesium.The reason is where magnesium lives: 99% of the body's magnesium sits inside cells and in bone, and less than 1% is in serum. That small fraction is tightly controlled; when it drifts low, the body tops it up from bone and cells. So serum magnesium can read normal while whole-body stores are already low, and by the time serum magnesium is clearly low, the deficiency is usually well established and has been going on for a while.
Tests that reflect stores better, though none of them is perfect:
Red blood cell magnesium (RBC Mg) reflects the average over the past 1–3 months and is generally considered more sensitive than serum.24-hour urine magnesium shows how much comes in and how much the kidneys hold on to.Ionized magnesium is the free, active fraction in blood, but most hospitals do not measure it.
None of them is accepted as accurate enough.
In practice: because testing is hard, some doctors simply try a period of supplementation. Data from the US National Health and Nutrition Examination Survey (NHANES) show that about 50% of Americans take in less magnesium from food than the Estimated Average Requirement (). That means low intake is common; it does not mean all of those people are deficient. For an average adult, adding 200–350 mg of elemental magnesium a day from supplements is usually safe and cheap (the top of that range is exactly the tolerable upper intake level, or , for supplemental magnesium; magnesium from food does not count toward it). After a few weeks, you watch whether sleep, cramps, constipation and energy change. Keep in mind that this kind of self-observation cannot separate the effect of magnesium from expectation (the placebo effect) or from time itself.
People with chronic kidney disease ( stages 3–5) should not supplement on their own. Magnesium leaves the body through the kidneys, and when kidney function is poor it can build up to toxic levels. Check with your doctor first.
Numbers · Why modern diets run short
Magnesium per 100 g of some common foods:Pumpkin seeds: ~535 mg, the densest on this listCashews: ~290 mgAlmonds: ~270 mg (see Almonds)Dark chocolate (85%+): ~230 mgOats (raw): ~140 mgSpinach (cooked): ~87 mgBlack beans (cooked): ~70 mg (see Black Beans)Avocado: ~29 mgWhite rice: ~12 mg. The magnesium is in the bran, and polishing removes almost all of it (see Rice · see Quinoa · see Buckwheat)
These are amounts per 100 g, more than anyone eats at once: a small handful of pumpkin seeds (~28 g) gives about 150 mg.
Data from the US National Health and Nutrition Examination Survey (NHANES) show that about 50% of Americans take in less magnesium from food than the Estimated Average Requirement (, the intake that meets the needs of half of healthy people). Low intake is common, and that part is real. It does not mean all of those people are deficient: in healthy people, eating too little rarely leads to symptoms, because the kidneys first cut the amount of magnesium they let out in urine.
Why modern diets run short:
Refining removes the bran and germ, so white rice and white flour carry about 80% less magnesium than whole grain.Processed foods almost never put magnesium back.A figure often quoted is that soil magnesium has fallen ~20–30% over the past 50 years (too much fertilizer, single-crop farming). Where that number comes from and how it was measured are unclear, so treat it as a claim, not a finding.
Chapter 2
How magnesium is absorbed
The passive route is in the small intestine. Magnesium seeps between gut cells, through the seals that join them (tight junctions), down its concentration gradient. Most of the magnesium you absorb goes this way.
The active route is in the cecum and colon. Ion channels in the gut-cell membrane (TRPM6/7) let Mg²⁺ into the cell. When blood magnesium is low, more of these channels appear.
Together they usually absorb ~30–40% of what you eat. How much you take at once sets the fraction absorbed: at low doses (<250 mg) the active route keeps up and ~70% is absorbed; at high doses (>700 mg) the active route is saturated and the fraction falls to ~20%.
What tilts magnesium's balance:
High calcium (>2.5 g/day) competes with magnesium for absorption.Alcohol makes the kidneys excrete more magnesium.Long-term use of proton pump inhibitors (, stomach-acid–suppressing drugs), usually for more than 1 year, can cause low blood magnesium (hypomagnesemia), probably through impaired active absorption in the gut; the US FDA issued a Drug Safety Communication on it in 2011 (not a boxed warning).
Supplement form matters too: the cheapest one, magnesium oxide, is only about 4% absorbed and often causes diarrhea first.
Going further: how to choose a supplement, the molecular names of the two routes, and what in food gets in the way.
In practice · How to choose a magnesium supplement
Which magnesium supplement to pick depends on what you want it for:Magnesium citrate: moderate absorption and mildly laxative; suits people with constipation or anyone doing general repletion.Magnesium glycinate: well absorbed and usually easy on the gut, so it suits sensitive stomachs. It is often sold as the bedtime magnesium, but that reputation comes from experience, not from trials comparing forms.Magnesium malate: moderate absorption. Malate is an intermediate in the mitochondria's energy pathway, so it is often recommended for fatigue and fibromyalgia, but the human trials on this are few and small.Magnesium L-threonate: marketed as crossing the blood–brain barrier to help cognition; animal studies support this more than human ones, and it is expensive.Magnesium oxide (MgO): high in elemental magnesium (60%) but poorly absorbed (4%); cheap, and strongly laxative.Magnesium sulfate (Epsom salt): used in baths or as a laxative; the idea that a bath lets magnesium in through the skin is not well supported.Magnesium chloride: absorbed better than magnesium oxide.Magnesium aspartate: absorbed about as well as citrate; the claim that aspartate helps make is only theoretical.
Dose: 200–350 mg of elemental magnesium a day, with meals. 350 mg/day is the tolerable upper intake level () for supplemental magnesium; it counts supplements and medicines only, and magnesium from food does not count toward it. Too much causes osmotic diarrhea, which is often the first warning sign, but for people with poor kidney function it is not a safety valve. People with chronic kidney disease () should have their kidney function checked and ask their doctor before starting.
Label trap: the milligrams on the bottle may mean elemental magnesium or the weight of the whole compound, and the difference is large. A magnesium oxide label may read "500 mg magnesium oxide = 300 mg elemental magnesium", while a magnesium citrate label that also says 500 mg may hold only 80 mg of elemental magnesium. Look for the elemental magnesium figure.
Mechanism · Channel names and food traps
The two routes, by molecular name:Active (transcellular) route: in the cecum and colon, Mg²⁺ enters gut cells through two ion channels, TRPM6 and TRPM7. Their number is set by negative feedback from plasma magnesium: when blood magnesium is low, more channels appear.Passive (paracellular) route: in the small intestine, Mg²⁺ diffuses down its concentration gradient through pores in the tight junctions between cells, formed by proteins of the claudin family. The often-cited claudin-16 and -19 are the pair the kidney uses to reclaim magnesium; they are not expressed in the gut, and which claudins do the work there is still unknown.
What gets in the way in food:
Phytate (in the outer layers of grains and legumes) binds magnesium and makes it hard to absorb. A vegan diet heavy in unsoaked grains absorbs less magnesium than the food tables suggest.Oxalate (in spinach and amaranth) binds some of it too.
Chapter 3
Needed by over 300 enzymes
What it actually does:
Kinases: in almost every phosphorylation reaction, Mg²⁺ first neutralizes part of the negative charge on so the phosphate group can be handed on. Adding phosphate to proteins is one of the main ways cells pass on signals.DNA and RNA polymerases: copying and transcribing genes both need it.Ribosomes: building proteins depends on Mg²⁺ holding the structure of ribosomal RNA (rRNA) in shape.Hexokinase: the first step of sugar metabolism (glucose → glucose-6-phosphate) uses Mg-ATP.Adenylate cyclase: turning ATP into the second messenger cAMP also needs Mg²⁺.
So a magnesium shortage does not drag down one particular organ. The early symptoms (poor appetite, nausea, tiredness) are non-specific, which is why they are hard to pin down; numbness, muscle spasms and cramps, and abnormal heart rhythms appear only as the deficiency gets worse.
Clinical · Magnesium and type 2 diabetes, both ways
Magnesium and type 2 diabetes are linked in both directions, but the evidence is not equally firm on each side.Direction one: people who eat less magnesium have a higher diabetes risk
Cohort studies: in Dong 2011, a of prospective cohorts, people with the highest magnesium intake had a ~23% lower incidence of type 2 diabetes than those with the lowest. This is an observed association; it cannot show that magnesium is the cause.The mechanism is plausible: magnesium is a cofactor in the insulin-receptor phosphorylation cascade, so low magnesium weakens insulin signaling and can produce insulin resistance.
Direction two: diabetes drains magnesium, and this side's mechanism is clear
High blood glucose raises urine output (polyuria), and magnesium is lost in the urine along with it.In people with diabetes, plasma magnesium averages ~0.1–0.2 mmol/L lower than in people without it.The mechanism predicts that the two directions join into a loop: low magnesium, worse insulin resistance, higher blood glucose, more urine, more magnesium lost.
Randomized trials: the Veronese 2016 meta-analysis pooled 18 randomized trials. In people with diabetes, magnesium lowered fasting blood glucose somewhat; in people at high risk of diabetes, blood glucose 2 hours after a glucose drink improved, and a measure of insulin resistance showed only a trend toward falling. The magnesium in these trials was given under study conditions; do not go above the for supplemental magnesium on your own. The effect is small, nowhere near a glucose-lowering drug, so it can only be a supporting measure.
In practice:
Type 2 diabetes or prediabetes: bringing total magnesium intake up to the is a reasonable foundation (leafy greens, nuts, whole grains, and if needed a 200–350 mg supplement, whose top end is the UL for supplemental magnesium).People with diabetes who also take proton pump inhibitors and diuretics deserve closer attention, because both drug classes drain magnesium.Magnesium does not replace metformin or insulin; it is only an adjunct.
Mechanism · Structural roles and other enzyme families
Two more enzymes that are often named also need Mg²⁺: pyruvate dehydrogenase (the step that carries the products of sugar breakdown into the mitochondria) and glutamine synthetase.Magnesium also has structural roles, where it catalyzes nothing and simply holds a molecule's shape:
DNA and RNA double strands are stable only because Mg²⁺ shields the negative charges on their phosphate backbone.The 50S large ribosomal subunit holds ~170 Mg²⁺ ions (both the name and the figure come from structural studies of bacterial ribosomes).G proteins also need Mg²⁺ to bind GTP.
Chapter 4
Energy molecules need magnesium
Mg²⁺ carries two positive charges. It binds the last two phosphates of ATP (β and γ), neutralizes their negative charge and pulls the phosphate tail into a compact shape. That lets ATP fit precisely into an enzyme's active site, and lets the enzyme decide when the phosphate is handed over.
The body's ATP pool averages only ~50 g, yet about 60 kg cycles through it every day, roughly a person's body weight; every turn passes through an enzyme as Mg-ATP.
What this means for you:
Tiredness is one of the early symptoms of magnesium deficiency, but it is non-specific, and plenty of things make people tired. The mechanism suggests it comes from energy molecules that cannot be used smoothly, but that step has not been measured directly.Heart muscle uses a great deal of energy, and low magnesium is associated with irregular heartbeat and atrial fibrillation.Endurance athletes lose magnesium in sweat and can run low when intake does not keep up.People with diabetes lose more magnesium in urine (high blood glucose increases urine output), and insulin signaling itself needs magnesium, so each problem can make the other worse.
Clinical · Atrial fibrillation, arrhythmia and magnesium
The link between magnesium and atrial fibrillation (AF) has a plausible mechanism and moderate evidence.Mechanism: every electrical firing of a heart-muscle cell (the action potential) depends on a balance of ions, among them K⁺, Ca²⁺ and Mg²⁺. Magnesium helps hold the heart muscle's resting membrane potential steady and regulates potassium channels. When magnesium is low, heart muscle is more easily excited and repolarization (the return to rest after firing) becomes irregular, raising the risk of AF, premature ventricular contractions (PVCs), and a dangerous ventricular arrhythmia called torsade de pointes.
Randomized-trial evidence:
AF after heart surgery: about 30% of people develop AF after cardiac surgery. Earlier that pooled small trials concluded that preventive intravenous magnesium may reduce this AF, but a 2015 review noted that when only high-quality trials were counted, the preventive effect was not clear, so treat this as evidence held with moderate confidence.Persistent AF: the evidence for long-term oral magnesium is weak, and it is not a first-line treatment.PVCs and frequent premature beats: they decrease in some patients after magnesium, but the evidence is thin.
Situations where magnesium deficiency is more likely:
People on loop diuretics (such as furosemide) who have heart failure and an irregular heartbeat are commonly magnesium-deficient.People who drink heavily over the long term and have arrhythmias are often deficient too.In digoxin toxicity, magnesium and potassium usually have to be corrected first, or the arrhythmia is hard to control.
In practice:
An unexplained irregular heartbeat, together with diuretic use, a poor diet or long-term drinking, is worth asking a doctor to check plasma magnesium (and red blood cell magnesium if needed); clinically, the bar for correcting low magnesium is low.In the emergency department, intravenous magnesium is the first-line drug for torsade de pointes.For ordinary people without any of these conditions, the magnesium part is simply eating enough of it; if a supplement is needed, 200–400 mg a day by mouth. The top of that range is already past the tolerable upper intake level () for supplemental magnesium (350 mg/day, counting supplements and medicines only; magnesium from food does not count), and the part above the UL should be taken under a doctor's guidance. Intravenous-level pharmacological doses are not needed.
Chapter 5
Muscles need it to relax
During contraction, calcium is released from the muscle cell's calcium store (the sarcoplasmic reticulum); during relaxation, the SERCA pump pulls it back, spending 1 ATP-Mg²⁺ on each turn. In nerves, magnesium also guards two gates:
NMDA receptors (one kind of glutamate receptor) have their pore physically plugged by Mg²⁺ at rest. Only when the nerve cell depolarizes far enough is the magnesium pushed out, letting calcium flow in to create a signal.L-type calcium channels are also held back by magnesium. When magnesium is short, they open more easily and nerves become over-excitable.
That is why people who are truly magnesium-deficient get cramps, and cramps are one of the symptoms that appear only as deficiency worsens. The reverse inference does not hold. In healthy people, eating too little magnesium rarely leads to symptoms, because the kidneys first cut how much magnesium they let out. Common nuisances such as night-time calf cramps, eyelid twitches, teeth grinding (bruxism) and restless legs syndrome cannot simply be read as magnesium deficiency, let alone as a stalled calcium pump.
If you do supplement: a common adult amount is 200–350 mg of elemental magnesium a day (as citrate or glycinate), and 350 mg/day is exactly the for supplemental magnesium. With normal kidneys, too much usually shows up first as diarrhea; people with chronic kidney disease should not supplement on their own.
Evidence · Does magnesium before bed help sleep?
"Take magnesium before bed to sleep better" is the most popular use of magnesium in recent years. It helps to separate three things: the mechanism, the clinical evidence and the marketing.Mechanism (plausible, but mostly from the lab):
Magnesium plugs NMDA receptors and lowers brain excitability; by that mechanism, falling asleep should get easier.Magnesium strengthens the action of -A receptors, making inhibitory signals stronger. Benzodiazepine sleeping pills act on the same kind of receptor, but magnesium's effect is far milder.Cortisol rhythm: chronically low magnesium is associated with higher cortisol (an observed link), and high cortisol makes it harder to fall asleep.Melatonin synthesis: some steps of the tryptophan → → serotonin → melatonin pathway need magnesium.
Clinical evidence (limited, mainly in older adults):
One in older adults with insomnia (Abbasi 2012, n=46): 500 mg of magnesium a day for 8 weeks significantly improved the Insomnia Severity Index (ISI) and raised serum melatonin. The trial was small and needs replicating, and that dose is also above the for supplemental magnesium.Systematic review and (Mah 2021, 3 randomized trials, 151 older adults): people taking magnesium fell asleep about 17 minutes faster than on placebo; total sleep time was about 16 minutes longer, but not statistically significant. None of the trials was at low risk of bias, and the authors rated the evidence low to very low quality.Healthy younger adults: there are few studies, and the improvements seen were limited.
Dose and form:
Magnesium glycinate, 200–350 mg elemental (the top of that range is exactly the UL for supplemental magnesium): the most common "bedtime magnesium"; some hold that glycine itself is mildly sedating.Magnesium L-threonate: marketed as crossing the blood–brain barrier; there are animal data but few human data.Magnesium citrate: cheap, but laxative.Magnesium oxide: poorly absorbed; not recommended.
In practice: for someone whose intake is low and who sleeps badly, trying magnesium is low-risk, cheap and mechanistically plausible, but do not expect the effect of a sleeping pill. If the insomnia comes mainly from anxiety or long-term stress, magnesium is at most an adjunct.
Clinical · What else magnesium is tied to
Magnesium is linked to a few other conditions, and the strength of the evidence varies widely:Migraine: people with migraine tend to have lower magnesium in serum and tissue, and some studies have also found low magnesium in cerebrospinal fluid during attacks; these are observed associations. For prevention, the migraine-prevention guideline of the American Academy of Neurology (AAN) and the American Headache Society (AHS) rates magnesium as probably effective, based on a few small, short-term placebo-controlled trials that saw attacks become somewhat less frequent. The doses used in studies are usually above the for supplemental magnesium, so it should be taken under a doctor's guidance.Premenstrual syndrome (PMS): there are reports of less swelling (edema) and irritability after supplementation, but the studies are few and small, and not enough to draw a conclusion.Type 2 diabetes: insulin resistance and low magnesium are tied together. Diabetes drains magnesium through the urine, and low magnesium intake is associated with a higher risk of diabetes.Hypertension: of randomized trials show that supplementation lowers systolic blood pressure by 2–4 mmHg, a small effect.Night leg cramps: a Cochrane systematic review of cramp trials, mostly in older adults, found that magnesium is unlikely to give clinically meaningful protection; trials of cramps in pregnancy conflict.
Chapter 6
Works with vitamin D
CYP2R1 in the liver (25-hydroxylation)CYP27B1 in the kidney (1α-hydroxylation)
A review holds that all the enzymes that metabolize vitamin D appear to need magnesium as a cofactor. The downstream steps, from the protein that carries D in the blood () to the vitamin D receptor (), also involve Mg-; this rests mainly on mechanistic reasoning.
So when magnesium is severely low, even large doses of D are activated slowly. Observations and proposals:
In people with severe magnesium deficiency, even high-dose D may fail to raise blood , or raise it only slowly.It has been proposed that giving D to someone who is magnesium-deficient raises the risk of high blood calcium (hypercalcemia); this is mechanistic reasoning that has not been measured directly.Some argue that when older adults are treated for osteoporosis, adding magnesium to D, calcium and improves more; the case rests mainly on mechanistic reasoning.
Some use this to explain why people reach an adequate vitamin D level on a blood test yet feel no better: the number is there, but activation may be slowed by low magnesium. That step has not been measured directly either.
In practice: while taking D, bring total magnesium intake, mainly from food, into the range (~300–400 mg/day), keeping the supplement part within the . People with impaired kidney function are the exception, since their magnesium excretion is affected.
In practice · Pairing magnesium with vitamin D
Taking magnesium alongside vitamin D is a commonly recommended pairing. Typical combinations:1000–2000 /day with 200–300 mg/day of magnesium (elemental): suits most adults as a winter top-up.D3 4000 IU/day with 300–400 mg/day of magnesium: for the correction phase of severe D deficiency, under a doctor's guidance. The top of that magnesium range is above the for supplemental magnesium (350 mg/day, counting supplements and medicines only).D3, and magnesium together: some give this trio to older adults, to people whose bone mass is close to osteoporosis, and to people at high cardiovascular risk. It is a common practice, not a guideline recommendation.
A few details:
Take D with a meal that contains some fat, since it is fat-soluble and absorbs better that way; take magnesium with meals to reduce stomach upset.Some advise against putting D and magnesium in the same pill, because one is fat-soluble and the other water-soluble; but whether you take them together or apart makes little difference.D in the morning and magnesium glycinate in the evening is what some experts do. The reasons given are that D absorbs better in the morning, in step with the body clock, and that glycinate at bedtime helps sleep. Both reasons rest more on experience than on evidence.
When not to supplement on your own:
Chronic kidney disease () stage 3 or above: magnesium clearance is impaired and it can build up.Taking digoxin: magnesium affects how the drug works, so this needs a doctor's guidance.Chronic diarrhea: magnesium (especially citrate or oxide) can make it worse.
A common experience: people who have taken D for months without noticing anything, and who also tire easily, get cramps or sleep badly, often say they feel subjectively better within 1–2 weeks of adding magnesium. That kind of impression cannot separate the effect of magnesium from expectation or from time itself, and tiredness, cramps and poor sleep have many other causes. It may be part of the answer to "why does taking D do nothing for some people?", but it is not a conclusion.
References · 5
- National Institutes of Health, Office of Dietary Supplements. (2022). Magnesium — Fact Sheet for Health Professionals. ods.od.nih.gov/factsheets/Magnesium-HealthProfessional
- Volpe, S. L. (2013). Magnesium in disease prevention and overall health. Advances in Nutrition, 4(3), 378S–383S. 10.3945/an.112.003483
- Institute of Medicine. (1997). Dietary Reference Intakes for Calcium, Phosphorus, Magnesium, Vitamin D, and Fluoride. National Academies Press. www.ncbi.nlm.nih.gov/books/NBK109825
- de Baaij, J. H. F., Hoenderop, J. G. J., & Bindels, R. J. M. (2015). Magnesium in man: implications for health and disease. Physiological Reviews, 95(1), 1–46. 10.1152/physrev.00012.2014
- Uwitonze, A. M., & Razzaque, M. S. (2018). Role of magnesium in vitamin D activation and function. Journal of the American Osteopathic Association, 118(3), 181–189. 10.7556/jaoa.2018.037