Magnesium: what it does, how much you need and the best foods
A plain guide to magnesium foods: what magnesium does in the body, how much adults need according to the NHS, EFSA and NIH, and which everyday foods contain the most.
Magnesium is a mineral your body uses in hundreds of processes, from turning food into energy to keeping muscles, nerves and bones working normally. Adults need roughly 270–420 mg a day depending on sex, age and which country's guidance you follow, and most people can get it from food. The richest everyday sources are pumpkin seeds, almonds, cashews, leafy greens such as spinach, beans and wholegrains.
What magnesium does
Magnesium is involved in:
- Turning the food you eat into energy
- Normal muscle and nerve function, including the heartbeat
- Making protein and DNA
- Keeping bones healthy, alongside calcium and vitamin D
- Helping regulate blood sugar and blood pressure
Most of the magnesium in your body is stored in bone, with the rest in muscles, soft tissue and body fluids. The kidneys control how much is kept or passed out, so healthy people rarely run seriously low from diet alone.
How much you need
Different bodies set slightly different figures.
| Who | NHS (UK) | EFSA (EU) | NIH Office of Dietary Supplements (US) |
|---|---|---|---|
| Men | 300 mg a day | 350 mg a day | 400–420 mg a day |
| Women | 270 mg a day | 300 mg a day | 310–320 mg a day |
The US figures rise slightly after age 30, and needs are a little higher during pregnancy. The differences reflect different methods rather than disagreement about what magnesium does. A varied diet that includes nuts, seeds, beans, wholegrains and greens comfortably meets the lower figures for most people.
The foods with the most magnesium
These approximate values come from the NIH Office of Dietary Supplements, based on USDA food data. A 30 g handful is close to the 1 ounce (28 g) portion used in US tables.
| Food | Portion | Magnesium (approx.) |
|---|---|---|
| Pumpkin seeds, roasted | 28 g | 156 mg |
| Almonds, dry roasted | 28 g | 80 mg |
| Spinach, boiled | Half a cup (about 90 g) | 78 mg |
| Cashews, dry roasted | 28 g | 74 mg |
| Black beans, cooked | Half a cup (about 85 g) | 60 mg |
| Edamame, cooked | Half a cup (about 75 g) | 50 mg |
| Peanut butter | 2 tablespoons | 49 mg |
| Banana | 1 medium | 32 mg |
Other good sources include chia seeds, other nuts, oats, brown rice, wholemeal bread, tofu, lentils, yoghurt and dark chocolate with a high cocoa content. Fish such as salmon and mackerel contain smaller amounts. Tap water and mineral water can add some magnesium too, depending on where you live.
Easy ways to eat more
- Sprinkle seeds. A spoon of pumpkin or chia seeds on porridge, yoghurt or salads. Chia pudding is an easy make-ahead breakfast.
- Snack on nuts. A small handful of almonds or cashews instead of crisps or biscuits.
- Add greens. A couple of handfuls of spinach wilt into soups, curries and pasta sauces.
- Choose wholegrains. Wholemeal bread, brown rice and oats have far more magnesium than their refined versions, because much of it sits in the bran and germ.
- Use beans and lentils. Black beans in tacos, chickpeas in salads, lentils in stews.
Can you be low in magnesium?
True magnesium deficiency is uncommon in healthy people. It is more likely in people with long-term digestive conditions such as Crohn's or coeliac disease, type 2 diabetes, alcohol dependence, and in older adults. Some medicines, including certain diuretics and long-term use of proton pump inhibitors for acid reflux, can also lower magnesium levels.
Early signs, such as tiredness, weakness, loss of appetite or nausea, are vague and have many other causes. A doctor can check your levels with a blood test.
What about supplements?
Magnesium supplements are popular for sleep, cramps and stress. Some research suggests possible benefits for some of these, but the evidence is mixed and often comes from small studies. High doses from supplements can cause diarrhoea and stomach upset, and they can interact with some medicines, including certain antibiotics and osteoporosis drugs.
Food first is the safer approach. If you are thinking about taking a supplement, ask a doctor or pharmacist whether you need one and which form and amount suits you.
Questions people ask
Does magnesium help you sleep?
There is some interest in this, and a few small studies suggest a possible effect in people with low levels, but the evidence is not strong. A steady evening wind-down routine is a more reliable place to start.
Is dark chocolate a good source of magnesium?
Dark chocolate with a high cocoa content does contain a useful amount of magnesium, but it is also high in sugar and fat. Enjoy a square as a treat rather than as a supplement.
Can you get too much magnesium from food?
It is very unlikely. Healthy kidneys remove excess magnesium from food. The risk of too much comes from supplements and some laxatives or antacids, especially in people with kidney problems.
Photograph: AI-generated image


