Quick Answer: A varied diet featuring leafy greens, nuts and seeds, whole grains, legumes, certain fish, fruits, and dark chocolate provides the bulk of dietary magnesium needed for metabolic, neuromuscular, and bone health.

Why magnesium matters

Magnesium is a cofactor in more than 300 enzymatic reactions including ATP production, muscle contraction, nerve transmission, and bone mineralization. Many people do not meet recommended intakes from food alone, so understanding dense food sources helps maintain normal physiological function and reduces reliance on supplements.

Top food sources and typical amounts

Leafy greens such as cooked spinach and Swiss chard are among the richest vegetable sources (roughly 150–160 mg per cooked cup). Nuts and seeds—particularly pumpkin seeds (about 168 mg per ounce), almonds (~80 mg/oz), and cashews (~74 mg/oz)—provide concentrated magnesium in small portions. Whole grains and legumes also contribute substantially: cooked quinoa (~118 mg/cup), brown rice (~84 mg/cup), and lentils (~70 mg/cup) are reliable staples.

Seafood like mackerel and salmon contributes magnesium alongside omega-3 fatty acids (mackerel can provide near 97 mg per 100 g, salmon about 30 mg per serving). Fruit sources such as avocado (~58 mg per fruit), banana (~32 mg per medium fruit), and dried figs (~50 mg per handful) offer additional, easily consumed magnesium. Dark chocolate and cacao products are notable too; one ounce of 70%+ dark chocolate may supply ~60 mg, while raw cacao powder is denser per 100 g.

Other practical options

Plant-based options like tofu, black beans, edamame, sesame seeds, and sunflower seeds are useful for vegetarian and vegan diets. Fortified foods and some processed products can help close gaps but should be viewed as complements to whole foods.

Improving absorption and meal ideas

Phytates in whole grains and legumes can modestly reduce mineral absorption; pairing these foods with vitamin C–rich vegetables or using preparation techniques like soaking, fermenting, or sprouting can improve bioavailability. Meals that combine multiple magnesium sources—such as a bowl of quinoa topped with roasted tofu, spinach, pumpkin seeds and avocado—are effective ways to reach daily targets.

Contextual resources

For an overview of natural food sources and how they relate to supplement strategies, review this concise guide on which foods are rich in magnesium. If you are considering supplementation without a clear need, see research and risk considerations in what happens if you take magnesium without need. For interactions with vitamin D status and practical comparisons, consult an evidence summary on vitamin D3 vs vitamin D and an accessible overview at the difference between vitamin D3 and vitamin D.

Practical guidance

Adults typically require about 310–420 mg of magnesium daily depending on age and sex. To maximize dietary intake, prioritize a mix of leafy greens, nuts and seeds, whole grains, legumes and fatty fish. Cooking methods such as steaming or eating foods raw where appropriate preserve more minerals than prolonged boiling. When absorption is a concern due to medical conditions or restrictive diets, discuss testing and targeted strategies with a healthcare professional.