This information explains how to add the right amount of magnesium to your diet to stay healthy.
What is magnesium?
Magnesium is a mineral in the body that:
- Helps keep your heart rhythm steady
- Helps maintain normal muscle and nerve function
- Works with other minerals to maintain strong bones and teeth
- Helps keep you healthy
The best way to add magnesium to your diet is through different foods. You can also get magnesium as a supplement orally (by mouth) or intravenously (IV, through a vein).
Low levels of magnesium in the body can be caused by:
- Chronic (long-term) or excessive vomiting (throwing up) or diarrhea (loose or watery bowel movements)
- Having problems absorbing nutrients in the stomach or kidneys
- Not eating enough food with magnesium
- Taking some medications, such as certain diuretics (medications that help you urinate (pee)), antibiotics, thyroid medications, proton pump inhibitors, or chemotherapies. These medications can increase the loss of magnesium through urine (pee).
How much magnesium do I need every day?
If your magnesium level is low, your doctor, nurse practitioner (NP), or physician assistant (PA) may give you a prescription for a magnesium supplement to take by mouth or you may be given it through an IV.
The table below from the National Institutes of Health (NIH) shows the daily recommended amounts of magnesium for children and adults.
Age (years) |
Males (mg/day) |
Females (mg/day) |
Pregnant Females (mg/day) |
Lactating Females (mg/day) |
1 to 3 | 80 | 80 | N/A* | N/A |
4 to 8 | 130 | 130 | N/A | N/A |
9 to 13 | 240 | 240 | N/A | N/A |
14 to 18 | 410 | 360 | 400 | 360 |
19 to 30 | 400 | 310 | 350 | 310 |
31 to 50 | 420 | 320 | 360 | 320 |
51 or older | 420 | 320 | N/A | N/A |
What are food sources of magnesium?
Eating foods with magnesium can help increase the amount in your body. Eating a variety of whole grains, legumes (such as peas and beans), and dark green, leafy vegetables every day will help you get your daily recommended amount of magnesium. You can also get magnesium from drinking water. Water, including tap, mineral, or bottled, can have up to 120 mg of magnesium, depending on the brand of water and where it came from. The table below lists foods and the amount of magnesium in each one.
Food |
Serving Size |
Amount of Magnesium (mg) |
DV** (%) |
Almonds (dry roasted) |
1 ounce |
80 |
20 |
Spinach (boiled) |
½ cup |
78 |
20 |
Cashews (dry roasted) |
1 ounce |
74 |
19 |
Peanuts (oil roasted) |
¼ cup |
63 |
16 |
Shredded wheat cereal |
2 rectangular biscuits |
61 |
15 |
Soymilk (plain, vanilla) |
1 cup |
61 |
15 |
Black beans (cooked) |
½ cup |
60 |
15 |
Soybeans (shelled, cooked) |
½ cup |
50 |
13 |
Peanut butter (smooth) |
2 tablespoons |
49 |
12 |
Bread, whole wheat |
2 slices |
46 |
12 |
Avocado, cubed |
1 cup |
44 |
11 |
Potato (baked with skin) |
3.5 ounces |
43 |
11 |
Yogurt, plain, low fat |
8 ounces |
42 |
11 |
Brown rice (long-grain, cooked) |
½ cup |
42 |
11 |
*N/A=Not Applicable
**DV=Daily Value. A DV is a percentage of the total daily recommended amount. A food that provides 20% of the DV per serving is high in magnesium.
How can I speak with a dietitian?
If you have any questions or concerns about your diet while you’re in the hospital, ask to see a dietitian. You can also call 212-639-7312 to speak to or schedule an appointment with a dietitian.