Difficulty getting an erection is one of the most common sexual health problems men experience, and it almost always has an identifiable, treatable cause. Among men aged 50, roughly 12% have moderate or complete erectile dysfunction (ED). By age 75, that number climbs to 58%. But ED isn’t just an aging issue. It affects younger men too, and the cause is often something fixable: a medication, a lifestyle habit, stress, or an underlying health condition that hasn’t been caught yet.
Understanding why erections fail starts with understanding how they work, and then looking at the specific things that can interrupt the process.
How an Erection Actually Works
An erection is a vascular event, meaning it depends almost entirely on blood flow. When you become aroused, your brain sends signals through nerves in your spine and pelvis that trigger the release of a signaling molecule called nitric oxide inside the penis. Nitric oxide causes the smooth muscle lining the two spongy chambers of the penis to relax and widen. Blood rushes in, fills those chambers, and the expanding tissue compresses the veins that would normally drain blood away. That’s what creates and maintains firmness.
Anything that disrupts this chain, whether it’s nerve signaling, blood vessel health, hormone levels, or the psychological arousal that kicks the whole process off, can make erections difficult or impossible.
Blood Vessel and Heart Health
The most common physical cause of ED is reduced blood flow, typically from the same process that narrows arteries throughout the body. The blood vessels in the penis are smaller than the ones feeding the heart, so they tend to show damage earlier. This is why ED often appears years before a heart attack or stroke. Research from the American Heart Association found that men with ED were nearly twice as likely to experience a major cardiovascular event compared to men without it, even after accounting for other risk factors.
High blood pressure, high cholesterol, and atherosclerosis (plaque buildup in arteries) all directly impair the blood vessel relaxation that erections depend on. If you’re having erection problems and haven’t had your blood pressure or cholesterol checked recently, those numbers matter.
Diabetes and Nerve Damage
Men with diabetes develop ED at three times the rate of men without it, roughly 28% compared to about 10%. The problem worsens with time: approximately 15% of diabetic men experience ED by age 30, rising to 55% by age 60. Diabetes attacks the erection process from multiple angles. Chronically high blood sugar damages the lining of blood vessels, reducing their ability to dilate. It also damages the small nerves responsible for triggering nitric oxide release in the penis. On top of that, diabetes can lower testosterone levels and affect the smooth muscle tissue itself.
Medications That Cause ED
If your erection problems started around the same time you began a new medication, the drug is a likely culprit. Several common categories of medication interfere with erections.
- Blood pressure drugs: Thiazide diuretics (water pills) are the most common offenders, followed by beta-blockers. These reduce blood flow or interfere with nerve signals involved in arousal.
- Antidepressants and anti-anxiety medications: SSRIs like fluoxetine (Prozac) and sertraline (Zoloft), along with benzodiazepines like diazepam (Valium) and lorazepam (Ativan), frequently cause sexual side effects including difficulty with erections and orgasm.
- Antihistamines: Common allergy and heartburn medications like diphenhydramine (Benadryl) and ranitidine can contribute to ED.
- Opioid painkillers: Codeine, fentanyl, and hydromorphone suppress testosterone production and dampen arousal signals.
- Prostate medications: Finasteride and dutasteride, prescribed for enlarged prostate or hair loss, affect hormone pathways that support erectile function.
Never stop a prescribed medication on your own because of sexual side effects. In many cases, switching to a different drug in the same class eliminates the problem without compromising treatment.
Low Testosterone
Testosterone fuels sex drive, and low levels can make it harder to become aroused in the first place, which in turn makes erections less reliable. The Endocrine Society considers levels below 300 ng/dL a point where treatment is worth considering, though some clinicians use a stricter cutoff of 200 ng/dL for formal deficiency. Low testosterone is particularly common in men who are overweight, have type 2 diabetes, or use opioid medications.
That said, testosterone alone isn’t usually the full picture. Many men with low testosterone get erections fine, and many men with normal levels don’t. Testosterone replacement helps most when the primary symptom is low desire rather than a mechanical problem with blood flow or nerve function.
Smoking, Weight, and Exercise
Smoking damages blood vessels directly, and the effect on erections is measurable. An Italian epidemiological study found that current smokers had a 70% higher risk of ED compared to men who had never smoked. Among men with no other health conditions, the risk was even more pronounced, with smokers showing 2.4 times the odds of ED. Former smokers still carried elevated risk, at 1.6 times, though quitting does allow partial recovery of blood vessel function over time.
Excess body weight contributes through multiple pathways. Fat tissue converts testosterone to estrogen, lowering available testosterone levels. Obesity also increases inflammation, worsens insulin resistance, and accelerates blood vessel damage. Regular aerobic exercise, even moderate walking, improves blood flow, raises testosterone, and has been shown in clinical trials to improve erectile function on its own.
Stress, Anxiety, and Mental Health
Erections require your nervous system to shift into a relaxed, parasympathetic state. Stress, performance anxiety, relationship conflict, and depression all keep you locked in a fight-or-flight mode that actively works against arousal. This is especially common in younger men, where psychological causes are more likely than vascular ones.
A frustrating cycle often develops: one failed erection creates anxiety about the next attempt, which makes the next failure more likely. This pattern can turn a single bad experience into an ongoing problem. The distinguishing feature of psychologically driven ED is that you can still get erections in other contexts, such as morning erections or during masturbation, but struggle during partnered sex. If that describes your situation, the plumbing works fine and the issue is upstream in your brain’s arousal and anxiety circuits.
How ED Is Treated
The first-line treatment for most men is a class of oral medications that work by boosting the nitric oxide signaling pathway. These drugs don’t create an erection on their own; they make it easier for natural arousal to produce one. All three major options in this class have similar success rates, helping 65% to 75% of men achieve and maintain erections firm enough for intercourse. For men with diabetes or nerve damage from surgery, success rates drop to 40% to 50%.
The key differences between the three options are practical ones. One works fastest, reaching peak effect in about 40 minutes, while another takes closer to two hours but lasts far longer, with some men finding it effective even 24 to 36 hours after taking it. That longer-acting option is often preferred by men who don’t want to time a pill closely to sexual activity.
When medications don’t work, other options include vacuum pump devices that draw blood into the penis mechanically, injections directly into the penile tissue (more effective than they sound, and used successfully by many men), and surgical implants for cases where nothing else has worked. Lifestyle changes like quitting smoking, losing weight, and exercising should happen alongside any medical treatment, since they address root causes rather than symptoms.
Why ED Can Be a Warning Sign
Erection problems aren’t just a quality-of-life issue. Because the blood vessels in the penis are among the smallest in the body, they’re often the first to show signs of cardiovascular damage. ED that appears in your 40s or 50s with no obvious psychological explanation is considered a red flag for diabetes, cardiovascular disease, metabolic syndrome, and depression. Getting evaluated means more than just getting a prescription. It means screening for conditions that, caught early, are far easier to manage.

