Your sex life, your way

Learn how Hims can help

Does Magnesium Increase Testosterone?

Dr. Felix Gussone

Reviewed by Felix Gussone, MD

Written by Lauren Panoff

Published 04/26/2025

Testosterone is often thought of as the holy grail of masculinity — a hormone most often associated with strength, bulk, and, well…manliness. From building muscle to boosting sex drive, testosterone is an MVP in male health.

What if we told you a simple mineral (magnesium) could play a supporting role in the epic saga of male testosterone levels?

While you’re chugging protein shakes and hitting the gym, magnesium has been quietly awaiting its inclusion in your diet, hiding in things like whole grains, nuts, and leafy greens.

Does magnesium increase testosterone levels, or is it another overhyped nutrient that, while important for your overall health, doesn’t really impact male hormones? Let’s see if magnesium can flex its muscles in the testosterone department.

Testosterone isn’t just about bulging biceps and epic beards — it’s a cornerstone of male health that plays an important role in much more than you might think.

As the primary male sex hormone, testosterone wears many hats. It plays a central role in muscle growth and maintenance, it’s a driving force in sexual health and libido (sex drive), and it’s even involved in maintaining bone density — all of which become more tangible concerns as men age.

Testosterone levels are even linked to healthy red blood cell production, cognitive function, and the body’s ability to regulate fat distribution.

TL;DR? Testosterone is a multifaceted hormone that helps keep men feeling strong, sharp, and ready to tackle life.

All that said, testosterone levels aren’t set in stone. They can fluctuate with age, stress levels, how well (or terrible) you’re sleeping, and the nutritional quality of your diet.

To optimize testosterone, it’s vital to understand how the hormone is influenced by nutrition and everyday lifestyle habits. This is where magnesium comes in.

The spotlight on magnesium tends to be about its ability to help you relax, especially when taken in supplemental form — but there’s so much more to this essential mineral.

Magnesium is involved in over 300 biochemical reactions within the body, assisting enzymes in numerous processes. Without it, the whole system falls apart.

Magnesium is involved in everything from energy production, muscle mass formation, and nerve function to regulating the stress response, maintaining a steady heartbeat, and helping you get a good night’s sleep.

If your body were a machine (which it sort of is), magnesium would be the grease that keeps the gears turning.

You can find dietary magnesium in a wide array of healthy foods, including:

  • Green leafy vegetables, like spinach, Swiss chard, kale, and collard greens

  • Nuts, such as almonds, cashews, peanuts, and Brazil nuts

  • Pumpkin seeds, chia seeds, flaxseeds, and sunflower seeds

  • Whole grains, like brown rice, quinoa, oatmeal, and whole-wheat bread

  • Legumes (beans, peas, and lentils)

  • Fish, like mackerel, salmon, and halibut

  • Avocados

  • Dark chocolate, especially 70 percent cocoa or higher

  • Bananas, figs, and dried fruits like prunes and raisins

Most people get enough magnesium in the foods they eat. But many still fall short, thanks largely to the highly processed, ultra-convenient nature of today’s food system.

Some health conditions, like celiac disease, can reduce magnesium absorption and increase loss of the mineral through the gut. While nearly half of Americans don’t get enough magnesium from food, true deficiency is rare, affecting around 2 percent of people.

Unfortunately, ultra-processed foods are often high in empty calories but low in nutritional quality, including magnesium content.

Furthermore, factors like high burdens of stress, excessive alcohol consumption, and chronic conditions — like type 2 diabetes, heart disease, cardiovascular disease, osteoporosis, and inflammatory diseases — can deplete magnesium levels.

It’s crucial to get enough vitamin D and calcium when considering magnesium levels. Magnesium helps stimulate the absorption of vitamin D and is also essential in activating vitamin D.

Many people don’t get enough vitamin D from diet and sunlight alone. (If you think you might be lacking in vitamin D, get your blood levels checked by your healthcare provider so you can supplement accordingly if needed).

If your magnesium levels get too low, you might experience a range of symptoms signaling that your body is running close to empty, like:

  • Muscle cramps

  • Trouble sleeping

  • Unusual fatigue

  • Irregular heartbeat

  • Weakness

  • Loss of appetite

Magnesium is a foundational nutrient for your body’s ability to conduct critical everyday functions. Before you notice symptoms of low magnesium, be proactive about eating healthy foods — and take a supplement if necessary.

You’re probably more likely to think about ‘roid injections than magnesium when it comes to boosting testosterone levels. But research suggests the latter may be significant — albeit subtle.

One 2011 study found that older men who consumed more magnesium tended to have higher testosterone levels. So, does magnesium increase testosterone? If so, how?

Magnesium impacts the enzyme systems involved in creating testosterone. It may enhance the bioavailability of testosterone, making more of it available for the body to use for muscle function, heart health, and other bodily processes.

Plus, magnesium has been associated with lower levels of globulin (SHBG), a protein that binds to testosterone and reduces its active form in the bloodstream. By reducing SHBG levels, magnesium may help free up testosterone for the body’s needs, but more research is needed here.

Add in the exercise factor, and the link between testosterone and magnesium becomes even more intriguing.

High-intensity or prolonged workouts can temporarily lower magnesium levels through sweat, urination, and an increased metabolic demand.

One study found that strenuous exercise may increase magnesium demand by 10 to 20 percent. For active men and women, respective daily magnesium intake below 260 and 220 milligrams (mg) may result in a deficiency.

Does Magnesium Increase Testosterone in Men Who Exercise?

Whether you’re a gym rat or a bootcamp all-star, replenishing lost magnesium after physical activity may help support healthy testosterone levels.

A small study found that both active and sedentary men (those who don’t exercise) who took magnesium supplements experienced a boost in free testosterone and total testosterone levels after four weeks — but the increase was higher in men who exercised.

Still, the overall effects of magnesium supplementation on testosterone levels are modest. Especially if you’re already getting plenty of magnesium in your diet and supporting healthy hormonal balance with your lifestyle, adding a supplement probably won’t make a noticeable difference.

Also, the effects of supplementation depend on your baseline magnesium levels, how old you are, and your overall health.

Though magnesium may play a supportive role in testosterone production, it’s not a magic potion that’ll suddenly skyrocket hormone levels. The magnesium-testosterone effects are nuanced, and for many men, the benefits may be modest at best.

Here’s what to know about the limitations of magnesium’s impact on testosterone.

Magnesium Isn’t a Standalone Solution for Low Testosterone

Magnesium supplementation can only do so much. Testosterone levels are influenced by numerous factors, including age, genetics, nutrition, sleep, stress, and activity level.

If these other factors aren’t in check, popping a magnesium supplement is unlikely to move the needle significantly — as is the case with any supplement.

Magnesium Supplementation Works Best in Deficiency Scenarios

Those who’ll see the most benefit from magnesium supplements are folks who already have a true magnesium deficiency — which needs to be diagnosed through a blood test.

If you don’t have low magnesium levels, adding more probably won’t make a difference. Another study linked diets low in dark leafy greens and certain foods like dairy to reduced testicular function and lower testosterone levels.

Expect Modest Effects From Taking Magnesium

Studies suggest that while magnesium may help support testosterone synthesis, it generally doesn’t result in a significant increase.

When considering how magnesium can help, it’s more about supporting your body’s natural ability to make testosterone versus acting as a testosterone booster.

Magnesium Affects Everyone Differently

How effective additional magnesium may be for someone depends on the individual, as it’s partly influenced by personal factors.

For example, older men or athletes with a higher risk of depleting their magnesium levels may notice more benefits than younger or sedentary guys with normal levels.

There Are Risks of Magnesium Over-Supplementation

The recommended dietary allowance (RDA) of magnesium is 320 milligrams for women and 420 milligrams for men — and more isn’t always better. Taking excessive amounts of magnesium can lead to side effects that range from obnoxious to potentially dangerous.

Too much magnesium could result in nausea, diarrhea, or changes in heart rhythm or can even cause magnesium toxicity.

It’s best to prioritize magnesium-rich foods in your meals and snacks. Food sources of magnesium also provide other nutrients, and you’re significantly less likely to overdose on nutrients from foods than supplements.

If you’re taking a magnesium supplement, talk to your healthcare provider first to make sure it’s safe and appropriate for you.

Common options are:

These can vary in their absorption rate and effectiveness at correcting low levels.

If a magnesium supplement is recommended by a medical provider, stick to the prescribed dosage and opt for third-party-tested supplements that have been independently verified for safety, quality, and purity. Look for certifications on the packaging from NSF International, ConsumerLab, or USP (United States Pharmacopeia).

There is a magnesium-testosterone connection. Magnesium is an essential nutrient that can support healthy testosterone production — but it’s not a magic potion.

Does magnesium increase testosterone? Here are some things to keep in mind when considering magnesium for testosterone health:

  • It supports healthy testosterone production when necessary. Magnesium may help optimize testosterone levels, particularly in folks with a magnesium deficiency or those who are very physically active.

  • But it’s not a miracle-worker. However, magnesium’s effects are modest and depend on factors like a person’s overall health and baseline magnesium levels. Besides, like other supplements, magnesium isn’t evaluated or approved by the FDA (U.S. Food and Drug Administration) as a treatment for low testosterone.

  • Diet first, supplements second. Most men can get enough magnesium by regularly eating leafy greens, nuts, seeds, dark chocolate, and whole grains. Supplements can be helpful in some cases but should be reserved for those with low levels confirmed through a blood test — and then used only as directed.

  • A broad approach is key. Magnesium is just one piece of the testosterone puzzle. A healthy lifestyle with regular exercise, sufficient sleep, stress management, and a nutritious diet is essential in supporting optimal testosterone levels and overall health.

If you’re concerned about your hormones, check out our guide to low testosterone (aka low T), and consider taking our free online assessment to connect with a licensed healthcare professional.

For help optimizing your nutrition, we suggest consulting a registered dietitian.

15 Sources

  1. AlGhamdi KM, et al. (2012). Local side effects caused by hair dye use in females: cross-sectional survey. https://pubmed.ncbi.nlm.nih.gov/22417994/
  2. Ali N, et al. (2018). Aqueous MEA and Ammonia Sorption-Induced Damage in Keratin Fibers. https://pmc.ncbi.nlm.nih.gov/articles/PMC6217691/
  3. American Academy of Dermatology. (n.d.). Coloring and perming tips for healthier-looking hair. https://www.aad.org/public/everyday-care/hair-scalp-care/hair/coloring-perming-tips
  4. American Academy of Dermatology. (n.d.). How to stop damaging your hair. https://www.aad.org/public/diseases/hair-loss/insider/stop-damage
  5. Bacharewicz-Szczerbicka J, et al. (2019). Paraphenylenediamine and related chemicals as allergens responsible for allergic contact dermatitis. https://pmc.ncbi.nlm.nih.gov/articles/PMC8130485/
  6. Bailey AD, et al. (2014). Comparison of damage to human hair fibers caused by monoethanolamine- and ammonia-based hair colorants. https://pubmed.ncbi.nlm.nih.gov/24602818/
  7. Draelos ZD. (2022). A clinical evaluation of a permanent hair dye designed to reduce allergic contact dermatitis and hair damage. https://pubmed.ncbi.nlm.nih.gov/35790071/
  8. Gavazzoni Dias MF. (2015). Hair cosmetics: an overview. https://pmc.ncbi.nlm.nih.gov/articles/PMC4387693/
  9. He L, et al. (2022). Hair Dye Ingredients and Potential Health Risks from Exposure to Hair Dyeing. https://pmc.ncbi.nlm.nih.gov/articles/PMC9214764/
  10. He Y, et al. (2023). Mechanisms of impairment in hair and scalp induced by hair dyeing and perming and potential interventions. https://pmc.ncbi.nlm.nih.gov/articles/PMC10232955/
  11. Lin TK, et al. (2017). Anti-Inflammatory and Skin Barrier Repair Effects of Topical Application of Some Plant Oils. https://pmc.ncbi.nlm.nih.gov/articles/PMC5796020/
  12. Mukkanna KS, et al. (2017). Para-phenylenediamine allergy: current perspectives on diagnosis and management. https://pubmed.ncbi.nlm.nih.gov/28176912/
  13. NHS. (2023). Contact dermatitis. https://www.nhs.uk/conditions/contact-dermatitis/causes/
  14. Peyravian N, et al. (2020). The Inflammatory Aspect of Male and Female Pattern Hair Loss. https://pmc.ncbi.nlm.nih.gov/articles/PMC7667670/
  15. Welc N, et al. (2024). Chemical Scalp Burn after Hair Coloring-Case Report with Literature Review. https://pmc.ncbi.nlm.nih.gov/articles/PMC11204684/
Editorial Standards

Hims & Hers has strict sourcing guidelines to ensure our content is accurate and current. We rely on peer-reviewed studies, academic research institutions, and medical associations. We strive to use primary sources and refrain from using tertiary references. See a mistake? Let us know at [email protected]!

This article is for informational purposes only and does not constitute medical advice. The information contained herein is not a substitute for and should never be relied upon for professional medical advice. Always talk to your doctor about the risks and benefits of any treatment. Learn more about our editorial standards here.

Felix Gussone, MD

Dr. Felix Gussone is a medical content specialist and Medical Advisor at Hims & Hers. Prior to joining Hims & Hers, Felix worked in digital health at Ro, focusing on patient education.

Raised in Germany, Dr. Gussone earned his M.D. from Ludwig-Maximilians-University before transitioning into health journalism and medical education content. He currently leads the medical information content team at an American biotech company.

Throughout his career, Dr. Gussone has used his medical expertise to drive the development of evidence-based health content and patient education materials. He has over 10 years of experience covering a wide range of topics, including health news, diet and weight loss, mental health, and sexual health, for prominent television programs and online publications.

Dr. Gussone has contributed to leading television programs such as CNN’s Anderson Cooper 360, NBC TODAY, and NBC Nightly News with Lester Holt, where he produced and wrote a wide range of health and wellness stories for television and digital outlets that engaged and informed diverse audiences across the United States and abroad. In addition to his work in cable and network health reporting, Felix served as Senior Health Editor at Elemental, Medium’s health and wellness publication, where he led editorial content development focused on science and personal well-being.

Dr. Gussone lives in Cambridge, Massachusetts and Brooklyn, and enjoys perfume making, scuba diving, roller blading, and traveling. You can find Dr. Gussone on LinkedIn for more information.

Read more

Related Articles