Genes that Impact Magnesium Levels

Research shows that about 50% of us don’t get enough magnesium on a daily basis.[ref] Some people genetically are more likely to be deficient than others, based on genetic variants that impact magnesium absorption. Understanding your genes can help you decide whether you may need more magnesium in your diet or via supplements.

What does magnesium do in the body?

Magnesium is a cofactor for more than 300 different enzymatic reactions. It means that many biochemical reactions in the body need both an enzyme and magnesium for the reaction to occur at the proper rate. Without enough magnesium (or without the required enzymes), some cellular reactions just won’t happen.

One of the reactions that magnesium is crucial for is the synthesis of DNA and RNA, as well as the metabolism of ATP.[ref] As you can imagine, magnesium is essential for life and the proper functioning of the body.

What are the signs of low magnesium?

Low magnesium levels are referred to as hypomagnesemia.

Research shows that common problems associated with hypomagnesemia include:[ref][ref]

  • migraines
  • ADHD
  • strokes
  • high blood pressure
  • insulin resistance
  • neurodegenerative diseases.
  • muscle weakness
  • twitches
  • tremors
  • heart arrhythmia or palpitations
  • seizures

In a nutshell, low magnesium shows up in physiological issues with the brain, heart, or skeletal muscles.

One study explains: “magnesium is essential for the regulation of muscular contraction, blood pressure, insulin metabolism, cardiac excitability, vasomotor tone, nerve transmission and neuromuscular conduction. Imbalances in magnesium status…might result in unwanted neuromuscular, cardiac or nervous disorders. Based on magnesium’s many functions within the human body, it plays an important role in prevention and treatment of many diseases.”[ref]

How do we maintain normal magnesium levels?

Your body stores magnesium in the bones (53%), muscles (27%), and soft tissues (19%). That leaves only about 1% of your total magnesium circulating in the blood.[ref]

The body tightly controls serum magnesium levels. While lab ranges can vary a little bit, the normal range for an adult is around 1.3 to 2.1 mEq/L (0.65 to 1.05 mmol/L or 1.5 to 2.6 mg/dL).[ref]

Hypomagnesemia is the term for low magnesium, which is usually defined as under 1.5 mg/dL on a lab test.[ref]

We take in magnesium from food and mineral-rich drinks. Magnesium is absorbed in the intestines. It circulates in the bloodstream and is taken up by cells as needed. The kidneys reabsorb serum magnesium so that only a small percentage is lost in urine.[ref]

Low magnesium levels can be caused by:[ref]

  • losing too much magnesium in the urine (e.g., uncontrolled diabetes)
  • chronic diarrhea
  • malabsorption disorders (e.g., celiac, IBD)
  • bones taking up too much magnesium (e.g., following thyroid removal)
  • alcoholism
  • chronic pancreatitis

Both diet and genetics play a role in your magnesium levels. Everyone needs to consume enough magnesium, but the exact amount you need depends, in part, on your genes.

Below is a diagram showing some of the factors in magnesium absorption. We’ll first dig into the genetic factors and then return to the ‘exogenous’ factors in detail in the lifehacks section.

diagram showing how magnesium is absorbed in the intestines from PMC5652077
Absorption of magnesium in the intestines. Creative Commons PMC5652077 (good overview article)

TRPM6 and TRPM7: Magnesium uptake

The TRPM6 and TRPM7 genes encode ion channels that transport magnesium ions across cell membranes. These ion channels can also transport calcium or other ions, but they are primarily involved in magnesium uptake.

Magnesium absorption occurs in the body in two ways:

  • Passive absorption in the intestines using an ion gradient to diffuse into intestinal cells
  • Active transports into intestinal cells using TRPM6 ion channels

The majority of magnesium uptake is via passive absorption in the small intestines. When the body’s magnesium levels aren’t met by passive transport, the TRPM6 ion channel is used to fine-tune the absorption.[ref]

Within the body, magnesium can be taken into cells and utilized as needed. The ion channel TRPM7 regulates the cellular uptake of magnesium. TRPM7 is found in tissues throughout the body and is essential for life. When magnesium levels drop within a cell, it activates the TRPM7 channel to take in more magnesium via this ion channel.[ref][ref][ref]

The TRPM6 ion channel is found in the cells lining the intestines, kidneys, and placenta. This ion channel is thought to dial in the right amount of magnesium absorption in the intestines and may play a role in the reabsorption of magnesium in the kidneys.[ref] Magnesium, via the TRPM6 ion channel, affects blood pressure regulation in the kidneys.[ref]

The TRPM7 ion channel is found in multiple tissues, including the heart and brain. In the heart, TRPM7 is integral in maintaining the heart’s rhythm, along with other ion channels.[ref][ref] Oxidative stress caused by higher intracellular levels of hydrogen peroxide can inhibit the TRPM7 channel.[ref]

CNNM2 and Magnesium Reabsorption:

The body tightly controls magnesium through both the amount absorbed in the intestines and the reabsorption of magnesium in the kidneys. The cyclin M2 (CNNM2) gene encodes a magnesium transporter in the kidneys. When magnesium levels are high in the body, more magnesium is transported out via the urine. Similarly, when magnesium levels are trending lower, more magnesium is reabsorbed. This process is controlled, in part, by the availability of the CNNM2 magnesium transporter.

Rare mutations that cause a deficiency of CNNM2 result in too much magnesium being excreted in the kidneys, which is linked to a loss of circadian rhythm in blood pressure control.[ref] Rare mutations in CNNM2 are also linked to brain development disorders due to dysregulation of magnesium.[ref]

Magnesium and calcium levels interact through several regulatory mechanisms. Mutations in CNNM2 can show up as calcium dysregulation along with the effect on magnesium.[ref]

Genetic Variants that Impact Magnesium:

Check out the genetic variants below to see how some of your genes may influence your need for magnesium.

Members: Log in to see your data below.
Not a member? Join Here.
Membership lets you see your data right in each article and also gives you access to the members’ only information in the Lifehacks sections.


TRPM6 variants:

TRPM6 encodes the ion transporter that regulates magnesium uptake in the intestines and impacts magnesium reabsorption in the kidneys.

Check your genetic data for rs3750425 (23andMe v4, v5; AncestryDNA):

  • C/C: typical
  • C/T: lower serum magnesium levels; increased risk of hypomagnesia with proton pump inhibitors; increased risk of type 2 diabetes if magnesium intake is low
  • T/T: lower serum magnesium levels[ref]; increased risk of hypomagnesia with proton pump inhibitors[ref]; increased risk of type 2 diabetes if magnesium intake is low[ref]

Members: Your genotype for rs3750425 is

Check your genetic data for rs2274924 (23andMe v4; AncestryDNA):

  • C/C: lower magnesium levels on average; increased susceptibility to epilepsy post-stroke[ref] increased risk of hypomagnesia with proton pump inhibitors[ref]; increased risk of t2D if magnesium intake is low[ref]
  • C/T: lower magnesium levels, on average; increased risk of hypomagnesia with proton pump inhibitors;
  • T/T: typical

Members: Your genotype for rs2274924 is

Check your genetic data for rs121912625 (23andMe v5; AncestryDNA):

  • A/G: rare mutation linked to hypomagnesia[ref]
  • G/G: typical

Members: Your genotype for rs121912625 is

TRPM7 genetic variants:

The TRPM7 gene encodes an ion transporter that moves magnesium into cells throughout the body.

Check your genetic data for rs8042919 T1482I (23andMe v4; AncestryDNA):

  • A/A: increased sensitivity to low magnesium levels, possibly increased risk of ALS or Parkinson’s with long-term low magnesium and calcium intake[ref]
  • A/G: increased sensitivity to low magnesium levels, possibly increased risk of ALS or Parkinson’s with long-term low magnesium and calcium intake
  • G/G: typical

Members: Your genotype for rs8042919 is

CNNM2 genetic variants:

The CNNM2 gene encodes a transporter in the kidneys that is important in magnesium reabsorption and maintaining normal Mg levels.[ref] Genetic variants in this gene are linked to changes in magnesium levels which influence brain development and blood pressure.

Check your genetic data for rs12413409 (23andMe v4, v5; AncestryDNA):

  • A/A: decreased risk of hypertension[ref] decreased risk of coronary artery disease[ref] decreased risk of aneurysm[ref]
  • A/G: decreased risk of hypertension;
  • G/G: typical

Members: Your genotype for rs12413409 is

Check your genetic data for rs11191548 (23andMe v4, v5; AncestryDNA):

  • T/T: typical
  • C/T: decreased risk of hypertension; higher levels of 25(OH)D
  • C/C: decreased risk of hypertension[ref]; higher levels of 25(OH)D[ref] possibly decreased risk of orthostatic hypertension[ref]

Members: Your genotype for rs11191548 is

Check your genetic data for rs7914558 (23andMe v5; AncestryDNA)

  • A/A: decreased gray matter (on average)[ref] possibly altered neural systems relevant to social cognition, increased risk of schizophrenia[ref]
  • A/G: common genotype
  • G/G: typical

Members: Your genotype for rs7914558 is


The RDA for magnesium is 320 mg for women and 420 mg for men. is a free web app where you can track your daily food intake. Keep track for a few days and see what you are averaging for magnesium as a baseline from foods.

Water accounts for about 10% of magnesium intake in a day. If you are drinking water with the minerals filtered out, you may need to increase the amount of magnesium you get from other sources.

Drinking too much water can lead to low magnesium levels due to excessive urination. Excessive sweating, such as exercising in the heat or using a sauna, can also lead to low magnesium levels, usually temporary.

Drug interactions:

Medications can cause you to have low magnesium levels:[ref]

  • diuretics
  • proton pump inhibitors
  • aminoglycoside antibiotics
  • digitalis
  • calcineurin inhibitors
  • certain chemo drugs

Talk with your doctor or pharmacist if you have questions about whether medications could decrease your magnesium levels.

Food sources of magnesium:

Taken from the NIH Health Information fact sheet:

Food Mg/serving % RDA
Pumpkin seeds, roasted, 1 ounce 156 37
Chia seeds, 1 ounce 111 26
Almonds, dry roasted, 1 ounce 80 19
Spinach, boiled, ½ cup 78 19
Cashews, dry roasted, 1 ounce 74 18
Peanuts, oil roasted, ¼ cup 63 15
Cereal, shredded wheat, 2 large biscuits 61 15
Soymilk, plain or vanilla, 1 cup 61 15
Black beans, cooked, ½ cup 60 14
Edamame, shelled, cooked, ½ cup 50 12
Peanut butter, smooth, 2 tablespoons 49 12
Potato, baked with skin, 3.5 ounces 43 10
Rice, brown, cooked, ½ cup 42 10
Yogurt, plain, low fat, 8 ounces 42 10
Breakfast cereals, fortified with 10% of the DV for magnesium, 1 serving 42 10
Oatmeal, instant, 1 packet 36 9
Kidney beans, canned, ½ cup 35 8
Banana, 1 medium 32 8
Salmon, Atlantic, farmed, cooked, 3 ounces 26 6
Milk, 1 cup 24–27 6
Halibut, cooked, 3 ounces 24 6

Supplemental forms of magnesium:

The rest of this article is for Genetic Lifehacks members only. Consider joining today to see the rest of this article.

This section of the article is only available to Genetic Lifehacks members.

Not a member? Join Now.

Member Benefits:

Read this Member's Only section.

See your genotype in each article.

Print out topic summary reports.

Related Articles and Topics:

COMT – Genetic Connections to Neurotransmitter Levels
Having trouble with supplements containing methyl groups? Wondering why your neurotransmitters are out of balance? It could be due to your COMT genetic variants. This important enzyme is tasked with breaking down neurotransmitters, such as dopamine.

Mast cells: MCAS, genetics, and solutions
Mast Cell Activation Syndrome, or MCAS, is a recently recognized disease involving mast cells that misbehave in various ways. Symptoms of MCAS can include abdominal pain, nausea, itching, flushing, hives, headaches, heart palpitations, anxiety, brain fog, and anaphylaxis. Dive into the research into mast cells, genetics, and solutions.

Top 10 Genes to Check in Your Genetic Raw Data
Wondering what is actually important in your genetic data? These ten genes have important variants with a significant impact on health. Check your genes (free article).


Abbasi, Behnood, et al. “The Effect of Magnesium Supplementation on Primary Insomnia in Elderly: A Double-Blind Placebo-Controlled Clinical Trial.” Journal of Research in Medical Sciences : The Official Journal of Isfahan University of Medical Sciences, vol. 17, no. 12, Dec. 2012, pp. 1161–69. PubMed Central,

Arjona, Francisco J., et al. “CNNM2 Mutations Cause Impaired Brain Development and Seizures in Patients with Hypomagnesemia.” PLoS Genetics, vol. 10, no. 4, Apr. 2014, p. e1004267. PubMed,

Cho, Seong-Beom, and Jinhwa Jang. “A Genome-Wide Association Study of a Korean Population Identifies Genetic Susceptibility to Hypertension Based on Sex-Specific Differences.” Genes, vol. 12, no. 11, Nov. 2021, p. 1804. PubMed Central,

ELDerawi, Wafaa A., et al. “The Effects of Oral Magnesium Supplementation on Glycemic Response among Type 2 Diabetes Patients.” Nutrients, vol. 11, no. 1, Dec. 2018, p. 44. PubMed Central,

Fedorowski, Artur, et al. “Orthostatic Hypotension and Novel Blood Pressure-Associated Gene Variants: Genetics of Postural Hemodynamics (GPH) Consortium.” European Heart Journal, vol. 33, no. 18, Sept. 2012, pp. 2331–41. PubMed,

Fine, K. D., et al. “Intestinal Absorption of Magnesium from Food and Supplements.” Journal of Clinical Investigation, vol. 88, no. 2, Aug. 1991, pp. 396–402. PubMed Central,

Firoz, M., and M. Graber. “Bioavailability of US Commercial Magnesium Preparations.” Magnesium Research, vol. 14, no. 4, Dec. 2001, pp. 257–62.

Franken, Gijs A. C., et al. “Cyclin M2 (CNNM2) Knockout Mice Show Mild Hypomagnesaemia and Developmental Defects.” Scientific Reports, vol. 11, no. 1, Apr. 2021, p. 8217. PubMed,

Fu, Chuan-Yi, et al. “Increased Risk of Post-Stroke Epilepsy in Chinese Patients with a TRPM6 Polymorphism.” Neurological Research, vol. 41, no. 4, Apr. 2019, pp. 378–83. PubMed,

Funato, Yosuke, et al. “Importance of the Renal Ion Channel TRPM6 in the Circadian Secretion of Renin to Raise Blood Pressure.” Nature Communications, vol. 12, June 2021, p. 3683. PubMed Central,

García-Castaño, Alejandro, et al. “Novel Variant in the CNNM2 Gene Associated with Dominant Hypomagnesemia.” PloS One, vol. 15, no. 9, 2020, p. e0239965. PubMed,

Gragossian, Alin, et al. “Hypomagnesemia.” StatPearls, StatPearls Publishing, 2022. PubMed,

Gröber, Uwe, et al. “Magnesium in Prevention and Therapy.” Nutrients, vol. 7, no. 9, Sept. 2015, pp. 8199–226. PubMed Central,

Gwanyanya, Asfree, et al. “Modulation of the Cardiac Myocyte Action Potential by the Magnesium-Sensitive TRPM6 and TRPM7-like Current.” International Journal of Molecular Sciences, vol. 22, no. 16, Aug. 2021, p. 8744. PubMed Central,

Hermosura, Meredith C., et al. “A TRPM7 Variant Shows Altered Sensitivity to Magnesium That May Contribute to the Pathogenesis of Two Guamanian Neurodegenerative Disorders.” Proceedings of the National Academy of Sciences of the United States of America, vol. 102, no. 32, Aug. 2005, pp. 11510–15. PubMed Central,

Hess, Mark W., et al. “Common Single Nucleotide Polymorphisms in Transient Receptor Potential Melastatin Type 6 Increase the Risk for Proton Pump Inhibitor-Induced Hypomagnesemia: A Case-Control Study.” Pharmacogenetics and Genomics, vol. 27, no. 3, Mar. 2017, pp. 83–88. PubMed,

Holloway, Leah, et al. “Effects of Oligofructose-Enriched Inulin on Intestinal Absorption of Calcium and Magnesium and Bone Turnover Markers in Postmenopausal Women.” The British Journal of Nutrition, vol. 97, no. 2, Feb. 2007, pp. 365–72. PubMed,

Inoue, Hana, et al. “The Zinc-Binding Motif of TRPM7 Acts as an Oxidative Stress Sensor to Regulate Its Channel Activity.” The Journal of General Physiology, vol. 153, no. 6, May 2021, p. e202012708. PubMed Central,

Jiang, Zhong-Jiao, et al. “TRPM7 Is Critical for Short-Term Synaptic Depression by Regulating Synaptic Vesicle Endocytosis.” ELife, vol. 10, p. e66709. PubMed Central, Accessed 25 Apr. 2022.

Kandil, Manar, et al. “MAGraine: Magnesium Compared to Conventional Therapy for Treatment of Migraines.” The American Journal of Emergency Medicine, vol. 39, Jan. 2021, pp. 28–33. PubMed Central,

“Low Magnesium Level Information | Mount Sinai – New York.” Mount Sinai Health System, Accessed 25 Apr. 2022.

Luongo, Francesca, et al. “TRPM6 Is Essential for Magnesium Uptake and Epithelial Cell Function in the Colon.” Nutrients, vol. 10, no. 6, June 2018, p. 784. PubMed Central,

Ohi, Kazutaka, et al. “The Impact of the Genome-Wide Supported Variant in the Cyclin M2 Gene on Gray Matter Morphology in Schizophrenia.” Behavioral and Brain Functions: BBF, vol. 9, Oct. 2013, p. 40. PubMed,

Pouteau, Etienne, et al. “Superiority of Magnesium and Vitamin B6 over Magnesium Alone on Severe Stress in Healthy Adults with Low Magnesemia: A Randomized, Single-Blind Clinical Trial.” PloS One, vol. 13, no. 12, 2018, p. e0208454. PubMed,

Rose, Emma Jane, et al. “Effects of a Novel Schizophrenia Risk Variant Rs7914558 at CNNM2 on Brain Structure and Attributional Style.” The British Journal of Psychiatry: The Journal of Mental Science, vol. 204, no. 2, Feb. 2014, pp. 115–21. PubMed,

Rs121912625 RefSNP Report – DbSNP – NCBI. Accessed 25 Apr. 2022.

Sadir, Sadia, et al. “Neurobehavioral and Biochemical Effects of Magnesium Chloride (MgCl2), Magnesium Sulphate (MgSO4) and Magnesium-L-Threonate (MgT) Supplementation in Rats: A Dose Dependent Comparative Study.” Pakistan Journal of Pharmaceutical Sciences, vol. 32, no. 1(Supplementary), Jan. 2019, pp. 277–83.

Sah, Rajan, et al. “Ion Channel-Kinase TRPM7 Is Required for Maintaining Cardiac Automaticity.” Proceedings of the National Academy of Sciences of the United States of America, vol. 110, no. 32, Aug. 2013, pp. E3037–46. PubMed Central,

Saraç, Mehmet, et al. “Magnesium-Permeable TRPM6 Polymorphisms in Patients with Meningomyelocele.” SpringerPlus, vol. 5, no. 1, 2016, p. 1703. PubMed,

Schuchardt, Jan Philipp, and Andreas Hahn. “Intestinal Absorption and Factors Influencing Bioavailability of Magnesium-An Update.” Current Nutrition and Food Science, vol. 13, no. 4, Nov. 2017, pp. 260–78. PubMed Central,

Schunkert, Heribert, et al. “Large-Scale Association Analyses Identifies 13 New Susceptibility Loci for Coronary Artery Disease.” Nature Genetics, vol. 43, no. 4, Mar. 2011, pp. 333–38. PubMed Central,

Song, Yiqing, et al. “Common Genetic Variants of the Ion Channel Transient Receptor Potential Membrane Melastatin 6 and 7 (TRPM6 and TRPM7), Magnesium Intake, and Risk of Type 2 Diabetes in Women.” BMC Medical Genetics, vol. 10, Jan. 2009, p. 4. PubMed,

Tahiri, M., et al. “Five-Week Intake of Short-Chain Fructo-Oligosaccharides Increases Intestinal Absorption and Status of Magnesium in Postmenopausal Women.” Journal of Bone and Mineral Research: The Official Journal of the American Society for Bone and Mineral Research, vol. 16, no. 11, Nov. 2001, pp. 2152–60. PubMed,

Tseng, Min-Hua, et al. “Clinical and Genetic Approach to Renal Hypomagnesemia.” Biomedical Journal, Nov. 2021. ScienceDirect,

Uysal, Nazan, et al. “Timeline (Bioavailability) of Magnesium Compounds in Hours: Which Magnesium Compound Works Best?” Biological Trace Element Research, vol. 187, no. 1, Jan. 2019, pp. 128–36. PubMed,

Vink, Robert. “Magnesium in the CNS: Recent Advances and Developments.” Magnesium Research, vol. 29, no. 3, Mar. 2016, pp. 95–101. PubMed,

Voets, Thomas, et al. “TRPM6 Forms the Mg2+ Influx Channel Involved in Intestinal and Renal Mg2+ Absorption.” The Journal of Biological Chemistry, vol. 279, no. 1, Jan. 2004, pp. 19–25. PubMed,

Walker, Ann F., et al. “Mg Citrate Found More Bioavailable than Other Mg Preparations in a Randomised, Double-Blind Study.” Magnesium Research, vol. 16, no. 3, Sept. 2003, pp. 183–91.

Wang, Jun, et al. “Magnesium L-Threonate Prevents and Restores Memory Deficits Associated with Neuropathic Pain by Inhibition of TNF-α.” Pain Physician, vol. 16, no. 5, Oct. 2013, pp. E563-575.

Wei, Bi-Liu, et al. “CYP17A1–ATP2B1 SNPs and Gene–Gene and Gene–Environment Interactions on Essential Hypertension.” Frontiers in Cardiovascular Medicine, vol. 8, Oct. 2021, p. 720884. PubMed Central,

Yasuno, Katsuhito, et al. “Genome-Wide Association Study of Intracranial Aneurysm Identifies Three New Risk Loci.” Nature Genetics, vol. 42, no. 5, May 2010, pp. 420–25. PubMed Central,

Zhang, Ning, et al. “Common Variant Rs11191548 near the CYP17A1 Gene Is Associated with Hypertension and the Serum 25(OH) D Levels in Han Chinese.” Journal of Human Genetics, vol. 63, no. 6, June 2018, pp. 731–37. PubMed,

Zhang, Zheng, et al. “The TRPM6 Kinase Domain Determines the Mg·ATP Sensitivity of TRPM7/M6 Heteromeric Ion Channels.” The Journal of Biological Chemistry, vol. 289, no. 8, Feb. 2014, pp. 5217–27. PubMed Central,

About the Author:
Debbie Moon is the founder of Genetic Lifehacks. Fascinated by the connections between genes, diet, and health, her goal is to help you understand how to apply genetics to your diet and lifestyle decisions. Debbie has a BS in engineering and an MSc in biological sciences from Clemson University. Debbie combines an engineering mindset with a biological systems approach to help you understand how genetic differences impact your optimal health.