NutritionVitamins and Minerals

What foods are high in magnesium?

Written by

Anna Roell
6 June, 2023

Medically checked article All HOMED-IQ content is reviewed by medical specialists

Magnesium is an important mineral that plays a crucial role in maintaining good health and proper functioning of the human body. In fact, magnesium participates in over 300 enzymatic reactions, influencing many different biological processes (NIH, 2022). Through a balanced diet, most people get enough magnesium without the need for supplements. However, you may be wondering what foods to include into your diet to ensure adequate magnesium levels. Read on to learn more about the foods highest in magnesium and what potential signs of a deficiency are.

Table of contents

What is magnesium’s role in the body?

Magnesium is an essential nutrient that has several important functions in the body. Some of its primary functions are creating bones and DNA, contributing to muscle and nerve function, and regulating blood sugar, heartbeat, and blood pressure. Additionally, magnesium also plays a role in glucose metabolism, protein synthesis, and maintaining a healthy immune system (NIH, 2021). Adequate magnesium intake is essential for overall well-being and the proper function of several body systems.

Symptoms of magnesium deficiency

While magnesium deficiency is relatively rare, certain factors such as inadequate dietary intake, certain medical conditions, or medications can increase the risk of deficiency. Here are some common signs and symptoms that may indicate a potential magnesium deficiency:

  • Muscle cramps: One of the early signs of magnesium deficiency is muscle cramps, particularly in the legs. These cramps may occur during physical activity or even at rest. 
  • Fatigue and weakness: Magnesium is involved in energy production, so low levels of this mineral can lead to feelings of fatigue and weakness. While it is normal to feel fatigue sometimes, persistent fatigue even with adequate rest could be a sign of a health problem.
  • Migraine headaches: Some studies suggest a link between magnesium deficiency and the frequency and severity of migraines and tension headaches (Maier et al., 2020). Supplementation may help reduce symptoms in certain individuals. 
  • Nausea or loss of appetite: Early signs of a magnesium deficiency may include nausea, vomiting, or a loss of interest in food. 

Source: Dix, 2018

It’s important to note that these signs and symptoms can be caused by various factors, and a magnesium deficiency may not always be the underlying cause. If you are experiencing any of these symptoms or suspect a deficiency, it is best to visit your doctor for professional advice and testing.

What foods are high in magnesium?

Including magnesium-rich foods in your diet is an excellent way to ensure you’re meeting your body’s magnesium needs. Here are some of the top food sources of magnesium:

  1. Spinach: This leafy green vegetable is not only packed with vitamins and minerals, but is also an excellent source of magnesium. One cup of cooked spinach contains about 157 milligrams (mg) of magnesium, providing approximately 39% of the recommended daily intake. Incorporate spinach into salads, smoothies, or sautés to boost your magnesium intake. 
  2. Almonds: Almonds are a source of heart-healthy fat and provide a significant amount of magnesium. A 1-ounce (28-gram) serving of almonds contains about 80 mg of magnesium, contributing to around 20% of the recommended daily intake. Enjoy them as a standalone snack or add them to your favorite recipes. 
  3. Pumpkin Seeds: Loaded with magnesium, pumpkin seeds are a nutritious and convenient snack option. One ounce (28 grams) of roasted pumpkin seeds contains approximately 156 mg of magnesium, supplying about 37% of the recommended daily intake. Sprinkle them over salads, yogurt, or enjoy them on their own.
  4. Dark Chocolate: Indulging in moderate amounts of dark chocolate can provide you with magnesium while satisfying your cravings for sweets. A one ounce (28 gram) serving of 70-85% cocoa contains 65 mg of magnesium, accounting for 16% of the recommended daily intake. Look for dark chocolate with a high cocoa content for maximum benefits. 
  5. Chia seeds: Chia seeds are a nutrient-dense superfood and an excellent source of magnesium. A 1-ounce (28-gram) serving of chia seeds contains approximately 111 mg of magnesium, contributing to about 26% of the recommended daily intake. Incorporate chia seeds into your diet by adding them to smoothies, sprinkling them over yogurt or oatmeal, or using them as an egg substitute in baking recipes by mixing them with water to create a gel-like consistency.
  6. Legumes: Incorporating legumes like black beans and edamame into your diet is an excellent way to boost your magnesium intake. A one-cup (172-gram) serving of cooked black beans contains about 120 mg of magnesium, providing approximately 28% of the recommended daily intake. A one-cup serving of edamame (160-gram) provides 24% of the recommended daily intake. Add them to soups, salads, or enjoy them as a side dish. 
  7. Quinoa: As a versatile whole grain, quinoa not only provides essential nutrients but also offers a decent amount of magnesium. A one-cup serving of quinoa (185-grams) contains approximately 120 grams of magnesium, or 30% of the recommended daily intake. Use it as a base for salads, stir-fries, or as a side dish. 
  8. Bananas: Alongside their potassium content, bananas contain magnesium, making them a nutritious and easily accessible snack option. One medium banana contains 32 mg of magnesium, or 8% of the recommended daily intake.

Source: NIH, 2022 ; FDA, 2019

Who is at risk of magnesium deficiency?

While magnesium deficiency is relatively uncommon, certain individuals may be at higher risk. People who are at higher risk of magnesium deficiency may benefit from eating more magnesium rich foods, magnesium supplements, or testing their magnesium levels periodically. The following groups of people are more susceptible to magnesium deficiency:

  1. Individuals with gastrointestinal disorders: Conditions that affect the gastrointestinal tract, such as Crohn’s disease, celiac disease, or irritable bowel syndrome, can impair the absorption of magnesium (Swaminathan, 2003). Additionally, those who have undergone gastrointestinal surgeries or have chronic diarrhea may also be at increased risk. 
  2. Older adults: As we age, our ability to absorb and retain magnesium and other nutrients may decline. Older adults may also have certain diets or medical conditions that further increase their risk of magnesium deficiency, or take medications that impair magnesium absorption. 
  3. People with type 2 diabetes: Research suggests that magnesium deficiency is associated with type 2 diabetes, particularly in people with poorly controlled blood sugar (Barbagallo & Dominguez, 2015). Factors such as increased urinary magnesium loss and low magnesium intake from diet may contribute to this association. 
  4. Individuals with alcohol use disorder: Excessive alcohol consumption can lead to magnesium depletion due to increased urination, low intake of magnesium through diet, and conditions such as pancreatitis and liver disease. People with alcohol use disorder should be mindful of their magnesium intake to avoid deficiency. 
  5. Athletes and individuals engaging in intense physical activity: Intense exercise can increase magnesium requirements due to enhanced magnesium loss through sweat and urine. Athletes and individuals with high activity levels should pay attention to maintaining adequate magnesium levels to support optimal performance and recovery.

Source: Dix, 2018

If you fall into any of these categories or suspect that you may be at risk of magnesium deficiency, speak to your doctor. They can check your magnesium levels using a blood test or advise you on whether a magnesium supplement is needed. 

Test your magnesium levels

Do you suspect you have a magnesium deficiency? This can be checked using a blood test. A magnesium test can be performed in a doctor’s office, blood collection clinic, or using a home test. Homed-IQ’s Athlete Test checks the level of magnesium in the blood along with ferritin, iron, testosterone, vitamin B12, and vitamin D. This blood test can be completed from home using a finger prick sample before being sent to a certified laboratory for analysis.

Magnesium is an essential nutrient and incorporating magnesium-rich foods into your diet is important for maintaining good health. By including magnesium-rich foods in your meals and snacks, you can ensure that you’re meeting your body’s magnesium needs naturally. If you have concerns about your magnesium levels or potential symptoms of magnesium deficiency, speak to your healthcare provider. 


Barbagallo, M., & Dominguez, L. J. (2015). Magnesium and type 2 diabetes. World Journal of Diabetes, 6(10), 1152.

Dix, M. (2018, September 29). Hypomagnesemia (Low Magnesium). Healthline.

Maier, J. A., Pickering, G., Giacomoni, E., Cazzaniga, A., & Pellegrino, P. (2020). Headaches and Magnesium: Mechanisms, Bioavailability, Therapeutic Efficacy and Potential Advantage of Magnesium Pidolate. Nutrients, 12(9), 2660.

National Institutes of Health. (2021, March 22). Magnesium – Fact sheet for consumers. Office of Dietary Supplements.,protein%2C%20bone%2C%20and%20DNA.

National Institutes of Health. (2022, June 2). Magnesium. Office of Dietary Supplements.

Swaminathan, R. (2003). Magnesium metabolism and its disorders. PubMed.

US Food and Drug Administration. (2019, January 4). FoodData Central, Quinoa. U.S. DEPARTMENT OF AGRICULTURE Agricultural Research Service.

About the author

Anna Roell

Anna is a trained nurse and health economist specializing in epidemiology, combining her medical and scientific interests. Her goal is to improve others' understanding of medical information and to communicate it in an understandable way. Anna is originally from Germany and now lives in Amsterdam. What she appreciates most about Amsterdam is the open-minded, active attitude of the people, the markets, and the beautiful nature in the areas surrounding Amsterdam.