Health information to help you understand symptoms. It isn't a diagnosis.
Check symptoms

Trouble getting or keeping an erection

Also called: Erectile dysfunction, ED, impotence

Trouble getting or keeping an erection (erectile dysfunction, or ED) is common, especially with age. It's often linked to blood vessel problems from heart disease, diabetes, high blood pressure, or smoking. Stress, depression, and medicines can play a role too. ED can be an early warning sign of heart disease, so it's worth a checkup.

Common causesHeart and blood vessel disease, diabetes, medicines, stress
Usually serious?Not dangerous itself, but can signal heart disease
Get checked ifIt keeps happening or bothers you
If you think it's an emergency, call 911.Thinking about suicide? Call or text 988.

Overview

An erection needs healthy blood vessels, nerves, hormones, and a relaxed state of mind. A problem with any of these can cause ED. Occasional trouble is normal and not a concern.

Because the blood vessels in the penis are small, ED can show up before heart disease causes other symptoms. Diabetes, high blood pressure, high cholesterol, smoking, and obesity raise the risk. Many medicines, alcohol, and drugs can cause ED, as can anxiety, depression, and relationship stress.

When to get medical care

Call 911An erection that lasts more than 4 hours (priapism). Chest pain during sex.
Get care todaySudden ED after a pelvic or spinal injury, especially with numbness or bladder or bowel problems.
See a doctor soonED that keeps happening. ED with low sex drive, tiredness, or breast changes. ED with pain or a curve in the penis. ED that started after a new medicine. ED if you haven't had a checkup for heart disease and diabetes.

Causes

Common causes include heart and blood vessel disease, diabetes, high blood pressure, high cholesterol, obesity, smoking, alcohol, and aging. Other causes include medicines (some blood pressure medicines, antidepressants, and prostate medicines), low testosterone, nerve damage, prostate surgery or radiation, Peyronie's disease, stress, anxiety, depression, and relationship problems.

OwieClear has pages on 4 conditions that can cause trouble getting or keeping an erection. Each shows how soon to get care.

Common causes

Less likely causes

What you can do at home

  • Exercise regularly, which improves blood flow.
  • Lose weight if you're overweight.
  • Quit smoking and limit alcohol.
  • Manage stress and get enough sleep.
  • Talk with your partner, and consider counseling.

Medicines

Prescription pills like sildenafil (Viagra) and tadalafil (Cialis) help many men. Don't take them with nitrate heart medicines, and don't buy them from unreliable sources. Other options include injections, vacuum devices, and implants. Don't stop a prescribed medicine on your own.

At the doctor

The provider will look for the cause and check your heart health.

Questions you may be asked

  • How long you've had ED and whether it's all the time
  • Morning or night erections
  • Sex drive
  • Your medicines, alcohol, and smoking
  • Heart disease, diabetes, or surgery
  • Stress, mood, and relationship

The exam

A physical exam, including blood pressure and genitals.

Tests

  • Blood sugar and cholesterol tests
  • Testosterone level
  • Thyroid tests

Prevention

Healthy habits protect erections and your heart.

  • Don't smoke
  • Stay active
  • Keep a healthy weight
  • Control blood pressure, cholesterol, and diabetes

Check your symptoms

Most symptoms have more than one possible cause. The symptom checker looks at all of your symptoms together, plus your age, and shows how soon to get care.

Start the symptom checker

Sources

Last updated 2026-11-13.