SymptomMen's health
Trouble Getting or Keeping an Erection
Erectile dysfunction (ED) as a symptom means trouble getting or keeping an erection firm enough for sex. Occasional problems are normal, especially with tiredness, stress or alcohol. When it happens often for more than a few weeks, it usually has a physical cause such as reduced blood flow, diabetes, medicines or low testosterone, sometimes combined with anxiety. ED can be an early warning sign of heart disease, so it is worth raising with a doctor.
Also called: Impotence, difficulty getting an erection, weak erections, losing an erection, ED
At a glance
- What it is
- Difficulty getting or keeping an erection firm enough for satisfying sex.
- How common
- Affects roughly 1 in 3 men at some point, and becomes more common with age.
- Main causes
- Blood vessel disease, diabetes, high blood pressure, medicines, low testosterone, smoking, alcohol, stress and anxiety.
- Key clue
- Normal morning or nighttime erections suggest a psychological cause.
- Why it matters
- It can appear 2 to 5 years before heart disease symptoms.
When to get help
Call 911 or go to the ER
- An erection lasting more than 4 hours, especially if painful (priapism)
- Chest pain, breathlessness or dizziness during sex
- Sudden ED with numbness in the groin or buttocks, new leg weakness or loss of bladder or bowel control
- Sudden vision loss or chest pain after taking an erection medicine
See a doctor within a day or two
- A sudden bend in the penis with a snapping sound and swelling during sex, which may be a penile fracture
- New ED after pelvic surgery, injury or radiation, with pain or blood in the urine
Book a routine appointment
- Erection problems on most attempts for more than a few weeks
- ED with low sex drive, tiredness, loss of body hair or breast tenderness
- ED with a curved or painful erection, or a lump in the shaft
- ED with urinary symptoms such as a weak stream or getting up at night
- ED in someone with diabetes, high blood pressure, high cholesterol or who smokes, as a prompt for a heart health check
Usually safe to manage at home
- An occasional problem linked to tiredness, stress or alcohol, with normal erections at other times
What erectile dysfunction feels like
ED is not all-or-nothing. You might notice:
- difficulty getting an erection at all
- an erection that is not firm enough for penetration
- losing the erection before or during sex
- needing much more stimulation than before
- fewer morning erections
ED is different from low sex drive (loss of interest) and from premature ejaculation, though they can occur together. Our erectile dysfunction condition page covers diagnosis and the full range of treatments.
Causes of trouble getting an erection
An erection depends on healthy blood vessels, intact nerves, hormones and the right mental state. A problem in any of them can cause ED. Most men have more than one contributing factor.
Blood flow problems (the most common)
The penile arteries are narrow, so they are often affected by the same artery disease that later affects the heart. Risk factors include:
- high blood pressure
- high cholesterol and atherosclerosis
- smoking and vaping nicotine
- obesity and physical inactivity
Diabetes
Men with diabetes are about three times as likely to have ED, often at a younger age, because diabetes damages both blood vessels and nerves. ED is sometimes the first sign of undiagnosed type 2 diabetes.
Medicines and substances
- certain blood pressure drugs (thiazide diuretics, older beta-blockers)
- antidepressants (SSRIs, SNRIs) and antipsychotics
- finasteride and dutasteride for the prostate or hair loss
- opioids, some antiepileptics, and drugs that lower testosterone
- heavy alcohol, cannabis, cocaine and anabolic steroids
Do not stop a prescribed medicine on your own. A doctor can often switch to an alternative.
Hormones
Low testosterone usually reduces desire more than erections, but it contributes to ED. Thyroid problems and high prolactin can also play a part.
Nerve problems and surgery
Prostate cancer surgery or radiation, pelvic or rectal surgery, spinal cord injury, multiple sclerosis and diabetic nerve damage can interrupt nerve signals.
Penile and pelvic problems
Peyronie's disease (scar tissue causing curvature), previous penile fracture, and enlarged prostate symptoms are linked with ED.
Psychological causes
Performance anxiety, stress, depression, relationship problems, pornography-related expectations and past sexual trauma can all cause ED. Once one episode happens, worry about the next can create a cycle.
Sleep and lifestyle
Obstructive sleep apnea, poor sleep, cycling for long periods on a narrow saddle, and lack of exercise all contribute.
Physical or psychological? Clues
| More likely physical | More likely psychological |
|---|---|
| Gradual onset over months | Sudden onset, often linked to an event |
| Affects all situations, including masturbation | Varies with partner or situation |
| Morning erections are rare or absent | Normal morning or nighttime erections |
| Risk factors: diabetes, smoking, age, medicines | Stress, anxiety, relationship problems |
Many men have a mix of both.
Erectile dysfunction in young men
ED in men under 40 is more often psychological or lifestyle-related, but physical causes such as diabetes, high blood pressure, drug or steroid use, and hormone problems still need to be checked.
Sudden erectile dysfunction
ED that starts abruptly is often linked to stress, a new medicine, alcohol, or a relationship change. Sudden ED with numbness in the saddle area or bladder changes can signal nerve compression and needs urgent care.
ED and heart health
Because penile arteries are smaller than coronary arteries, they show narrowing earlier. ED often appears 2 to 5 years before symptoms of coronary artery disease. A doctor seeing you for ED will usually check your blood pressure, cholesterol and blood sugar and assess your heart risk.
When to see a doctor
See a primary care doctor or urologist if erection problems happen on most attempts for more than a few weeks, if they bother you or your partner, or if you have other symptoms such as low sex drive, urinary problems or a penile curve. It is a common reason for a visit, and doctors ask about it routinely.
What you can do now
- Move more: about 150 minutes a week of moderate exercise such as brisk walking improves erections.
- Lose excess weight and eat a heart-healthy diet such as the Mediterranean diet.
- Stop smoking. Erections often improve within months.
- Limit alcohol and avoid recreational drugs.
- Sleep 7 to 9 hours, and get snoring checked.
- Pelvic floor exercises can strengthen the muscles that help maintain an erection.
- Reduce pressure: focus on intimacy rather than performance, and talk with your partner.
Avoid buying erection pills online without a prescription. Products sold as "herbal" are frequently contaminated with undeclared prescription drugs, which can be dangerous with heart medicines.
Frequently asked questions
What is the most common cause of erectile dysfunction?
The most common cause is reduced blood flow to the penis from artery disease linked to age, high blood pressure, high cholesterol, diabetes, smoking and obesity. In younger men, stress, anxiety and lifestyle factors are more common causes. Many men have both physical and psychological factors.
Can erectile dysfunction be a sign of heart disease?
Yes. The arteries in the penis are small and often show narrowing years before the heart arteries do. ED can appear 2 to 5 years before chest pain or a heart attack, so doctors use it as a prompt to check heart risk factors.
Is it normal to lose an erection sometimes?
Yes. Occasional difficulty is normal and often linked to tiredness, stress, alcohol or distraction. It becomes a concern when it happens on most occasions for several weeks or causes distress.
Can anxiety cause erectile dysfunction?
Yes. Anxiety triggers stress hormones that tighten blood vessels and work against arousal. Performance anxiety after one bad experience is common and can create a cycle. Normal morning erections suggest anxiety is a main factor. Counseling and sex therapy help, sometimes alongside medicine.
Can erectile dysfunction be reversed?
Often, yes. Exercise, weight loss, stopping smoking, reducing alcohol, treating sleep apnea and changing medicines can improve or reverse ED, especially when caught early. When the cause cannot be removed, effective treatments are available for most men.
Sources
This guide was written from current patient and clinical guidance, including:
- American Urological Association: Erectile Dysfunction Guideline (2018)
- National Institute of Diabetes and Digestive and Kidney Diseases: Erectile Dysfunction
- Urology Care Foundation: What is Erectile Dysfunction?
- NHS: Erection problems (erectile dysfunction)
- MedlinePlus: Erectile dysfunction