Magnesium is a mineral found naturally in many foods, where it serves as a building block your body uses for everything from energy production to bone strength. It acts as a cofactor in more than 300 enzyme systems, making it one of the most widely used minerals in human biology. Most adults need between 310 and 420 mg per day, and the richest food sources include seeds, nuts, whole grains, and leafy greens.
What Magnesium Does in Your Body
When you eat magnesium-rich food, the mineral gets absorbed in your intestines and put to work across nearly every system in your body. It’s required for energy production at the cellular level, helping convert the food you eat into usable fuel. It contributes to the structural development of bone, supports the synthesis of DNA and RNA, and helps your body produce glutathione, a key antioxidant that protects cells from damage.
Magnesium also plays a direct role in how your muscles and nerves communicate. It helps transport calcium and potassium across cell membranes, which is essential for nerve impulse conduction, muscle contraction, and maintaining a normal heart rhythm. If you’ve ever experienced muscle cramps or twitches, low magnesium is one possible explanation. The mineral also helps regulate blood sugar and blood pressure, two factors with long-term health consequences when they’re consistently out of balance.
Foods Highest in Magnesium
The most concentrated food sources of magnesium are seeds and nuts. Pumpkin seeds lead the pack at roughly 150 mg per ounce, meaning a small handful gets you about a third of your daily needs. Chia seeds, almonds, and cashews each deliver around 70 to 80 mg per ounce. Peanut butter provides about 50 mg per two-tablespoon serving.
Beyond nuts and seeds, these food categories are reliably high in magnesium:
- Whole grains: Brown rice, oatmeal, and whole wheat bread each contribute meaningful amounts per serving. Refined grains lose most of their magnesium during processing.
- Leafy greens: Spinach is a standout at roughly 78 mg per half-cup cooked serving. Swiss chard and collard greens are also strong sources.
- Legumes: Black beans, edamame, and kidney beans provide 60 to 120 mg per cooked cup.
- Fish: Salmon, mackerel, and halibut offer moderate amounts alongside their protein and omega-3 content.
- Dark chocolate: A one-ounce square of dark chocolate (70% cocoa or higher) contains about 65 mg of magnesium.
A useful rule of thumb: foods high in dietary fiber tend to be high in magnesium. If your plate is heavy on whole, minimally processed plant foods, you’re likely covering a good portion of your daily needs without thinking about it.
How Food Processing Strips Magnesium Away
One of the biggest reasons people fall short on magnesium is that modern food processing removes it. Cereal grains are a major dietary source worldwide, but milling and refining those grains dramatically reduces their mineral content. When grains are fully processed (white flour, white rice), the magnesium-rich bran and germ layers are stripped away. Research published in Plant and Soil found that at 100% cereal grain processing, dietary magnesium supply dropped by over 50%.
This matters because grains make up a large share of calories in most diets globally. Swapping white rice for brown rice, or choosing whole wheat bread over white, is one of the simplest ways to increase your magnesium intake without changing your meals entirely. The difference can be substantial: a cup of cooked brown rice provides around 80 mg of magnesium, while the same amount of white rice delivers closer to 20 mg.
Why Not All Magnesium Gets Absorbed
The magnesium listed on a nutrition label isn’t the same as the magnesium your body actually takes in. Several compounds in food can interfere with absorption. Oxalates, found in spinach, rhubarb, and beet greens, bind to magnesium and form indigestible complexes that pass through your system without being absorbed. This is why spinach, despite its high magnesium content on paper, delivers less than you might expect.
Phytic acid (found in whole grains, legumes, and seeds) is another inhibitor. Cellulose and lignin, the fibrous structural components of plant cell walls, can also reduce absorption. On the other hand, certain dietary components help. Protein, certain fats, and indigestible carbohydrates (prebiotics) enhance magnesium uptake. Peptides from dairy protein can bind magnesium in a way that promotes absorption, which is one reason dairy foods are a useful complementary source even though they aren’t the most magnesium-dense option.
The practical takeaway is that eating a variety of magnesium sources works better than relying heavily on one food. Pairing high-magnesium plant foods with some protein or healthy fat at the same meal can improve how much you actually absorb.
Cooking Methods That Preserve Magnesium
How you prepare your food also affects how much magnesium ends up on your plate. Boiling vegetables causes significant mineral loss because magnesium leaches into the cooking water. Research comparing raw and boiled vegetables found meaningful reductions in magnesium, potassium, zinc, and copper after boiling.
Steaming and roasting are better choices if you want to retain minerals. Since the food doesn’t sit submerged in water, the leaching effect is minimized. If you do boil vegetables, using the cooking liquid in a soup or sauce recaptures some of the lost minerals. Microwaving, which uses minimal water and shorter cooking times, also tends to preserve more magnesium than boiling does.
How Much You Need Each Day
The recommended daily intake for magnesium varies by age and sex. Adult women need 310 to 320 mg per day, while adult men need 400 to 420 mg. During pregnancy, the recommendation increases to 350 to 360 mg. Teens need slightly more than younger children, reflecting rapid growth during those years.
A significant portion of the population falls short of these targets from food alone. Diets heavy in processed foods, refined grains, and low in vegetables make it difficult to reach the recommended amount. The gap isn’t always dramatic, but even a modest, chronic shortfall can have effects over time. Early signs of inadequate magnesium include loss of appetite, nausea, fatigue, and muscle cramps. More prolonged deficiency can contribute to numbness, tingling, and irregular heart rhythms.
Getting too much magnesium from food alone is essentially impossible. Your kidneys efficiently filter out excess amounts. Toxicity concerns apply to high-dose supplements, not to whole food sources. This is one of the reasons nutrition experts consistently emphasize food-first strategies for meeting magnesium needs: the mineral comes packaged with fiber, other minerals, and beneficial plant compounds that supplements don’t replicate.