Doctors once believed that most cases of erectile dysfunction (ED) were caused by psychological problems. That is no longer thought to be the case.

ED affects as many as 30 million American men, according to the National Institute of Diabetes and Digestive and Kidney Diseases (NIDDK). Some erection problems are psychological, but doctors now recognize that many cases of ED are caused by underlying medical problems.

A physician’s initial evaluation for ED will typically involve taking a simple medical history and performing a physical examination. If this initial evaluation suggests a physical cause for your ED, diagnostic tests may be necessary to determine the underlying cause.

Read more: What Do You Want to Know About Erectile Dysfunction? »

A variety of different tests can be used to identify the cause of your ED, including:

Physical exam

A detailed physical exam can help your doctor assess your overall health. Your doctor will likely check your blood pressure and ask about any recent injuries or illnesses. They will also ask about any current medications or supplements you may be taking. They will examine your penis and testicles for any obvious abnormalities.

Psychological testing

Your doctor may want to assess whether any psychological problems could be contributing to your ED. They will probably check you for signs of:

  • stress
  • depression
  • anxiety

Your doctor may ask about your relationship with your romantic partner and detailed questions about your sex life.

Nocturnal erection test

Men usually have erections at night as they sleep. Many separate physiological systems are required to achieve an erection, so the presence of nighttime erections can help determine whether your ED has a physical or mental cause.

A nocturnal erection test can determine if you have nighttime erections. According to the Mayo Clinic, this test involves placing a ring of special tape around the penis before sleep. If you have an erection, the tape will separate overnight. If there is genuine dysfunction of the physiological structures required to produce an erection, then nocturnal erections won’t occur. This could be due to underlying medical conditions, such as:

On the other hand, if all biological systems needed for an erection are functional and the cause of ED is psychological, nighttime erections will still be present during deep slumber typical of the REM phase of sleep.

Blood and urine tests

Blood and urine tests can detect signs of diseases associated with erectile dysfunction, such as:

These tests can also indicate if hormone levels play a role in your ED.


An ultrasound uses sound waves to see inside the body. It’s an effective way of examining blood flow. When a man has ED, an ultrasound can check blood flow in the penis. An ultrasound wand is simply moved over the blood vessels that supply the penis.

Sometimes, an injection may be used to stimulate an erection before this test. Then an ultrasound can check whether blood flow increases appropriately. Pain from the injection is rare. If you do have discomfort, it will likely be mild and subside quickly. However, if you are afraid of injections, talk to your doctor. It may be possible to use an erectile dysfunction drug, such as sildenafil (Viagra), before the test instead.

Erectile dysfunction affects many men, and there are many tests used to diagnose it. Most of the tests are simple and painless and will help your doctor better understand your condition so that you can live a happy and fulfilling life. Talk to your doctor if you are experiencing symptoms of ED.