New here? Find the right treatment for you →

Erectile Dysfunction: Causes and Tests

Erectile dysfunction, usually shortened to ED, means not getting or keeping an erection firm enough for the sex you want, often enough that it has become a pattern. An off night is not ED. A few months of it is worth a proper look.

An erection is a blood-flow event. Nerves signal the arteries of the penis to open, blood fills the two spongy chambers called the corpora cavernosa, and the outflow veins are squeezed shut against the tough outer sheath. Anything that damages the small arteries, the nerves, the hormones that set the scene or the mood that starts it can show up here first.

The arteries in the penis are narrower than the ones in the heart, so they tend to struggle earlier. ED is often the first visible sign of something else, which is why the tests matter more than the tablets.

On this page
  1. How common it is
  2. What causes it
  3. The heart warning
  4. What a GP or urologist checks
  5. Specialist tests
  6. After prostate cancer surgery
  7. FAQ

How common it is

Very. The large population studies of middle-aged and older men found that roughly half of men between 40 and 70 report some degree of ED, from occasional to complete. It climbs steadily with age. Mild problems are common in a man's forties; by his seventies, more men have some difficulty than do not.

Younger men get it too. A meaningful minority of men who see a doctor about ED are under 40, and in younger men the cause is more often psychological, medication-related or linked to a condition nobody had diagnosed yet.

Something this common is easy to shrug off as age, and the shrug is where the useful warning gets lost.

What causes it

Most ED has more than one cause, and a physical cause usually picks up a psychological layer on top once a man starts worrying about the next attempt.

Blood vessels. The commonest physical cause. The same things that fur up arteries elsewhere, smoking, high blood pressure, high cholesterol, excess weight, inactivity, narrow the small arteries of the penis. Less often, the veins fail to close properly and blood drains out too fast, which is called venous leak.

Diabetes. Men with diabetes get ED more often, earlier and more severely, because diabetes damages both the small blood vessels and the nerves. ED can be the symptom that leads to the diagnosis.

Nerves. Spinal cord injury, multiple sclerosis, pelvic surgery, and radiotherapy for prostate, bladder or rectal cancer can all interrupt the signal.

Hormones. Low testosterone lowers desire more than it directly stops erections, but it matters, and it blunts the effect of tablets. A raised prolactin level or a thyroid problem is less common and worth excluding.

Medications. Some antidepressants (SSRIs in particular), some blood pressure drugs such as thiazide diuretics and older beta blockers, anti-androgens used for prostate cancer, finasteride, opioids and some antipsychotics are the usual suspects. Never stop a prescribed drug on your own; ask whether there is an alternative.

Alcohol, recreational drugs and anabolic steroids. Heavy drinking, regular cannabis or cocaine, and the crash in natural testosterone after a steroid cycle all feature.

Psychological. Performance anxiety, depression, relationship strain and stress. Sudden onset, erections that work alone but not with a partner, and normal morning erections all point this way. Psychological does not mean imaginary, and it is often very treatable.

Structural. Curvature or scarring from Peyronie's disease can cause ED or sit alongside it.

The heart warning

This is the part of ED that most men never hear. Long-term studies have repeatedly found that ED tends to show up a few years before symptoms of heart disease. The commonly cited window is somewhere around two to five years before angina, a heart attack or a stroke. The link is strongest in younger men, where ED is a bigger red flag than it is at 70.

It does not mean a man with ED is about to have a heart attack. It means ED is a reason to check blood pressure, cholesterol, blood sugar and weight now, while there is still time to do something about them. Cardiology groups have said as much for years.

Every urologist I have put this to agrees that the man who comes in wanting a prescription and leaves with a blood pressure reading has had the more useful appointment. The tablet treats the symptom. The check might change what happens in the next decade.

Before you ask for tablets

Book the appointment as a check-up, not a prescription request. Say you have had erection problems for a while and would like your heart and diabetes risk checked as well, so the conversation starts where it should.

What a GP or urologist checks

Most ED is assessed in general practice. A urologist or andrologist comes in when the basics don't explain it, first-line treatment fails, or there is a structural problem. Which specialist covers who does what.

The history. This does most of the work. Expect questions about when it started, whether it came on suddenly or gradually, morning erections, erections during masturbation, desire, ejaculation, curvature, your medications, alcohol, smoking, exercise, mood and your relationship. Answer plainly. Doctors hear this every day.

The examination. Blood pressure, pulse, weight and waist, and a look at the penis and testicles for curvature, plaques or small testes. Some doctors check the prostate.

Blood tests. The standard set is:

  • HbA1c or fasting glucose, for diabetes
  • a cholesterol and lipid profile
  • total testosterone, taken in the morning, ideally between about 7 and 11am, because levels are highest then and a low afternoon result can mislead
  • often prolactin, thyroid function and kidney and liver function, depending on the history

A low testosterone result is usually repeated before anyone acts on it. Testosterone treatment itself is outside the scope of this site.

Where the results point to heart or diabetes risk, that gets treated in its own right. Losing weight, stopping smoking and more exercise improve erections in a fair number of men on their own, and they make every treatment on the other pages work better.

The week before the appointment

Write down every medicine and supplement you take, including anything bought online, and note whether you still get morning erections. Those two things answer half the questions you will be asked.

Specialist tests

Most men never need these. They are used when the diagnosis is unclear, when a man is young with no obvious cause, when there has been pelvic trauma, or before surgery.

Penile Doppler ultrasound. The specialist injects a drug into the side of the penis to produce an erection, the same kind of drug described on the injections page, then measures blood flow with ultrasound. Slow inflow suggests an arterial problem; fast outflow suggests venous leak. The test also shows scarring and plaques, and doubles as a trial of whether injections work for you.

Nocturnal erection testing. Healthy men have several erections during sleep. A band or ring worn overnight records them. Normal night-time erections with problems during sex point towards a psychological cause. It is used less often now than it was.

Other tests. Occasionally, nerve studies or detailed imaging of the arteries, usually in young men after pelvic injury who might be candidates for vascular surgery, which is rarely done.

Where tablets no longer help, the specialist's next step is usually injections or a vacuum device, and after those the penile implant.

After prostate cancer surgery

ED after radical prostatectomy is common and expected. The nerves that control erections run right alongside the prostate. Even when the surgeon spares them, they are stretched and bruised, and they take a long time to recover. Recovery often continues for up to two years and sometimes longer. How well it recovers depends on erections before surgery, age, and whether the nerves on one side, both sides or neither could be spared.

Penile rehabilitation means using treatment early and regularly after surgery, tablets, a vacuum device or injections, rather than waiting to see what comes back. The thinking is that regular blood flow keeps the erectile tissue healthy while the nerves heal, and helps limit the shortening some men notice afterwards. The evidence that it changes the final outcome is mixed, and the main guidelines stop short of calling it proven. Many urologists still recommend it, and a plan agreed before the operation is easier to start than one improvised after.

Radiotherapy works differently. ED after radiotherapy tends to come on gradually over the following years rather than straight away.

Of the men I have met in implant consultations, a noticeable share had their prostate removed years earlier and were never offered anything more than a tablet. When tablets and injections have run out, an implant is a well-established option after prostate cancer.

Before prostate surgery

Ask the surgeon what the plan for erections is afterwards, when it starts and who you contact about it. Having that written down before the operation means you are not chasing it months later.

Frequently asked questions

Is erectile dysfunction a sign of heart disease?

It can be an early one. ED often appears a few years before heart symptoms, because the penile arteries are smaller. It is a reason to get checked, not a diagnosis. See the heart warning.

How do I know if my ED is psychological?

Sudden onset, normal morning erections and erections that work alone but not with a partner point that way. Many men have a mix of physical and psychological causes. See what causes it.

Why does my testosterone need testing in the morning?

Levels are highest in the morning and fall through the day, so an afternoon result can look falsely low. A low result is usually repeated. See what a GP or urologist checks.

Should I see a GP or a urologist first?

A GP for most men. They can run the tests and start treatment, and refer on if the basics don't explain it or first-line treatment fails.

Will my erections come back after a prostatectomy?

Often partly, sometimes fully, over up to two years or more. It depends on your erections before surgery, your age and whether the nerves were spared. See after prostate cancer surgery.