Key takeaways
Some studies suggest metformin may affect testosterone levels, but diabetes itself is a well-established risk factor for ED, while evidence that metformin independently causes ED remains limited.
ED is more than three times as common among men with diabetes as among those without diabetes.
For people who experience ED while taking metformin, prescription medications such as Viagra (sildenafil) and Cialis (tadalafil) may help. Lifestyle changes such as exercising regularly, eating a balanced diet, and getting enough sleep may also improve ED.
Here's what we'll cover
Here's what we'll cover
Here's what we'll cover
Key takeaways
Some studies suggest metformin may affect testosterone levels, but diabetes itself is a well-established risk factor for ED, while evidence that metformin independently causes ED remains limited.
ED is more than three times as common among men with diabetes as among those without diabetes.
For people who experience ED while taking metformin, prescription medications such as Viagra (sildenafil) and Cialis (tadalafil) may help. Lifestyle changes such as exercising regularly, eating a balanced diet, and getting enough sleep may also improve ED.
Metformin, a common medication for type 2 diabetes, hasn't been shown to directly cause erectile dysfunction (ED), though research on the link is mixed. It may affect testosterone levels, which play a role in erections, and diabetes itself is a known risk factor for ED. Here's what research says about the relationship between metformin and ED, and what may help.
Does metformin cause erectile dysfunction (ED)?
Can metformin cause ED? Metformin hasn't been shown to directly cause erectile dysfunction, but research is mixed. Some studies link it to lower testosterone levels, which may contribute to ED, while others suggest it may support erectile function.
According to one small study, men with type 2 diabetes who took metformin had lower testosterone levels and sex drive than those who took another diabetes medication. Since low testosterone can affect sexual desire and erectile function, this could contribute to ED in some people. A case report also describes a man whose ED began after starting metformin and resolved after stopping it.
Another study of men with both type 2 diabetes and chronic kidney disease found that those who used metformin had higher odds of having ED. However, the study couldn't prove that metformin directly caused ED, and all participants had underlying conditions known to affect erectile function on their own.
On the other hand, some research suggests metformin may help improve erectile function by supporting blood vessel function and increasing nitric oxide availability, which promotes blood flow to the penis. More research is needed to confirm these effects.
What is the link between diabetes and erectile dysfunction?
Diabetes can damage blood vessels and nerves and affect hormone levels, making the condition itself a well-established contributor to ED. In fact, up to 66% of men with type 2 diabetes also experience ED, and ED is at least three times more common in men with diabetes than in those without.
Over time, high blood sugar levels can damage nerves and blood vessels throughout the body, including in the penis. This can reduce blood flow and sexual sensation, making it difficult for people with diabetes to achieve and maintain a firm erection.
Diabetes can also affect testosterone levels, potentially due to insulin resistance. Lower testosterone levels are associated with more severe ED symptoms, suggesting hormonal changes may be another way diabetes contributes to ED.
What to do if you experience ED while taking metformin?
For people with ED that may be related to diabetes or metformin, these strategies may help:
Talk to your healthcare provider
Talking with a healthcare provider is the first step to finding a solution. A healthcare provider can check testosterone levels, evaluate other potential causes of ED, and review whether metformin or another medication could be contributing.
The good news is that effective ED treatments are available, and a healthcare provider on Ro can help determine which may be appropriate.
Consider prescription medication for ED
Prescription medications known as phosphodiesterase type 5 (PDE5) inhibitors work by increasing blood flow to the penis, which can make it easier to achieve and maintain an erection for satisfactory sexual activity. Popular PDE5 inhibitors (all of which are oral medications) include:
Vardenafil (formerly sold under the brand names Levitra and Staxyn)
Stendra (avanafil)
Not a fan of swallowing pills? Alternative formulations include sublingual (under the tongue) options such as Ro Sparks, which contains tadalafil and sildenafil for fast-acting results. Another pill-free option is Ro's Daily Rise Gummies; each fruit-flavored gummy contains 7 mg of tadalafil. Both are compounded medications, which means they aren't approved by the US Food and Drug Administration (FDA) or reviewed by the FDA for safety, quality, or effectiveness.
Exercise regularly
Consistent physical activity may help improve ED and overall sexual health. That's because exercise can boost cardiovascular health and increase the production of nitric oxide — both of which can help improve blood flow to the penis, promoting erections.
For people new to exercise or returning after a break, regular aerobic activities such as walking, running, or swimming can be a simple way to start. It is recommended to aim for at least 150 minutes of moderate aerobic exercise weekly.
Eat a healthy, balanced diet
Following a healthy diet may help improve ED by supporting blood sugar control and cardiovascular health. Research suggests that a Mediterranean-style eating plan, which focuses on whole foods such as fruits, vegetables, whole grains, lean proteins, and healthy fats, is associated with a lower risk of ED.
A heart-healthy diet rich in fruits, vegetables, whole grains, nuts, and fish may also support the vascular health involved in erectile function.
Prioritize sufficient sleep
Getting enough shut-eye is essential for physical and mental health and can also affect sexual function.
Testosterone levels naturally increase during sleep, peaking around the first episode of rapid eye movement (REM) sleep. Research suggests losing sleep, especially in the second half of the night, can lower testosterone the next morning.
Try to get 7–9 hours of quality sleep each night. Smart sleep hygiene habits can help, such as creating a relaxing sleep environment, following a consistent sleep schedule, and avoiding electronics, caffeine, and alcohol close to bedtime.
Side effects and risks associated with metformin
Metformin is generally safe and well-tolerated, but, like any other medication, it can cause side effects in some people, particularly at the onset of treatment. Symptoms tend to subside over time as the body adjusts to the medication, and taking metformin with food may help reduce or prevent side effects.
Common metformin side effects include:
Diarrhea
Nausea
Vomiting
Abdominal pain
Indigestion
Bloating
Loss of appetite
Less common but more serious side effects include:
Lactic acidosis. This is a rare but potentially fatal condition in which lactic acid builds up in the bloodstream. Symptoms can be nonspecific and may include feeling very weak or unwell, muscle pain, trouble breathing, unusual sleepiness, or abdominal discomfort.
Vitamin B12 deficiency. Long-term use (around 4–5 years, according to research) of metformin can interfere with the body's absorption of vitamin B12, potentially leading to a deficiency.
Hypoglycemia. Though rare, metformin can sometimes cause hypoglycemia (dangerously low blood sugar levels), especially when combined with other glucose-lowering medications or conditions. Symptoms of hypoglycemia can include sweating, shakiness, weakness, dizziness, hunger, a fast heartbeat, and confusion.
Bottom line
Metformin is a commonly prescribed medication for type 2 diabetes. So, does metformin cause ED? Here's what we know:
Metformin hasn't been shown to directly cause ED. However, some research suggests it may lower testosterone levels, which can contribute to ED, while other studies suggest it may support erectile function.
Diabetes itself is a well-established contributor to ED. High blood sugar can damage blood vessels and nerves involved in erections, while diabetes may also contribute to low testosterone.
ED is treatable, whether or not a person takes metformin. Lifestyle changes and prescription medications such as Viagra (sildenafil) or Cialis (tadalafil) may help improve erectile function.
Frequently asked questions (FAQs)
What is metformin?
Metformin is a commonly used medication for type 2 diabetes that helps control blood sugar (glucose). It can also help the body use insulin more effectively, lowering blood sugar levels by reducing glucose production in the liver and improving the body's response to insulin.
Some evidence suggests metformin may also contribute to weight loss in people with type 2 diabetes and obesity, as well as lower the risk of cardiovascular disease in this group.
Can I take Viagra while taking metformin?
Yes, metformin and Viagra (sildenafil) can generally be taken together. In one small clinical trial of 30 men with ED, insulin resistance, and a poor response to sildenafil, adding metformin came with no serious side effects. However, the men did not have diabetes, so a healthcare provider can confirm whether the combination is appropriate based on a person's health history and medications.
Is metformin bad for erectile dysfunction?
Not necessarily. While some research suggests metformin may lower testosterone levels and potentially contribute to ED, other research suggests it may improve erectile function by supporting blood vessel function and nitric oxide availability. More research is needed to understand metformin's effects on erectile function.
DISCLAIMER
If you have any medical questions or concerns, please talk to your healthcare provider. The articles on Health Guide are underpinned by peer-reviewed research and information drawn from medical societies and governmental agencies. However, they are not a substitute for professional medical advice, diagnosis, or treatment.
Viagra Important Safety Information: Read more about serious warnings and safety info.
Cialis Important Safety Information: Read more about serious warnings and safety info.
References
American Diabetes Association Professional Practice Committee for Diabetes. (2026). 9. Pharmacologic approaches to glycemic treatment: Standards of Care in Diabetes—2026. Diabetes Care, 49(Supplement_1), S183–S215. https://doi.org/10.2337/dc26-S009. Retrieved from https://diabetesjournals.org/care/article/49/Supplement_1/S183/163934/9-Pharmacologic-Approaches-to-Glycemic-Treatment
Al-Kuraishy, H. M. & Al-Gareeb, A. I. (2016). Erectile dysfunction and low sex drive in men with type 2 DM: The potential role of diabetic pharmacotherapy. Journal of Clinical and Diagnostic Research, 10(12), FC21–FC26. doi: 10.7860/JCDR/2016/19971.8996. Retrieved from https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5296448/
Baranwal, N., Yu, P. K., & Siegel, N. S. (2023). Sleep physiology, pathophysiology, and sleep hygiene. Progress in Cardiovascular Diseases, 77, 59–69. doi: 10.1016/j.pcad.2023.02.005. Retrieved from https://pubmed.ncbi.nlm.nih.gov/36841492/
Bauer, S. R., Breyer, B. N., Stampfer, M. J., et al. (2020). Association of diet with erectile dysfunction among men in the Health Professionals Follow-up Study. JAMA Network Open, 3(11), e2021701. doi: 10.1001/jamanetworkopen.2020.21701. Retrieved from https://pubmed.ncbi.nlm.nih.gov/33185675/
Centers for Disease Control and Prevention (CDC). (2025). What you can do to meet physical activity recommendations. Retrieved from https://www.cdc.gov/physical-activity-basics/guidelines/index.html
Cho, J. W. & Duffy, J. F. (2019). Sleep, sleep disorders, and sexual dysfunction. The World Journal of Men's Health, 37(3), 261–275. doi: 10.5534/wjmh.180045. Retrieved from https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6704301/
Defeudis, G., Mazzilli, R., Tenuta, M., et al. (2022). Erectile dysfunction and diabetes: A melting pot of circumstances and treatments. Diabetes/Metabolism Research and Reviews, 38(2), e3494. doi: 10.1002/dmrr.3494. Retrieved from https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9286480/
de Jager, J., Kooy, A., Lehert, P., et al. (2010). Long term treatment with metformin in patients with type 2 diabetes and risk of vitamin B-12 deficiency: Randomised placebo controlled trial. BMJ (Clinical Research Ed.), 340, c2181. doi: 10.1136/bmj.c2181. Retrieved from https://pubmed.ncbi.nlm.nih.gov/20488910/
Dyatlova, N., Tobarran, N. V., Kannan, L., et al. (2023). Metformin-associated lactic acidosis (MALA). StatPearls. Retrieved from https://www.ncbi.nlm.nih.gov/books/NBK580485/
Gerbild, H., Larsen, C. M., Graugaard, C., et al. (2018). Physical activity to improve erectile function: A systematic review of intervention studies. Sexual Medicine, 6(2), 75–89. doi: 10.1016/j.esxm.2018.02.001. Retrieved from https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5960035/
He, Z., Yin, G., Li, Q. Q., et al. (2021). Diabetes mellitus causes male reproductive dysfunction: A review of the evidence and mechanisms. In Vivo (Athens, Greece), 35(5), 2503–2511. doi: 10.21873/invivo.12531. Retrieved from https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8408700/
Hostnik, B., Tonin, G., Janež, A., et al. (2025). Erectile dysfunction in diabetes mellitus: A comprehensive narrative review of pathophysiology, genetic association studies and therapeutic approaches. Endocrinology, Diabetes & Metabolism, 8(5), e70099. doi: 10.1002/edm2.70099. Retrieved from https://pmc.ncbi.nlm.nih.gov/articles/PMC12441930/
Khattab, R., Albannawi, M., Alhajjmohammed, D., et al. (2023). Metformin-induced vitamin B12 deficiency among type 2 diabetes mellitus' patients: A systematic review. Current Diabetes Reviews, 19(4), e180422203716. doi: 10.2174/1573399818666220418080959. Retrieved from https://pubmed.ncbi.nlm.nih.gov/35440313/
Kouidrat, Y., Pizzol, D., Cosco, T., et al. (2017). High prevalence of erectile dysfunction in diabetes: A systematic review and meta-analysis of 145 studies. Diabetic Medicine, 34(9), 1185–1192. https://doi.org/10.1111/dme.13403. Retrieved from https://onlinelibrary.wiley.com/doi/10.1111/dme.13403
Muniandy, V., Ng, Y. Y., Yaacob, L. H., et al. (2025). Prevalence and determinants of erectile dysfunction among male type 2 diabetes mellitus patients with chronic kidney disease: A cross-sectional study. Translational Andrology and Urology, 14(3), 578–588. doi: 10.21037/tau-2024-751. Retrieved from https://tau.amegroups.org/article/view/136306/html
Ngu, M. H., Zakaria, R., Mohd Zulkifli, M., et al. (2023). Erectile dysfunction as a possible important side effect of metformin: A case report. Malaysian Family Physician: The Official Journal of the Academy of Family Physicians of Malaysia, 18, 20. doi: 10.51866/cr.282. Retrieved from https://www.ncbi.nlm.nih.gov/pmc/articles/PMC10191187/
Odetayo, A. F. & Olayaki, L. A. (2023). Omega 3 fatty acid improves sexual and erectile function in BPF-treated rats by upregulating NO/cGMP signaling and steroidogenic enzymes activities. Scientific Reports, 13(1), 18060. doi: 10.1038/s41598-023-45344-4. Retrieved from https://www.ncbi.nlm.nih.gov/pmc/articles/PMC10593954/
Patel, J. P., Lee, E. H., Mena, C. I., et al. (2017). Effects of metformin on endothelial health and erectile dysfunction. Translational Andrology and Urology, 6(3), 556–565. doi: 10.21037/tau.2017.03.52. Retrieved from https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5503973/
Rahaman, M. M., Hossain, R., Herrera-Bravo, J., et al. (2023). Natural antioxidants from some fruits, seeds, foods, natural products, and associated health benefits: An update. Food Science & Nutrition, 11(4), 1657–1670. doi: 10.1002/fsn3.3217. Retrieved from https://www.ncbi.nlm.nih.gov/pmc/articles/PMC10084981/
Rey-Valzacchi, G. J., Costanzo, P. R., Finger, L. A., et al. (2012). Addition of metformin to sildenafil treatment for erectile dysfunction in eugonadal nondiabetic men with insulin resistance. A prospective, randomized, double-blind pilot study. Journal of Andrology, 33(4), 608–614. doi: 10.2164/jandrol.111.013714. Retrieved from https://pubmed.ncbi.nlm.nih.gov/22016348/
Sakouhi, M., Matmour, D., Belakhdar, K., et al. (2023). Étude transversale sur les effets indésirables de la chlorhydrate de métformine chez 130 patients diabétiques type 2 admis au Centre Médical et à la Maison du Diabète de Sidi Bel-Abbès [Cross-sectional study on adverse effects of metformin hydrochloride on 130 patients type 2 diabetic admitted to medical center and diabetes home of Sidi Bel-Abbès]. Annales Pharmaceutiques Françaises, 81(4), 684–695. doi: 10.1016/j.pharma.2022.11.013. Retrieved from https://pubmed.ncbi.nlm.nih.gov/36464072/
Silva, A. B., Sousa, N., Azevedo, L. F., et al. (2017). Physical activity and exercise for erectile dysfunction: Systematic review and meta-analysis. British Journal of Sports Medicine, 51(19), 1419–1424. doi: 10.1136/bjsports-2016-096418. Retrieved from https://pubmed.ncbi.nlm.nih.gov/27707739/
Soukas, A. A., Hao, H., & Wu, L. (2019). Metformin as anti-aging therapy: Is it for everyone? Trends in Endocrinology and Metabolism, 30(10), 745–755. doi: 10.1016/j.tem.2019.07.015. Retrieved from https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6779524/
Tseng, C. H. (2022). The effect of metformin on male reproductive function and prostate: An updated review. The World Journal of Men's Health, 40(1), 11–29. doi: 10.5534/wjmh.210001. Retrieved from https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8761231/













