Erectile dysfunction (ED): causes, symptoms, and treatment

Steve Silvestro, MD - Contributor Avatar

Written by Michael Martin 

Steve Silvestro, MD - Contributor Avatar

Written by Michael Martin 

last updated: Dec 16, 2021

8 min read

Getting (and maintaining) an erection requires a surprising amount of things to go right. Your brain sends signals through your nerves and hormones, which have to communicate with your blood vessels and muscles before an erection can happen. If one thing goes wrong in that complicated exchange between your cardiovascular and nervous systems—not to mention your hormone levels, blood vessels, and mood—the result can be erectile dysfunction (ED).

But don't panic. Many causes of erectile dysfunction are treatable with medication and simple lifestyle changes. What is most important is to identify the root cause of your ED so that you can treat it in the most effective way possible.

Erectile dysfunction

ED treatment prescribed online & delivered to your door

What causes erectile dysfunction?

If you’re experiencing ED, you’re probably wondering what caused this to happen. After all, the first step in finding a solution to any problem is to figure out what caused it to occur in the first place. While everyone’s situation is unique, there are some common causes that could be the culprit in your case. 

Health conditions that cause ED

A healthy erection requires robust blood flow throughout the body. During sexual arousal, an erection occurs when the muscles of the penis relax, blood flows into special erectile chambers, and the penis becomes rigid until orgasm. So, erectile dysfunction can be related to medical conditions that impair blood circulation. These include (McMahon 2019): 

Medications that cause ED

Many commonly used prescription and over-the-counter medications can also cause erectile dysfunction; medication side effects account for as much as 25% of ED (Sooriyamoorthi, 2021). They can interfere with normal blood flow and nerve impulses, impacting erection rigidity and even ejaculation. They can also reduce sex drive, which affects your ability to have an erection. Medications that might cause ED include:

  • Antidepressants (particularly SSRIs, or selective serotonin reuptake inhibitors)

  • Stimulants (including Adderall)

  • High blood pressure medication (e.g., beta-blockers and some diuretics)

  • Opioids

  • Antihistamines (which can be used to treat the symptoms of allergies or acid reflux)

  • Antipsychotics

  • Anti-epilepsy drugs

  • Hair loss drugs (like finasteride, brand name Propecia)

If you're experiencing ED and think it may be linked to a medication you’re taking, have an open and honest conversation with your healthcare provider. It’s important to never stop or change your medication without consulting your provider first, as doing so can be dangerous. There are many simple steps you can take with your provider to correct ED due to your medication. A healthy sex life is an important part of overall health, and treating a medical condition doesn’t have to mean sacrificing satisfying sexual relationships.

Finasteride Important Safety Information: Read more about serious warnings and safety info.

Emotional and psychological factors

Our emotions play a big role in how we feel and perform sexually. You know that when you’ve had a bad day, you might not feel “in the mood” for sex, so it makes sense that deeper or longer-term mental health issues can lead to ED. Here are some common problems you may experience. 

  • Depression—Experiencing chronic feelings of anxiety or depression could understandably impact anyone’s libido or ability to focus on sexual performance. Medical research backs this up: a 2018 systematic review and meta-analysis concluded that the risk of ED increases by 39% in people with depression. Furthermore, experiencing ED itself increases the risk of depression (Liu, 2018). It’s recommended that anyone experiencing ED be screened for depression and vice versa.

  • Sleep issues—We are often told how important sleep is for our overall health, but it may surprise you to learn that sleep issues also can substantially impact sexual function. Not enough sleep, disrupted sleep, and sleep disorders are all associated with ED. If you have insomnia, restless leg syndrome, obstructive sleep apnea, or trouble sleeping due to shift work, your sexual health may suffer (Cho, 2018).

  • Stress and anxietyStress, ranging from workplace pressure to performance anxiety, relationship troubles, and clinical anxiety, can all have a huge impact on a person’s ability to have an erection. This often leads to a vicious cycle in which stress-induced ED leads to further stress, which then exacerbates ED (McMahon, 2019). This can be a very emotional and challenging process, but fortunately, mental health-related ED is just as treatable as ED that which comes from other sources.

Erectile dysfunction can be a strain on relationships, as well as personally. And even when the underlying source of ED is another medical cause, emotional and mental health struggles may often follow in consequence—it’s normal to experience feelings of shame, embarrassment, low self-esteem, anxiety, or depression as a result of ED (Sooriyamoorthy, 2021). It’s important to remember how normal, common, and treatable this condition is—and to be patient and kind to yourself in the meantime.

Lifestyle causes of ED

In some ways, lifestyle factors are the simplest causes of ED—though not necessarily the easiest to change. If you know you’re not getting enough exercise, eating mostly processed foods, or abusing drugs or alcohol, the “fix” is pretty simple. Of course, making changes to your lifestyle is never easy, but it’s worth the effort for your health and sexual function. 

  • Not getting enough exercise—A sedentary lifestyle is a major risk factor for erectile dysfunction. This is partially because lack of physical activity causes hormone shifts that reduce testosterone in the body (Irwin, 2019). According to a study published in the Journal of Sexual Medicine, men who were inactive or moderately active (30 to 149 minutes of physical activity a week) had 40–60% higher odds of experiencing ED compared with more active men who got over 150 minutes of physical activity weekly (Janiszewski, 2009). 

  • Poor diet—A diet that's bad for your heart is also bad for your erection; a poor diet is associated with virtually all of the cardiovascular diseases that also cause ED (Sooriyamoorthy, 2021). Eating excessively fried, processed, and low-fiber foods and low-quality fats can lead to high blood cholesterol levels, damaging and narrowing your blood vessels, compromising blood flow throughout the body. This is not good news for erectile health; the penis relies on healthy blood flow to become erect. 

  • Alcohol abuse or overuse—It is widely known that excessive alcohol consumption does not bode well for sexual performance (a situation often referred to as "whiskey dick"). This is not to say that responsible use of alcohol is ruinous to sexual activity; over the long term, moderate alcohol consumption does not, in fact, increase your risk of ED (Wang, 2018). However chronic heavy drinking can damage the liver, heart, and nerves as well as reduce testosterone—all of which can lead to ED and sexual performance issues. 

  • Drug use—Recreational drugs affect the central nervous system. They can also cause serious damage to blood vessels, and any damage to blood vessels or normal blood flow will eventually cause erectile dysfunction (Sooriyamoorthy, 2021; McMahon, 2019). Recreational drugs that can impact erectile function include amphetamines, barbiturates, cocaine, marijuana, methadone, nicotine, and opiates.

If you suspect you're using recreational drugs or alcohol too often, or that your health (sexual or otherwise) is being affected, talk with your healthcare provider. You can take control of the situation, improving your sex life and overall health in the process.

How to treat ED

Improving your overall health is one of the best and lowest risk ways to immediately improve your sexual health. Making simple lifestyle changes such as getting regular exercise, eating a healthy diet, quitting smoking, sleeping better, and limiting your alcohol consumption might be enough to improve ED. If not, there are medical approaches that can help resolve ED, too (remember, they will be most effective if started alongside lifestyle improvements).

Let’s explore some of the key treatment options:

Physical activity

Getting a moderate amount of exercise is not only great for your overall health, but it’s also great for your erection. In fact, treating ED by increasing physical activity improves erectile function from so many perspectives—improving cardiac and endothelial function, increasing testosterone, decreasing depression, improving stamina, reducing anxiety, improving body image, and more—that some researchers are recommending it be the first-line treatment for all sufferers of ED. Studies have shown that it has the strongest relationship between treatment and improvement of ED (Allen, 2019). Furthermore, increasing physical activity has a synergistic effect on medication taken for ED—meaning that it amplifies the medication and makes it more effective (Duca, 2019).

ED medications

When lifestyle changes are not enough, oral medications for ED are a highly effective option. Several are available, including Viagra (generic name sildenafil), Cialis (generic name tadalafil), and Levitra (generic name vardenafil). These medications are part of a drug class called PDE5 inhibitors and work by improving blood flow to the penis during arousal, making it easier to get erections. Like any medication, ED medications have the potential for side effects and drug interactions, but this risk is relatively low. These medications are usually well tolerated by most men and can be a valuable tool for addressing ED (McMahon, 2019).

Viagra Important Safety Information: Read more about serious warnings and safety info.

Cialis Important Safety Information: Read more about serious warnings and safety info.

Surgical treatment and medical devices for ED 

For some men, using ED medications is not an option—there may be an adverse reaction with another medication they are taking (such as nitrates), they may be allergic to an ingredient, they may have a health condition that makes ED medications unsafe, or ED medications may not be effective enough for them. In these cases, using a device such as a vacuum constriction device (VCD; also known as a penis pump), cock ring, or—in severe cases—a surgically placed penis implant, may be effective in restoring sexual function. 

A penis pump is used by placing a hollow tube over the flaccid penis and applying gentle vacuum pressure, which draws blood into the penis and causes it to become firm. Then, the person will place a snug band over the base of the penis to temporarily “trap” the firmness, enabling them to have sex (Retzler, 2019). Men who experience ED as a result of prostate surgery or benign prostatic hypertrophy (BPH) may find this solution especially effective.

Intracavernosal injections are small injections into the base of the penis to help relax the penile muscles and permit blood flow to create an erection. This treatment for ED has been available for over thirty years and is highly effective (one drug delivered via injection, alprostadil, has been shown to result in erections in 93% of men experiencing severe ED, though with some side effects, such as pain at the injection site) (Retzler, 2019).

When other, less invasive measures have not been helpful, penile implants are a treatment option. The implant is surgically inserted into the penis, where it remains permanently. Two types are available: malleable (which can be externally manipulated into an erect position) and inflatable (which are inflated to firmness using a small pump in the scrotum). This approach has risks and benefits, but it is a reasonable option for some men. Indeed, implants have very high patient satisfaction scores (about 90%) (Sooriyamoorthy, 2021).

Testosterone replacement therapy (TRT)

Your healthcare provider can help determine if your ED is related to low testosterone. Symptoms include fatigue, low sex drive, ED, loss of body hair and muscle mass, and weight gain. If this is the case, testosterone replacement therapy (TRT) can help by increasing your testosterone levels via an injection, a wearable patch, or a gel applied to the skin. 

Healthy diet

One of the best diets for heart and erection health is the Mediterranean diet, which emphasizes fruits and vegetables, fish and other lean proteins, whole grains, and olive oil. According to a study published in the American Journal of Medicine, eating a Mediterranean diet can help prevent ED from happening in the first place (Widmer, 2015). 

Natural and homeopathic ED remedies

Some men have found natural remedies for ED to be effective. Herbs and supplements such as DHEA, ginseng, L-arginine, L-carnitine, and yohimbe have a reputation for increasing sex drive and improving ED. However, it’s important to know that not all herbs and supplements have been thoroughly researched, and some may have significant side effects or interactions with other medications and supplements. Read more about natural remedies for ED here, and check in with your healthcare provider about safe ways to explore these non-pharmaceutical options.

If you're experiencing ED, have existing risk factors for heart disease, or are experiencing symptoms of depression, it's a good idea to talk with a healthcare provider. They'll help you find the solution that's right for you—and potentially catch other health problems before they become severe. ED is highly treatable, and there are many treatment options that will help you feel your best and enjoy a satisfying sex life too.


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.

How we reviewed this article

Every article on Health Guide goes through rigorous fact-checking by our team of medical reviewers. Our reviewers are trained medical professionals who ensure each article contains the most up-to-date information, and that medical details have been correctly interpreted by the writer.

Current version

December 16, 2021

Written by

Michael Martin

Fact checked by

Steve Silvestro, MD

About the medical reviewer

Dr. Steve Silvestro is a board-certified pediatrician and Associate Director, Clinical Content & Education at Ro.

Viagra discreetly delivered to your door

Start now