In this article (13 sections)
An erection can look like a simple event, but it is the end point of a chain that runs from the brain, through the nerves and hormones, to the blood vessels of the penis. Sexual interest and touch trigger nerve signals; those signals tell the smooth muscle in the penis to relax; the relaxed tissue fills with blood; and the outflow of blood is restricted so the erection holds. If any link in that chain is weakened, erections can become less reliable. Understanding which link is involved is the first step toward choosing a sensible treatment.
Most men have more than one cause
It is tempting to look for a single explanation, but European urology guidelines note that most ED is "mixed": a physical problem and a psychological response often sit side by side. A man whose arteries have started to narrow may notice a softer erection one night, start worrying about it, and find that the worry itself makes the next attempt harder. Treating only one side of that loop may leave the other in place.
With that in mind, here are the main groups of causes doctors consider.
Blood vessel (vascular) causes
Reduced blood flow is the most common physical cause of ED, especially in men over 40. The arteries supplying the penis are narrow, so the same processes that stiffen and clog arteries elsewhere in the body can affect them early. The main drivers are:
- atherosclerosis (fatty build-up in the artery walls)
- high blood pressure
- high cholesterol
- smoking
- a past stroke or other vascular disease
Because these are the same risks that lead to heart attacks, ED with a vascular cause can be an early warning about heart health. We explain this in our guide to ED and heart health.
Diabetes and other long-term conditions
Diabetes affects erections in two ways at once: high blood sugar over years damages both small blood vessels and nerves. Men with diabetes tend to develop ED earlier and may find it harder to treat. Other long-term conditions linked with ED include chronic kidney disease, obesity, chronic lung disease and sleep apnea. In the Massachusetts Male Aging Study, heart disease, high blood pressure and diabetes stayed linked to ED even after taking age into account.
Hormonal causes
Testosterone supports sex drive and plays a role in erections, so low testosterone can contribute, often alongside reduced interest in sex, tiredness or low mood. Thyroid problems and high levels of the hormone prolactin are less common causes. A blood test can check hormone levels when symptoms suggest a hormonal cause, and it is usually worth doing before assuming the problem is purely physical or purely psychological.
Nerve-related (neurogenic) causes
The nerves that carry signals to the penis can be affected by:
- spinal cord injury
- multiple sclerosis or Parkinson's disease
- surgery or radiation in the pelvis, including treatment for prostate, bladder or bowel cancer
- long-standing diabetes (diabetic neuropathy)
Nerve-related ED often needs specialist input from a urologist, particularly after pelvic surgery.
Structural causes
Less often, the problem lies in the penis itself. Peyronie's disease, where scar tissue forms and causes the penis to curve, can interfere with erections. An enlarged prostate does not usually cause ED directly, but the conditions often occur together, and some prostate medicines can affect sexual function.
Medications that can affect erections
A surprising number of everyday medicines list erection problems among their side effects. The National Institute of Diabetes and Digestive and Kidney Diseases highlights:
- antidepressants, especially SSRIs
- some blood pressure medicines and diuretics ("water pills")
- antihistamines
- appetite suppressants
- some pain relievers, including opioids
- sedatives and sleeping tablets
- some ulcer medicines
- hormone treatments and chemotherapy
If ED started soon after a new prescription, that is worth mentioning to the prescriber. Do not stop a prescribed medicine on your own: there is often an alternative or a dose change that can help, and stopping suddenly can be risky.
Psychological causes
The brain starts the erection process, so mood and mind matter. Common psychological contributors include:
- stress at work or home
- anxiety, including performance anxiety about sex itself
- depression
- low self-esteem or body image concerns
- relationship conflict or poor communication
- past negative sexual experiences
A useful clue is the pattern. If you still wake with erections or can get an erection on your own but struggle with a partner, a psychological element is more likely, although it does not rule out a physical cause. Our guide to performance anxiety and ED looks at this in depth.
Lifestyle factors
Several everyday habits can affect erections, often by acting on blood vessels:
- smoking, which damages artery linings
- heavy or regular drinking
- recreational drugs, including cannabis and stimulants
- low physical activity
- excess weight, especially around the waist
- poor sleep
The encouraging side is that these are factors you can change. Our guide to lifestyle changes for ED covers what the trials show.
How age fits in
ED becomes more common as men get older. In a US national survey, about 5% of men aged 20 to 39 reported ED, compared with about 15% of men in their 40s and 50s and a much higher share of men over 60. Earlier community research found that complete ED rose from about 5% of men at 40 to about 15% at 70.
Age is not the cause in itself, though. Older men are more likely to have the vascular, metabolic and medication-related causes described above. ED in a younger man is still worth checking: it is more likely to have a psychological or lifestyle element, but it can also be an early sign of a vascular problem.
When to see a doctor
Book an appointment if erection problems have lasted more than a few weeks, keep coming back, or are worrying you. It is especially worth seeing a doctor promptly if:
- ED came on suddenly
- you also have chest pain, shortness of breath on exertion or leg pain when walking
- you have diabetes, high blood pressure or high cholesterol
- you notice low sex drive, tiredness or other signs of a hormonal problem
- you started a new medicine shortly before the problem began
A typical assessment includes questions about the pattern of the problem, your general health and your medicines, a blood pressure check, and blood tests for sugar, cholesterol and sometimes testosterone. That information helps the doctor decide which treatments are likely to be safe and useful for you.
If you ever get chest pain during sex, or an erection that will not go down after 4 hours, treat it as an emergency and seek help straight away.
Finding the cause is worth the effort. Treating a vascular or metabolic driver can protect your long-term health, and knowing whether stress plays a part helps you choose support that addresses it directly.
Sources
- National Institute of Diabetes and Digestive and Kidney Diseases: Symptoms and causes of erectile dysfunction
- Feldman HA et al. Impotence and its medical and psychosocial correlates: results of the Massachusetts Male Aging Study. J Urol, 1994
- Selvin E et al. Prevalence and risk factors for erectile dysfunction in the US. Am J Med, 2007
- Salonia A et al. European Association of Urology guidelines on male sexual and reproductive health, 2025 update
- Thompson IM et al. Erectile dysfunction and subsequent cardiovascular disease. JAMA, 2005
- Burnett AL et al. Erectile dysfunction: AUA guideline. J Urol, 2018
Related reading
- Erectile dysfunction overview: treatment options and when to see a doctor.
- ED and heart health: why vascular ED can signal heart risk.
- Performance anxiety and ED: when the mind is part of the problem.
- Lifestyle changes for ED: habits that may improve erections.
- ED medication safety: checks before starting treatment.
This article is for education only and is not a substitute for professional medical advice. Do not start, stop or change a medication without speaking to a licensed clinician. If you have chest pain, an erection lasting more than four hours, or sudden loss of vision or hearing, seek emergency care.