Here’s what you should know about how much magnesium you need every day, where to get it, and when you should think about taking magnesium supplements. As an ionic or “charged” particle, magnesium is an important electrolyte that supports optimal nerve and muscle function, including involuntary muscles like the heart. It may help lower blood pressure. In fact, one study found that participants who received additional magnesium through a supplement of about 300 milligrams (mg) per day for three months increased their blood levels of the mineral and reduced their systolic blood pressure (the top reading of a blood pressure reading) by two points and diastolic blood pressure (the bottom number on that reading) by 1.78 points. (2) Magnesium — along with other nutrients like chromium — also helps regulate blood sugar. Magnesium intake has been shown to improve insulin sensitivity and may be useful for the prevention and management of type 2 diabetes. (3) The human body needs adequate magnesium to support immunity and turn food into energy. What’s more, magnesium helps the body absorb other essential minerals, including calcium and potassium — meaning it plays a role in all the functions that those minerals support, such as maintaining bone health. You may also be surprised to learn that magnesium is the third most prevalent mineral in human bones, after calcium and phosphorus — and 60 percent of the magnesium in the body is stored in the skeleton. (1)

Ages 14 to 18 360 mg/dayAges 19 to 30 310 mg/dayWomen 31 and older 320 mg/day

Ages 14 to 18 410 mg/dayAges 19 to 30 400 mg/dayAges 31 and older 420 mg/day

Up to 6 months old 30 mg/day6 to 12 months 75 mg/day

Ages 1 to 3 80 mg/dayAges 4 to 8 130 mg/dayAges 9 to 13 240 mg/day

Spinach 78 mg per ½ cup boiledCashews 74 mg per 1 ounce (oz) dry roastedBlack beans 60 mg per ½ cup cookedEdamame 50 mg per ½ cup cooked and shelledSalmon 24 mg per 3 oz cookedPeanut butter 49 mg per 2 tablespoonsWhole-wheat bread 46 mg per 2 slicesSome brands of mineral water (check labels, amounts vary greatly) 1 mg per liter to 120 mg per liter

The above list includes good sources not only of magnesium, but also phytonutrients, which are plant chemicals that promote health and immunity. Refining and processing foods depletes naturally occurring magnesium, so as usual, it is best to opt for minimally processed sources. Other foods with magnesium include:

YogurtBananasAvocadosPotatoesMilkRaisins

Learn More About Foods High in Magnesium Blood tests, however, are not a valid measure of overall magnesium stores, since we store most of the mineral in our bones. Some researchers believe many cases of chronic magnesium deficiency go undiagnosed. (1) This type of unrecognized deficiency is problematic because it may contribute to many common medical conditions, including cardiovascular disease, diabetes, and osteoporosis. (4)

Alcohol abuseAdvanced ageCrohn’s or celiac disease, which can prevent proper nutrient absorption in the bodyDiabetes and taking medication for diabetesCertain medications that deplete magnesium, including some diuretics, proton pump inhibitors, and antibiotics

Learn More About Signs and Symptoms of Magnesium Deficiency

Preventing High Blood Pressure, Heart Disease, and Stroke

“Your heart is essentially a large muscle,” says Olivia Wagner, RDN an integrative registered dietitian nutritionist in Chicago. Magnesium works in tandem with calcium to support blood pressure, and it also may balance lipid levels, all of which helps promote healthy heart function, she says. A 2016 study found a link between low serum magnesium levels and both coronary heart disease (CHD) and sudden cardiac death. But it remains unclear exactly why the relationship exists or if supplementing with magnesium would lower the risk of either. (7) Several studies have associated healthy levels of magnesium in the diet with a lower incidence of stroke, but because much of the research on both CHD and stroke is from observational studies, this is just an association; more data are needed from randomized clinical trials to determine if higher magnesium levels directly reduce the risk of these conditions. (8) RELATED: The 6 Best Nutrient Pairings for Your Heart

Preventing or Managing Type 2 Diabetes

A 2015 review of observational research on magnesium and type 2 diabetes suggests that adequate magnesium intake may lower the risk of the disease, because people who get enough magnesium in their diets seem to have a lower incidence of this chronic health problem. (9) “If you’ve been diagnosed with insulin resistance or prediabetes, then taking extra magnesium may really help you,” says Robin Foroutan, RDN, who specializes in integrative and functional medicine at the Morrison Center in New York City. Furthermore, if you have diabetes, magnesium supplementation may also help keep you healthy. Having type 2 diabetes raises your risk for heart disease, but people with a higher blood level of magnesium are less likely to develop coronary heart disease. (10) RELATED: What You Need to Know About Magnesium and Type 2 Diabetes

Maintaining Bone Health and Preventing Osteoporosis

Magnesium is essential for bone formation, says Foroutan. It also indirectly affects bone density because it is part of the system that regulates the important bone nutrients calcium and vitamin D. Thus, it is important to get enough magnesium to support your skeleton. As a study on middle-aged and older adults suggests, consuming magnesium-rich foods may play an important role in preventing diseases like osteoporosis and bone fracture. (11)

Easing Migraine

In the few clinical trials conducted, magnesium helped lower the frequency, duration, and severity of migraine. (12) The therapeutic dose for migraine treatment is well above the recommended maximum from supplements, so it is safest to seek the help of a healthcare professional for advice and monitoring. Still, Foroutan says that for some people with migraine who aren’t actually low in magnesium, megadoses (excess magnesium) may be helpful in inhibiting attacks. Learn More About the Health Benefits of Magnesium Still, some healthcare professionals believe that much of the public has what’s called “subclinical magnesium deficiency,” which means that a person runs chronically low in the mineral but not low enough to be defined as deficient. There may be several factors at work in this widespread deficiency, including lack of nutrients in soil and an excess intake of processed foods, which are stripped of minerals. (2) If you’re dealing with certain symptoms that might suggest you’re running low in magnesium — frequent headaches, muscle cramping at night or with exercise, fatigue, or constipation — you may benefit from a magnesium supplement, says Wagner. Talk to a healthcare professional to see what’s right for you. While your kidneys do flush out excess magnesium (it is a water-soluble mineral), getting too much of the mineral from supplements can cause diarrhea (often accompanied by nausea and abdominal cramping) — and in very large doses can cause more serious problems like retention of urine, difficulty breathing, irregular heartbeat, and cardiac arrest. Those more serious consequences have resulted from magnesium doses exceeding 5,000 mg per day. (1) People with acid reflux who take proton pump inhibitor medications for more than one year are at risk for low magnesium levels. The U.S. Food and Drug Administration warns that even magnesium supplements didn’t raise levels enough in these people. (13) Because extra magnesium is eliminated by your kidneys, anyone who has renal impairment should not take supplements without discussing it with a healthcare provider. Likewise, anyone taking certain medications, including bisphosphonates, antibiotics, diuretics, or proton pump inhibitors should be aware of possible adverse drug-nutrient interactions. Be sure to speak with your healthcare team before starting this or any other supplement. The types of magnesium most likely to cause diarrhea are magnesium carbonate, chloride, gluconate, and oxide, according to past research. (14) Keep in mind that supplements can be a natural way to relieve constipation due to their laxative effect. Magnesium threonate is a form of magnesium that may pass into the brain more efficiently, thus both Wagner and Foroutan use it when addressing mood, sleep, and cognition issues. Additional reporting by Jessica Migala.