General information only. It does not replace advice from a health professional. For high fever with loin pain, being unable to pass urine, sudden testicular pain or heavy bleeding in the urine, call emergency services.

What it is
Erectile dysfunction (ED) is the persistent inability to get or keep an erection rigid enough and long enough for satisfying sexual intercourse. It is called dysfunction when it happens regularly for at least three months; an occasional failure (from tiredness, alcohol or nerves) is normal and not a disease.
To understand it, it helps to know the male reproductive system. An erection is a vascular and nervous event:
- Sexual stimulation (physical or mental) activates the pelvic nerves, which release nitric oxide in the penis.
- Nitric oxide increases a molecule called cyclic GMP, which relaxes the smooth muscle of the arteries and the corpora cavernosa (two spongy cylinders running along the penis).
- Blood flows in in large amounts, the corpora fill and compress the veins against their sheath (the tunica albuginea), so blood is trapped and the penis becomes rigid.
- The enzyme phosphodiesterase 5 (PDE5) breaks down cyclic GMP and returns the penis to the flaccid state. The most widely used drugs work by blocking this enzyme.
Any problem with the arteries, nerves, hormones, penile tissue or psychological state can disrupt this process. That is why ED is often a symptom of another condition.
In numbers
- In Spain, the EDEM study (Martín-Morales and colleagues, Journal of Urology, 2001), of more than 2,400 men aged 25 to 70, found a prevalence of 12.1%, rising with age: under 9% before 40 and almost half from 70 onwards.
- The classic Massachusetts Male Aging Study (1994) found some degree of ED in 52% of men aged 40 to 70, severe in 10%.
- More than 300 million men worldwide are estimated to have ED. In the UK, estimates suggest around half of men aged 40-70 experience it to some degree.
- In people with diabetes, ED affects more than half and appears 10-15 years earlier than in the general population. In advanced chronic kidney disease and on dialysis, most men have it.
- Vascular ED precedes many heart attacks or strokes by 2 to 5 years, because penile arteries are narrower than coronary arteries and block earlier.
Types
| Type | Features | Examples |
|---|---|---|
| Organic, vasculogenic | The most common; gradual onset, worsens over years, reduced morning erections | Atherosclerosis, hypertension, diabetes, cholesterol, smoking, obesity |
| Neurogenic | Damage to the nerves that trigger erection | Diabetes, multiple sclerosis, spinal cord injury, pelvic surgery (radical prostatectomy, cystectomy, rectal surgery), radiotherapy |
| Hormonal (endocrine) | Associated with reduced sex drive | Hypogonadism (low testosterone), high prolactin, thyroid disorders |
| Anatomical or structural | Changes in penile tissue | Peyronie's disease, previous priapism, trauma, fibrosis |
| Drug-related | Coincides with starting a medicine | Antidepressants, antipsychotics, thiazide diuretics, some beta-blockers, anti-androgens, opioids, alcohol, cannabis, cocaine |
| Psychogenic | Sudden onset, situational, night-time and morning erections preserved | Performance anxiety, depression, stress, relationship conflict |
| Mixed | The commonest: a physical cause compounded by anxiety | — |
Causes and risk factors
- Age: the main factor, although ED is not an inevitable part of ageing.
- Cardiovascular risk factors: diabetes (see diabetic kidney disease), high blood pressure, high cholesterol, obesity, inactivity and, very markedly, smoking (see smoking, alcohol and urological health).
- Established cardiovascular disease, metabolic syndrome, sleep apnoea.
- Male lower urinary tract symptoms: benign prostatic enlargement and ED share mechanisms and often coexist. Some prostate treatments, such as 5-alpha reductase inhibitors, can make it worse.
- Pelvic surgery and radiotherapy, especially for prostate cancer.
- Chronic kidney disease and dialysis: through uraemia, anaemia, hormonal changes and medication.
- Depression and anxiety, and the drugs used to treat them.
- Excess alcohol, cannabis, cocaine and anabolic steroids.
Symptoms
- Difficulty getting an erection or keeping it until the end of intercourse.
- Less firm erections than before, not allowing penetration or being lost.
- Fewer night-time and morning erections (suggests a physical cause).
- Often accompanied by anxiety, avoidance of sex, relationship problems or, if testosterone is low, reduced desire.
- May coexist with premature ejaculation: some men ejaculate sooner for fear of losing the erection.
Act immediately: call 112 (in Europe, or your local emergency number) if an erection lasts more than 4 hours (with or without pain), especially after injections or tablets: it is priapism and can permanently damage the penis. Also seek help for chest pain, breathlessness or dizziness during or after sex, and never take nitrates (glyceryl trinitrate) if you have taken a PDE5 inhibitor in the preceding hours: tell the healthcare team.
Diagnosis
The practical summary for primary care is in the erectile dysfunction management guide. The EAU guidelines on sexual and reproductive health (2026 edition) and the AUA guideline (2018) agree that diagnosis is mainly clinical.
Interview and questionnaires
The doctor asks about onset (sudden or gradual), circumstances (with all partners? during masturbation?), morning erections, desire, ejaculation, the relationship, mood, illnesses and all medicines. Validated questionnaires are used (see IIEF score and testosterone):
| IIEF-5 (SHIM) score | Degree of erectile dysfunction |
|---|---|
| 22-25 | None |
| 17-21 | Mild |
| 12-16 | Mild to moderate |
| 8-11 | Moderate |
| 5-7 | Severe |
The Erection Hardness Score (EHS) runs from 1 (penis larger but not hard) to 4 (completely rigid); a score of 3 or 4 usually allows penetration.
Physical examination
Blood pressure, weight and waist circumference, pulses, examination of the penis (Peyronie's plaques, phimosis), the testicles (size, consistency), body hair and breasts (signs of hypogonadism) and, depending on age and urinary symptoms, the prostate.
Blood tests
| Test | Purpose | Guide thresholds |
|---|---|---|
| Fasting glucose or HbA1c | Detect diabetes | Glucose ≥ 126 mg/dL (7.0 mmol/L) or HbA1c ≥ 6.5% (48 mmol/mol) suggest diabetes |
| Lipid profile | Cardiovascular risk | According to overall risk |
| Total testosterone (morning, fasting, between 7 and 11 am) | Rule out hypogonadism | < 12 nmol/L (≈ 3.5 ng/mL) is low according to the EAU; < 8 nmol/L (≈ 2.3 ng/mL) clearly low. Repeat if low and measure LH |
| Prolactin, TSH, LH | If testosterone is low or desire is reduced | Laboratory-dependent |
| Creatinine, eGFR, potassium | If kidney disease is suspected or before certain drugs | See creatinine and glomerular filtration rate |
| PSA | In men who will be given testosterone or have prostate symptoms, after discussion | See PSA |
The tests are explained in detail in hormonal and erectile dysfunction testing.
Cardiovascular assessment
Every man with ED should be considered at risk of cardiovascular disease. Risk is calculated (with tools such as SCORE2 or, in the UK, QRISK3), blood pressure is measured and exercise tolerance is asked about: sexual activity is roughly equivalent to climbing two flights of stairs briskly. Anyone who cannot do that without symptoms needs cardiological assessment before resuming sex or starting treatment.
Special tests (selected cases only)
- Penile Doppler ultrasound after an intracavernosal injection of a vasodilator: measures blood velocity in the penile arteries. A peak systolic velocity < 25 cm/s suggests arterial insufficiency (> 35 cm/s is normal); an end-diastolic velocity > 5 cm/s suggests venous leak. Useful before surgery, in young men after trauma or in Peyronie's disease.
- Nocturnal erection recording (RigiScan): helps distinguish organic from psychogenic ED.
- Neurological studies or arteriography, exceptionally.
Treatment
Treatment depends on the cause, the preferences of the man and his partner, and his general health. It is offered in steps, although the order can be adapted.
1. General measures: treat the cause and the risk
- Stopping smoking, losing weight, regular aerobic exercise (at least 150 minutes a week), a Mediterranean diet and moderating alcohol improve erectile function, especially in mild ED, and protect the heart.
- Control diabetes, blood pressure and cholesterol.
- Review medicines: an antidepressant, diuretic or beta-blocker can sometimes be switched to one with less effect on erections. Do not stop anything yourself.
- Treat confirmed hypogonadism with testosterone; it can improve desire and response to tablets.
- Sex or couples therapy: essential in psychogenic ED and very helpful in all forms, alongside medication.
2. Oral drugs: PDE5 inhibitors
They are the first choice for most men. They work in about 2 out of 3 men, somewhat less in diabetes and after prostatectomy. They do not cause erections on their own: sexual stimulation is needed. See phosphodiesterase-5 inhibitors.
| Active substance | Onset | Approximate duration | Notes |
|---|---|---|---|
| Sildenafil | 30-60 min | 4-6 h (up to 12 h) | Fatty food delays its effect; sometimes transient bluish vision |
| Tadalafil | 30-120 min | Up to 36 h | Also as a low daily dose (5 mg), useful with frequent sex or urinary symptoms; may cause back pain |
| Vardenafil | 30-60 min | 4-6 h (up to 12 h) | Also as an orodispersible tablet |
| Avanafil | 15-30 min | Up to 6 h | The fastest onset |
- Common, mild side effects: headache, facial flushing, nasal congestion, indigestion, dizziness.
- Absolute contraindications: taking nitrates (glyceryl trinitrate, isosorbide mononitrate) or riociguat, because of the risk of a severe fall in blood pressure; recent heart attack or stroke, unstable angina or severe heart failure until assessed by a cardiologist.
- Precautions: with alpha-blockers (for the prostate), severe liver or kidney impairment (dose adjustment) and some antivirals or antifungals that raise their levels.
- A treatment that "doesn't work" has often been taken incorrectly: it should be tried at least 4-6 times at the right dose, with sexual stimulation and allowing for the waiting time and food.
- Do not buy these medicines from unregulated websites: many are counterfeit, with wrong doses or dangerous substances. In Spain they are prescription-only; in the UK, low-dose sildenafil and tadalafil are also available from pharmacists after a consultation.
3. If tablets do not work or cannot be used
These are described in erectile dysfunction treatments and implants:
- Alprostadil cream applied to the urethral opening, or intraurethral alprostadil (a small pellet): moderate effectiveness, no needles.
- Intracavernosal injections of alprostadil (or the aviptadil-phentolamine combination): the man injects himself with a very fine needle into the side of the penis; an erection appears within 5-15 minutes without stimulation. Effective in 70-90%. Risk of prolonged erection and fibrosis if misused; requires training in clinic.
- Vacuum devices: a cylinder creates a vacuum that draws in blood and a ring at the base holds it. Useful and inexpensive, especially for older men in stable relationships.
- Low-intensity shockwave therapy: may be offered for mild vasculogenic ED according to the EAU, with modest and variable results; not effective in severe forms.
- Therapies without sufficient evidence: platelet-rich plasma, stem cells or "natural" supplements should not be used outside clinical trials.
4. Penile implant
A penile prosthesis (usually a three-piece inflatable device, with cylinders in the corpora, a pump in the scrotum and a reservoir in the abdomen) is the option when everything else fails or is unacceptable. It allows erections on demand with satisfaction rates above 90% among men and their partners. Risks are infection (about 1-3%, somewhat more in poorly controlled diabetes) and long-term mechanical failure. It does not change sensation, orgasm or ejaculation.
Special situations
- After radical prostatectomy: recovery can take 1-3 years. Early penile rehabilitation (tablets, injections or vacuum devices) is recommended to support recovery, although evidence that it changes the final outcome is limited.
- Diabetes, kidney disease and dialysis: response to tablets is somewhat poorer, but they usually work; doses are adjusted in advanced CKD.
- Young men with psychogenic ED: sex therapy, sometimes with a temporary PDE5 inhibitor to restore confidence, usually solves the problem.
Prognosis and complications
- ED can be successfully treated in the vast majority of men, although it is not always cured. Psychogenic forms and those due to medicines or lifestyle can resolve completely.
- ED is a marker of cardiovascular risk: ignoring it means missing the chance to prevent a heart attack or stroke.
- Untreated, it affects self-esteem, relationships and quality of life, and is associated with anxiety and depression.
Prevention
- What is good for the heart is good for erections: don't smoke, keep moving, eat well, keep a healthy weight and sleep enough.
- Control blood pressure, glucose and cholesterol.
- Moderate alcohol and avoid drugs and anabolic steroids.
- Look after mental health and communication with your partner.
Living with erectile dysfunction
- Talking about the problem with your partner reduces anxiety; involving them in consultations often improves results.
- Sexuality is more than penetration: touch, play and other practices remain satisfying while treatment is adjusted.
- Be patient with the first treatment and tell your doctor if it does not work: there is almost always an alternative.
- Keep up cardiovascular risk reviews.
Myths and facts
- "It's just age and can't be fixed." False: it is commoner with age but not inevitable and can almost always be treated.
- "It's all in the mind." False: most men over 40 have a physical cause, although anxiety makes it worse.
- "Viagra causes heart attacks." False: in people without contraindications, PDE5 inhibitors are safe for the heart; the danger is combining them with nitrates.
- "PDE5 inhibitors give an automatic erection." No: sexual stimulation is needed.
- "If one tablet doesn't work, none will." It has often been taken wrongly or at too low a dose; another can be tried, or other options.
- "Natural supplements work just as well." There is no evidence, and some "natural" products sold online contain hidden drugs.
Questions to ask your doctor
- What is the likely cause of my erectile dysfunction?
- Should I have tests for glucose, cholesterol or testosterone? And a heart check?
- Could any of my medicines be contributing?
- Which drug suits me and how should I take it so it works?
- Is it safe with my other treatments?
- What are my options if tablets don't work?
- Could sex or couples therapy help us?
Sources
- European Association of Urology. EAU Guidelines on Sexual and Reproductive Health, 2026 edition. Arnhem: EAU Guidelines Office; 2026.
- Salonia A, et al. European Association of Urology guidelines on male sexual and reproductive health: 2025 update on male hypogonadism, erectile dysfunction, premature ejaculation, and Peyronie's disease. Eur Urol. 2025. doi:10.1016/j.eururo.2025.04.010.
- Burnett AL, et al. Erectile dysfunction: AUA guideline. J Urol. 2018;200:633-41.
- Martín-Morales A, et al. Prevalence and independent risk factors for erectile dysfunction in Spain: results of the Epidemiologia de la Disfuncion Erectil Masculina Study. J Urol. 2001;166:569-74.
- Feldman HA, et al. Impotence and its medical and psychosocial correlates: results of the Massachusetts Male Aging Study. J Urol. 1994;151:54-61.
- Rosen RC, et al. Development and evaluation of an abridged, 5-item version of the International Index of Erectile Function (IIEF-5). Int J Impot Res. 1999;11:319-26.
- Agencia Española de Medicamentos y Productos Sanitarios. Centro de Información de Medicamentos (CIMA).
- MedlinePlus. Erectile dysfunction.
Sources reviewed and updated in November 2026.
History · Medicapedia
The history of this condition
How it was described, who studied it and how its treatment has changed over the centuries, on Medicapedia, our sister encyclopedia of the history of medicine.
Medicines · Farmacos.ai
Drug information pages
What each medicine is for, how to take it, side effects and interactions, based on the official product information, on Farmacos.ai.