Erectile dysfunction makes it difficult to regularly attain or keep a firm enough erection to have sex. This can interfere with both sexual activity and quality of life, but medications and other treatments are available.

Some people will occasionally experience some difficulty with their penis becoming hard or staying firm. However, erectile dysfunction (ED) is often only a concern if satisfactory sexual performance is consistently impossible.

People may sometimes refer to ED as impotence.

The awareness that ED can be a treatable condition has increased since the discovery that the drug sildenafil, or Viagra, affected penile erections. However, people who have a problem with their sexual performance may be reluctant to talk with their doctor, seeing it as an embarrassing issue.

ED is now well understood and there are various treatments available.

A note about sex and gender

Sex and gender exist on spectrums. This article will use the terms “male,” “female,” or both to refer to sex assigned at birth. Click here to learn more.

Was this helpful?
Two people's hands with their fingers interlocking 1Share on Pinterest
Jamie Grill/Getty Images

ED may affect up to 20 million people in the U.S. The condition’s prevalence is over 50% in those over 50 years old and increases with a person’s age.

Normal erectile function can be affected by problems with a person’s blood flow, nervous system, and hormone levels. A person may also experience ED due to psychological factors, such as anxiety over sexual performance.

Gay men report ED at a higher rate than heterosexual men, according to a 2019 review. However, the exact reasons for this remain unknown, and researchers recommend more study in the field.

Physical causes

Most cases of ED are secondary. This means that erectile function has been normal but becomes problematic. Causes of a new and persistent problem are usually physical.

In rare cases, a person may have primary ED. This is where a person has never achieved an erection. The cause of primary ED may be psychological or the result of a physical condition.

A person should consult a medical professional if they experience persistent erection problems, as an underlying medical condition could be causing the issue. A proper diagnosis can help address any underlying medical issues and help resolve sexual difficulties.

Some of the most common physical causes of ED include:

Atherosclerosis is a common cause of blood flow problems. It describes a narrowing or clogging of arteries in the penis, preventing the necessary blood flow to produce an erection.

Numerous prescription medications can also cause ED. A person taking prescription medications should consult their doctor before stopping or changing their medications. Some drugs that may cause ED include:

  • drugs to control high blood pressure
  • heart medications such as digoxin
  • anxiety treatments
  • antidepressants, including monoamine oxidase inhibitors (MAOIs), selective serotonin reuptake inhibitors (SSRIs), and tricyclic antidepressants
  • opioid painkillers
  • some cancer drugs, including chemotherapeutic agents
  • anticholinergics
  • hormone drugs

Physical causes account for 90% of ED cases, with psychological causes much less common.

Psychological causes

Psychological factors can cause or contribute to ED, with factors ranging from treatable mental health conditions to everyday emotional states that most people experience at some time. These are less common than physical causes, however.

Psychological factors can include:

A person may also be unable to attain a full erection due to specific sexual performance anxiety, a common psychological factor in people with ED. Sexual performance anxiety affects 9-25% of males, according to a review.

It is also important to note that there can be an overlap between medical and psychosocial causes. For instance, if a person is living with obesity, blood flow changes can affect that person’s ability to maintain an erection, which is a physical cause. However, the person may also have low self-esteem, impacting erectile function, which is a psychosocial cause.

Does riding a bicycle cause ED?

Some research has raised concerns that men who regularly cycle for long hours could have a higher risk of ED, in addition to other men’s health issues such as infertility and prostate cancer.

A 2020 study found a positive correlation between between riding a bike and ED but the evidence to support this correlation was limited. Another study published in 2020 found no correlation between cycling and ED or prostate cancer.

The association between cycling and prostate cancer remains controversial and requires more research.

Prostate disease and ED

Early-stage prostate cancer does not cause ED, but advanced forms of prostate cancer can.

Prostate surgery to remove tumors and radiation therapy to treat prostate cancer can cause ED.

Some medications for prostate cancer may also result in ED. For example, hormone therapies can lower a person’s libido, and by association lead to ED. Research has shown that the medication finasteride may cause sexual dysfunction in men.

Men’s health resources

For more research-backed information and resources, visit our dedicated men’s health hub.

Was this helpful?

There are many treatments for ED, and most people will find a solution that works for them.

Drug treatments

A person with ED can take a group of drugs called PDE-5 (phosphodiesterase-5) inhibitors.

Most of these pills are taken 1-2 hours before sex, the best known being the blue-colored pill sildenafil (Viagra). Other options are:

  • vardenafil (Levitra)
  • tadalafil (Cialis)
  • avanafil (Stendra)

PDE-5 inhibitors are only available by prescription. A doctor will check for heart conditions and ask about other medications a person is taking before prescribing them. People should not take PDE5 inhibitors if they are taking nitrates.

Side-effects associated with PDE-5 inhibitors include:

Less commonly used drug options include prostaglandin E1, which is applied locally by either injecting it into the penis or inserting it down the opening of the urethra.

Online pharmacies

It is possible to buy treatments over the internet for ED. However, a person should be cautious when doing so.

The United States Food and Drug Administration (FDA) has a consumer safety guide regarding online pharmacies.

Before ordering, a person should check that their online pharmacy is licensed in the U.S., has a licensed pharmacist, requires a prescription, and offers direct contact with customer relation staff.

People can check whether the pharmacy is licensed using the list of Verified Internet Pharmacy Practice Sites.

The FDA also offers tips for spotting the dangers of an unsafe website, including watching out for the following:

  • There is no way to contact the website by phone.
  • Prices are dramatically lower than those offered by legal online pharmacies.
  • Prescription drugs do not require a prescription for purchase, which is illegal.
  • Personal information is not protected.

These illegal sites may send drugs of unknown quality and origin. They may even send the wrong drug or a dangerous product.

Vacuum devices

Vacuum erection devices are a mechanical way of producing or maintaining an erection for people who do not want to use drug treatments or find they are not working.

A person makes their penis rigid by using a vacuum pump sealed around it that draws up blood. An accompanying constriction band then prevents this blood from then leaving the penis.

The lack of spontaneity with vacuum devices means that many people with ED find other treatments preferable. However, other treatments, such as oral medications, can also reduce spontaneity.

Vacuum devices may also be susceptible to mechanical faults that affect their efficacy, such as poor seals.

Surgical treatments

For some individuals, several surgical treatments may be available, including penile implants. In this procedure, a doctor inserts a malleable or inflatable device into the penis. This surgery may help a person reach and maintain erections if drug-based treatments have not worked.

In very rare cases, a patient may undergo vascular surgery to treat ED.

Typically a doctor will only recommend surgery only after exhausting all other treatment avenues.

Do dietary supplements and alternative treatments work?

No guidelines followed by doctors, nor any established sources of evidence, support the use of dietary supplements such as herbal pills.

In addition to there being no evidence in favor of non-prescription alternatives for ED, alternative supplements and treatments may be harmful, and in some instances, fatal.

People may not always successfully achieve an erection. If this happens occasionally, it is not considered a medical problem. However, if a person is consistently unable to achieve an erection, then they may have ED.

There is no defined length of time frame over which a person must experience ED to receive a diagnosis. Some professionals suggest 6 months is suitable.

However, ED does not only refer to a complete inability to maintain an erect penis. Symptoms can also include having difficulty maintaining an erection for long enough to complete intercourse or an inability to ejaculate.

People may also experience emotional symptoms, such as embarrassment, shame, anxiety, and a reduced interest in sexual intercourse.

There are exercises a person can carry out to reduce the effects of ED.

Research suggests that strengthening pelvic floor muscles through exercise may be a beneficial treatment for people with ED. However, research is limited and further study is necessary.

Learn more about pelvic floor exercises here.

Aerobic exercise, such as a jog or even a brisk walk, may help improve ED in men who have circulation issues due to underlying health conditions, such as cardiovascular disease and obesity.

The numerous potential causes of ED mean that a doctor will typically ask many questions and arrange blood tests.

Such tests can check for heart problems, diabetes, and low testosterone, among other health issues. The doctor will also carry out a physical examination, including of the genitals.

Once a doctor establishes a medical history, they will then do further investigation. One test, known as the “postage stamp test,” can help determine if the cause is physical rather than psychological.

Research suggest that people usually have 3-7 erections a night. This test checks for the presence of erections at night by seeing if postage stamps applied around the penis before sleep have snapped off overnight. Other tests of nocturnal erection include the Poten test and Snap-Gauge test.

These methods provide limited information but can help guide a doctor’s choice of further tests.

Here are some frequently asked questions about erectile dysfunction.

What causes a weak erection in a male?

There are numerous possible causes of a weak erection or ED. These include physical causes affecting blood flow, such as atherosclerosis. Diabetes can also cause ED. In some cases, it may be due to psychological factors, such as depression or fear of intimacy.

How do you fix erectile dysfunction?

There are numerous treatments for ED. These can include:

  • medications such as PDE-5 inhibitors
  • vacuum devices
  • surgery

Treating an underlying cause may also help. A person’s doctor can help a person create a suitable treatment plan.

Can masturbation cause ED?

Masturbation cannot cause ED.

Recent research found that higher masturbation frequency and pornography use was weakly linked to ED.

Someone could try using the sexual health inventory for men questionnaire.

However, a person should speak with a healthcare professional for accurate diagnosis and treatment recommendations.

Erectile dysfunction (ED) is when a person is regularly unable to attain a full erection. The condition is common and affects around 20 million Americans.

A person may experience ED as a result of physical factors such as high cholesterol levels, or due to psychological reasons, such as sexual performance anxiety.

A doctor may recommend a number of treatments for ED including prescription medication or, in rare cases, surgical intervention.