Skip to main content

Should I take magnesium with or without food?

Medically reviewed by Leigh Ann Anderson, PharmD. Last updated on April 4, 2025.

Official answer

by Drugs.com

It is generally recommended to take magnesium with food to help lower the chances for an upset stomach and increase the absorption of the mineral into your body. If you take magnesium on an empty stomach, you increase the risk for common stomach side effects like diarrhea, nausea and abdominal cramping.

Why should I take magnesium with food?

Studies have shown that magnesium is better absorbed when taken with food. In one study, magnesium from mineral water was found to be better absorbed when taken with a meal (magnesium absorption increased from 45.7% to 52.3%).

Increased bioavailability of magnesium (the amount absorbed into the body) may occur due to a slower transit time through the digestive tract due to the addition of food in the gut.

In addition, taking magnesium with food can help to prevent common stomach side effects that can occur, like diarrhea, especially if higher doses are used.

What can lower magnesium absorption?

If you take a fiber supplement or eat fiber-rich foods, separate your magnesium dose and fiber about 2 hours to help avoid absorption problems.

In addition, phytates and oxalates which can be found in certain foods like nuts, leafy greens and beans and whole grains, can bind to magnesium and reduce its absorption. It may be best to separate foods high in phytates and oxalates from your magnesium dose.

You may also want to separate your magnesium dose from other medicines you take to help prevent drug interactions or absorption issues. Speak to your pharmacist to determine if there are any significant drugs interactions between your medicines and magnesium.

How much magnesium do I need each day?

The daily recommended amount of total magnesium (combined from supplements and food) for adults ranges between 310 mg to 420 mg per day. This amount, known as the Recommended Dietary Allowance (RDA) can vary based on your age, gender, or health conditions.

Overall, about 50% of adults in the U.S. consume less than they need each day, according to estimates. Males over the age of 70 years and teenagers are most likely to have low intakes of magnesium.

RDA for Magnesium

The average daily recommended amount of magnesium in adults is as follows:

  • Adult female: 310 to 320 mg
  • Adult male: 400 to 420 mg
  • Pregnancy: 350 to 360 mg
  • Breastfeeding: 350 to 360 mg

The usual recommended dietary intake (RDA) for magnesium in children:

  • Birth to 6 months: 30 mg (adequate intake)
  • 7 to 12 months: 75 mg (adequate intake)
  • 1 to 3 years: 80 mg
  • 4 to 8 years: 130 mg
  • 9 to 13 years: 240 mg
  • 14 to 18 years, male: 410 mg
  • 14 to 18 years, female: 360 mg

If you are taking an over-the-counter (OTC) supplement, follow the Drug Facts Label and do not exceed maximum doses, unless directed by your healthcare provider. In general, adults should not exceed 350 mg per day of magnesium supplement. Check with your pediatrician before you use a magnesium supplement in your child.

It is important to know that the FDA does not test over-the-counter dietary supplements for safety or effectiveness. Always check with your pharmacist or doctor about appropriate and safe supplements, and avoid buying supplements from unverified online pharmacies or other retail sites.

Learn more about choosing the best magnesium for your needs here:

How is magnesium absorbed in the body?

Magnesium is absorbed by the body from the small intestine and colon, parts of your digestive tract. The kidney also reabsorbs and excretes magnesium to help keep blood levels steady (between 0.7 and 1.1 mmol / L).

Magnesium is an essential mineral that is important in the formation of bone, DNA and helping to transport calcium and potassium across cell membranes. Magnesium is used in many functions of the body, for example:

  • Maintaining muscle, bone and nervous system function
  • Regulating glucose (blood sugar) levels
  • Blood pressure control
  • Immune system health
  • Energy and metabolic processes
  • Heart rhythm regulation

How can I get magnesium naturally?

Magnesium is not made by the body, but is found naturally in a variety foods. Unless directed by a medical doctor, most people do not need to take additional magnesium and can usually get their recommended daily amount from eating a variety of healthful and nutrient-rich foods.

Foods that contain magnesium include:

  • Beans, lentils
  • Nuts, seeds
  • Whole grains
  • Green leafy vegetables (like spinach)
  • Milk
  • Yogurt
  • Tofu and other soy products
  • Fortified foods, like cereals
  • Dark chocolate

Foods particularly high in magnesium include: pumpkin seeds, chia seeds, almonds, cashews, peanuts, brown rice, peanut butter, spinach, black beans, soy milk, edamame, bananas, salmon, and avocados.

Which forms of magnesium are best absorbed?

The forms of magnesium in supplements that may be more easily absorbed by the body include:

Magnesium oxide is commonly found in multivitamins and readily available in stores but may be less well absorbed and have a higher risk for stomach side effects.

Magnesium sulfate (Epsom Salts) is most commonly used topically, dissolved as a soak or in a bath for muscle relaxation and pain relief.

Magnesium supplements are readily available without a prescription in the pharmacy and at other retail shops. They come in various dosage forms like oral tablets or capsules, liquids, chewable gummies or dissolvable powders. The daily maximum dose of magnesium from magnesium supplements in adults is about 350 mg / day. Higher doses can cause stomach upset.

Am I at risk of low magnesium levels?

Some people may need additional magnesium if they are not able to absorb adequate amounts from dietary sources, including those with:

Older adults may also be at risk of reduced absorption of magnesium.

The kidneys are important in maintaining magnesium levels in the body. In addition to reduced absorption, magnesium elimination may also be decreased in people with kidney disease, leading to higher magnesium levels. Usually your kidneys are able to adjust your magnesium levels as needed, but if you have kidney disease, check with your healthcare provider before you take a magnesium supplement.

Side effects of magnesium

Common side effects reported with magnesium include:

  • Diarrhea
  • Stomach cramping
  • Nausea
  • Bloating

Magnesium salts can cause diarrhea due to the osmotic activity of unabsorbed salts in the intestine and colon and the stimulation of gastric motility. As one example, Milk of magnesia liquid, often used as a laxative to treat occasional constipation, increases water in the intestines which may induce bowel movements.

Forms of magnesium most commonly reported to cause diarrhea include:

  • magnesium carbonate
  • magnesium chloride
  • magnesium gluconate
  • magnesium oxide

Magnesium glycinate is reported to be easier on the stomach and may cause fewer digestive tract side effects. However, higher doses of any magnesium supplement may worsen stomach side effects like diarrhea, so follow your healthcare provider’s dosing recommendations.

Extremely high intakes of magnesium can lead to an irregular heartbeat and cardiac arrest (when the heart suddenly stops beating and there is a loss of blood flow to the brain and other organs), which can be fatal.

Get emergency medical help if you have signs of an allergic reaction like hives, trouble breathing, or swelling in the area of your face, lips, tongue, or throat.

Stop using magnesium and call your healthcare provider or emergency services at once if you have any of these serious side effects:

  • Nausea or vomiting
  • Fast or slow heart rate
  • Feeling light-headed, fainting
  • Warmth, tingling, or redness under your skin

Bottom Line

Magnesium is an essential mineral found in a variety of foods. It can also be obtained, when needed, by taking a magnesium supplement purchased from the pharmacy or other retail shop. It is used by the body for many functions like muscle and bone health, immune system regulation and blood pressure control.

Magnesium is best taken with a meal to help with absorption and to prevent stomach upset like diarrhea, nausea, or abdominal cramping.

If you are concerned you may have low blood levels of magnesium, contact your healthcare provider to determine if you need dietary changes or supplements to increase your levels. Check with your pediatrician first before you give a magnesium supplement to your child.

This is not all the information you need to know about magnesium or magnesium supplements and does not take the place of your doctor’s directions. Discuss any medical questions you have with your doctor or other health care provider.

References
  • Uysal N, Kizildag S, Yuce Z, et al. Timeline (Bioavailability) of Magnesium Compounds in Hours: Which Magnesium Compound Works Best? Biol Trace Elem Res. 2019. doi: 10.1007/s12011-018-1351-9.
  • Ates M, Kizildag S, Yuksel O, et al. Dose-Dependent Absorption Profile of Different Magnesium Compounds. Biol Trace Elem Res. 2019 Dec;192(2):244-251. doi: 10.1007/s12011-019-01663-0. 
  • Magnesium. Fact Sheet for Healthcare Professionals. National Institute of Health (NIH). Accessed April 2, 2025 at https://ods.od.nih.gov/factsheets/Magnesium-HealthProfessional/
  • Sabatier M, Arnaud MJ, Kastenmayer P, et al. Meal Effect on Magnesium Bioavailability From Mineral Water in Healthy Women. The American Journal of Clinical Nutrition. 2002;75(1):65-71. doi:10.1093/ajcn/75.1.65
  • Magnesium. Fact Sheet for Healthcare Professionals. National Institute of Health (NIH). Accessed April 2, 2025 at https://ods.od.nih.gov/factsheets/Magnesium-HealthProfessional/. https://ods.od.nih.gov/factsheets/Magnesium-Consumer
  • 12 Foods High in Magnesium that are Tasty and Nutritious, According to Experts. Prevention. Accessed April 2, 2025 at https://www.prevention.com/food-nutrition/a60749717/foods-high-in-magnesium/
  • U.S. Department of Agriculture and U.S. Department of Health and Human Services. Dietary Guidelines for Americans, 2020-2025. 9th Edition. December 2020. Accessed April 2, 2025 at Available at https://www.dietaryguidelines.gov/sites/default/files/2020-12/Dietary_Guidelines_for_Americans_2020-2025.pdf

Related medical questions

Related support groups