Hulled hemp seed has the most magnesium of the 180 foods in our USDA database, at 700mg per 100g — and just 14.3g of it carries 100mg for 79 calories. Pumpkin seeds (500mg) and unsweetened cocoa powder (499mg) follow. The typical food in the same database has 23mg per 100g.
The more useful pattern is by food group. Seeds and nuts sit far above everything else, beans and grains form a solid middle, and dairy and fruit sit at the bottom.
Magnesium rich foods, by food group
The median nut or seed in our data carries 228.5mg of magnesium per 100g, about 4.4 times the median legume (51.5mg) and 17 times the median dairy food (13.5mg). Only fruit is lower per 100g, at a 10.7mg median across 33 fruits. These are the seven USDA food groups where we hold at least ten foods.
| USDA food group | Foods | Median mg per 100g | Median mg per 100 calories | Highest per 100g |
|---|---|---|---|---|
| Nuts and seeds | 18 | 228.5 | 37.1 | Hemp seed, hulled (700mg) |
| Legumes | 14 | 51.5 | 35.2 | Peanuts (171mg) |
| Cereal grains and pasta | 10 | 35.5 | 29.1 | Quinoa, cooked (64mg) |
| Fish and shellfish | 19 | 32 | 28.1 | Anchovies, canned in oil (228mg) |
| Vegetables | 37 | 21 | 60.2 | Wakame seaweed, raw (107mg) |
| Dairy and eggs | 22 | 13.5 | 7.7 | Whey protein powder (195mg) |
| Fruits | 33 | 10.7 | 22.6 | Dates (43mg) |
Dairy is the surprise. Low-fat plain Greek yogurt has 11mg per 100g and 1% cottage cheese 5mg, so reaching 100mg of magnesium would take 909g of the yogurt or 2kg of the cottage cheese. The one dairy row that scores well, whey protein powder at 195mg, is a supplement ingredient rather than a food most people eat by the bowl.
Which foods have the most magnesium per 100g?
Eleven of the top twelve are seeds, nuts or cocoa products; the one exception is canned anchovies, at 228mg per 100g. The last column is the practical one: how much of each food carries 100mg of magnesium, roughly a quarter of the 420mg Daily Value.
| Food (USDA description) | Magnesium /100g | Magnesium /100 kcal | Portion holding 100mg |
|---|---|---|---|
| Seeds, hemp seed, hulled | 700mg | 126.6mg | 14.3g · 79 kcal |
| Seeds, pumpkin seeds (pepitas), raw | 500mg | 89.4mg | 20g · 112 kcal |
| Cocoa, dry powder, unsweetened | 499mg | 218.9mg | 20g · 46 kcal |
| Flaxseed, ground | 372mg | 69.7mg | 26.9g · 144 kcal |
| Seeds, sesame seeds, whole, roasted and toasted | 356mg | 63mg | 28.1g · 159 kcal |
| Seeds, chia seeds, dried | 335mg | 68.9mg | 29.9g · 145 kcal |
| Seeds, sunflower seed, kernel, raw | 302mg | 51.7mg | 33.1g · 193 kcal |
| Almond butter, creamy | 268mg | 43.6mg | 37.3g · 229 kcal |
| Nuts, almonds, whole, raw | 258mg | 44.6mg | 38.8g · 224 kcal |
| Nuts, cashew nuts, raw | 251mg | 45.4mg | 39.8g · 220 kcal |
| Chocolate, dark, 70-85% cacao solids | 228mg | 38.1mg | 43.9g · 262 kcal |
| Anchovies, canned in olive oil, with salt, drained | 228mg | 108.6mg | 43.9g · 92 kcal |
Figures are USDA FoodData Central: hemp seed FDC 170148, pumpkin seeds FDC 2515380, cocoa powder FDC 169593, anchovies FDC 2747652. Twenty-five of our 180 foods reach 100mg per 100g.
Four foods make the top 15 whichever way you count
Hemp seed (1st per 100g, 7th per 100 calories), cocoa powder (3rd and 4th), pumpkin seeds (2nd and 13th) and canned anchovies (12th and 8th) are the only foods in the top 15 on both rankings. Everything else is strong on one basis and middling on the other.
Anchovies are the outlier worth knowing. At 210 calories per 100g they are cheap enough that 44g, drained, gives 100mg of magnesium for 92 calories — a lower calorie price than anything else on the list except hemp seed and cocoa powder. They also come packed with salt, which the USDA row says in its own name.
Per calorie, raw leafy greens take the lead
Raw Swiss chard carries 426.3mg of magnesium per 100 calories and raw spinach 343.5mg — the top two per calorie — because 100g of either is under 25 calories. That makes vegetables the best food group per calorie, at a 60.2mg median, even though they are fifth of seven per 100g.
The cost is volume. 100mg of magnesium is 124g of raw chard (23 calories) or 127g of raw spinach (29 calories) — a very full salad bowl, or a much smaller pile once wilted. Raw wakame seaweed gets there in 94g, raw okra in 175g, raw arugula in 213g.
Foods on most magnesium lists that rank mid-table here
Raw banana has 27mg of magnesium per 100g and ranks 80th of 180; raw California avocado has 29mg and ranks 73rd. Both are good foods, and both show up on nearly every magnesium list online, but getting 100mg from them takes 370g of banana (330 calories) or 345g of avocado (576 calories).
Grains are where the choice actually matters. Cooked parboiled brown rice (a branded USDA row) has 39mg per 100g against 9mg for cooked parboiled white rice, 4.3 times as much. Cooked quinoa has 64mg and cooked black beans 70mg, which is why beans and whole grains are the realistic everyday route for anyone not eating seeds by the spoonful.
Blank rows, held-back rows, and absorption
Three foods in our database have no USDA magnesium value — garlic, venison and white bread — so they are left out rather than ranked as zero. Six more rows are held back from every figure on this page because the rows themselves are known to be wrong elsewhere (a calorie figure that fails its own macro arithmetic, and five meats with negative carbohydrate).
These are milligrams in the food, not milligrams your body keeps. Seeds, nuts and whole grains contain phytate, which reduces how much of their magnesium is absorbed, and nothing in a USDA row adjusts for it. None of this is advice about supplements or about any medical condition; if a clinician has given you a magnesium target, the portion column above is a way to see what that target looks like as food.
More on these foods
The seed rows are on hemp seeds and pumpkin seeds, and the grain gap is laid out in full on brown rice vs white rice. Hemp seed also turns up near the top of our zinc ranking, and potassium per calorie covers another of the minerals sold as "electrolytes".
You will not find magnesium on most labels
US Nutrition Facts panels are not required to list magnesium, so the packet in your hand usually cannot tell you what you just ate. That is why keeping an eye on a mineral like this by hand tends to last about two days.
Sunn works from what you tell it instead. Message "porridge with pumpkin seeds" on WhatsApp and it logs the meal; ask "which of my usual foods have the most magnesium?" and it answers in the same chat.
Written by Espen Opdahl
Founder of Sunn. Building AI-powered nutrition coaching to make healthy eating simple. Nutrition data sourced from the USDA FoodData Central database.
Medical disclaimer: This content is for informational purposes only and is not a substitute for professional medical advice, diagnosis, or treatment. Always consult a qualified healthcare provider before making changes to your diet or exercise routine.