Erectile dysfunction: causes, red flags, and what actually works

ED is common, treatable, and often a useful early signal about cardiovascular and hormonal health. Here is how clinicians think about it, what the medications do, and when ED should send you for a deeper workup.

Medlo Editorial Team11 min read

Key points

  • Roughly 40% of men have some ED by age 40, and prevalence rises about 10 percentage points per decade.
  • ED is often vascular — it can be an early warning for coronary artery disease.
  • PDE5 inhibitors (sildenafil, tadalafil, vardenafil) work for the majority of men with uncomplicated ED.
  • If ED is paired with low libido and fatigue, testosterone deserves a look.
  • Sudden ED after starting a new medication is a strong hint to revisit that medication.

What an erection actually is, mechanically

An erection is a vascular event triggered by a neurological signal. Sexual arousal — visual, tactile, mental, or some combination — fires nerves that release nitric oxide in the smooth muscle tissue of the penis. Nitric oxide activates an enzyme that produces cyclic GMP, which relaxes the smooth muscle and allows blood to rush into the corpora cavernosa, the two cylinders of erectile tissue along the shaft.

As blood flows in, the expanding tissue compresses the small veins that normally drain it, trapping the blood and producing rigidity. The whole sequence is a reliable engineering puzzle: arousal → nitric oxide → smooth muscle relaxation → blood inflow → venous compression → erection. Failure can happen at any step in that chain.

Detumescence — the return to flaccid state — happens when an enzyme called PDE5 (phosphodiesterase type 5) breaks down cyclic GMP, ending the smooth muscle relaxation. PDE5 is the entire reason "PDE5 inhibitors" exist as a drug class. Sildenafil, tadalafil, and vardenafil all work by blocking PDE5, prolonging the cyclic GMP signal, and giving the erectile tissue more time to fill in response to a normal arousal cue.

Importantly, PDE5 inhibitors do not create arousal. They amplify it. If the nitric oxide signal is not firing in the first place — because the trigger is psychological, hormonal, or neurological — there is nothing for the medication to amplify.

The four buckets of why ED happens

Vascular. This is the biggest single bucket. The arteries that supply the penis are small (about 1–2 mm in diameter). Atherosclerosis, the same process that drives heart attacks and strokes, narrows them too — and because the penile arteries are smaller than the coronary arteries, they show stiffness years before the heart does. ED is often the first visible sign of cardiovascular disease, and any new ED in a man over 40 is a reason to check blood pressure, lipids, and fasting glucose.

Hormonal. Low testosterone reduces libido and contributes to ED, especially when combined with other causes. Thyroid dysfunction, prolactin disorders, and in rare cases other endocrine issues can also play a role. If ED is paired with morning fatigue, low libido, weight gain, and reduced morning erections, a basic hormonal workup is worth doing before assuming the problem is purely vascular.

Neurological and medication-induced. Diabetes is the leading cause of neurogenic ED — chronic high blood sugar damages the small nerves that carry the arousal signal. Spinal cord injury, multiple sclerosis, and pelvic surgery can all interrupt the same circuit. Medications are also frequent culprits: SSRIs, SNRIs, beta blockers, finasteride, and some blood pressure drugs can each cause or worsen ED. New ED that started within weeks of a new medication is a strong signal to revisit that medication.

Psychogenic. Anxiety, depression, relationship stress, and performance anxiety can all interrupt the arousal signal at the level of the brain. Psychogenic ED is more common in younger men and tends to be situational — present with a partner but absent during masturbation, or present during stressful periods and absent at other times. A history of intact morning erections and normal sleep-related erections also points toward a psychogenic component.

~40%
Of men 40–70
have some degree of ED
~70%
Respond to PDE5i
on first adequate dose trial
2x
CV risk
ED predicts cardiac events 3–5 yrs early
Prevalence and outcomes from MMAS and follow-up studies.

The PDE5 inhibitors, compared

There are four PDE5 inhibitors approved in the U.S.: sildenafil (Viagra), tadalafil (Cialis), vardenafil (Levitra, Staxyn), and avanafil (Stendra). All four work the same way and have the same general efficacy — they help roughly 70% of men with uncomplicated ED. The differences are mostly about onset time, duration, and side effect profile.

Sildenafil is the original and the cheapest. Generic sildenafil is widely available at low cost. Onset is 30–60 minutes, peak effect at about an hour, and the window of action is roughly four to six hours. It is best taken on an empty stomach because high-fat meals slow absorption.

Tadalafil is the longest-acting. The standard on-demand dose works for 24–36 hours, which is why it is sometimes called "the weekend pill." It also comes in a low-dose daily formulation (2.5 or 5 mg) that produces continuous PDE5 inhibition without timing the dose around sex. Many men prefer this for the spontaneity.

Vardenafil is similar in onset and duration to sildenafil but is less affected by food. Avanafil is the newest, with the fastest onset (15–30 minutes) but a shorter duration (about six hours).

All four are taken orally. All four require sexual stimulation to work — none is an aphrodisiac. All four share a class warning: they cannot be combined with nitrate medications (used for chest pain) because the combination can produce dangerous drops in blood pressure. They should also be used carefully in men taking alpha-blockers for prostate symptoms.

Sildenafil
Viagra and generic
  • Onset ~30–60 min
  • Duration ~4–6 hours
  • Take on empty stomach for best absorption
  • Generic widely available, very low cost
Tadalafil
Cialis and generic
  • Onset ~30 min
  • Duration up to 36 hours ("the weekend pill")
  • Daily low-dose option for spontaneity
  • Less affected by food
The two PDE5 inhibitors that cover ~90% of prescriptions.

When ED is a red flag that needs more than a pill

New onset of ED in a previously functional middle-aged man is one of the more useful early warnings in primary care. The presence of ED roughly doubles the risk of a major cardiovascular event in the next five years compared to peers without ED, and the stronger the ED, the stronger the association.

That does not mean every man with ED has heart disease. It means that ED warrants a basic cardiovascular check-up: blood pressure, fasting glucose or A1c, a lipid panel, and a frank conversation about smoking, weight, and family history. If those come back clean, treating the ED with a PDE5 inhibitor is reasonable. If they show abnormalities, treating the ED is still reasonable, but the bigger story is what they reveal about cardiovascular trajectory.

Sudden ED in a young man is usually psychogenic or medication-related, not vascular, and the workup is different — focused on mental health, relationship factors, sleep, and any new medications.

ED that does not respond to a full dose of two different PDE5 inhibitors is a signal to escalate the workup, not just keep trying pills. The next steps usually include a vascular ultrasound of the penis, hormonal labs, and sometimes referral to a urologist who specializes in sexual medicine. Treatment options at that level include intracavernosal injections, vacuum devices, and in some cases penile prosthesis surgery — all of which work, but require more involvement than a once-a-week pill.

When testosterone is part of the picture

Testosterone and ED have a relationship, but it is not as direct as the supplement industry would have you believe. Many men with low testosterone have normal erections, and many men with normal testosterone have ED. The strongest case for checking testosterone is when ED is paired with classic symptoms of hypogonadism: low libido (not just decreased function — actual loss of interest), morning fatigue, mood changes, loss of morning erections, and gradual loss of muscle mass.

A proper testosterone workup means at least two morning serum tests (ideally before 10 a.m., on different days) of total testosterone, with calculated free testosterone if total is borderline. A single afternoon draw is not enough — testosterone naturally falls through the day, and a borderline-low afternoon reading is meaningless without a morning confirmation.

If testosterone is genuinely low and symptoms are consistent, treating the testosterone deficit can improve libido and may modestly improve erectile function. But testosterone replacement is not first-line for ED in most men — PDE5 inhibitors are. The right framing is: if you have both ED and low T with symptoms, treat both. If you have ED without low T, focus on the ED workup directly.

Lifestyle changes that actually move the needle

The lifestyle interventions that improve cardiovascular health are also the ones that improve erectile function, because the two systems are essentially the same plumbing. There are no exotic supplements with strong trial data. The boring answers are the ones that work.

Stop smoking. Smoking is one of the strongest modifiable risk factors for ED. The vascular damage is dose-dependent and largely reversible — many men see meaningful improvement in erectile function within months of quitting.

Lose visceral fat. Excess abdominal fat is associated with both lower testosterone and worse vascular function. Trials of weight loss in men with obesity and ED have consistently shown improvement in erectile function, sometimes substantial.

Move regularly. Aerobic exercise improves endothelial function — the ability of blood vessels to relax and dilate appropriately — and that is exactly what an erection requires. Three to five hours of moderate aerobic activity per week is the threshold most cardiovascular guidelines recommend, and the same threshold is reasonable for ED.

Sleep enough. Sleep apnea is a strong, often overlooked driver of ED. The combination of nighttime hypoxia, fragmented sleep, and elevated sympathetic tone is hard on every part of the cardiovascular and hormonal system. If you snore loudly, wake up unrefreshed, or have a partner who notices breathing pauses, get evaluated — treating sleep apnea often improves ED on its own.

Address stress and mental health. Anxiety and depression both contribute, and treating them often helps. Some antidepressants make ED worse; some are neutral. If you are starting an SSRI and ED becomes a concern, that is a conversation to have with the prescribing clinician, not a reason to silently struggle.

When to call a clinician (and what to expect)

You should consider talking to a clinician about ED when it is happening regularly enough to bother you, when it has come on suddenly, or when it is paired with other symptoms (chest pain, leg cramps with walking, severe fatigue, mood changes). You do not need to be in crisis. ED is treatable, the medications are well-studied, and most men feel better just knowing what is going on.

A reasonable first visit covers a quick history (when did it start, in what situations, any other symptoms), a basic physical exam, a blood pressure check, a discussion of current medications, and a small panel of labs (fasting glucose or A1c, lipids, total testosterone, thyroid). If you have not had a recent cardiovascular check, this is a good time to do it.

Most men with uncomplicated ED leave a first visit with a PDE5 inhibitor prescription and instructions on how to use it — what dose, how to time it, what to expect, and when to come back if it is not working. Telehealth has made this kind of visit substantially easier and more private than it used to be, and is a reasonable starting point if an in-person visit feels like a barrier.

The wrong move is to wait years, gradually withdraw from intimacy, and let ED quietly become a load-bearing source of anxiety in your life and your relationship. The right move is to treat it the same way you would treat any other annoying medical issue: get a real diagnosis, try the well-evidenced first-line treatment, and adjust if it is not working. Most men get most of the way back.

Common questions men ask in the first visit

How do I know if PDE5 inhibitors are working if I am too anxious to test them? This is one of the most common questions, and the answer is to take the medication and have a low-stakes evening where the goal is not performance. Many men test the medication alone, just to see how their body responds, before any pressure of partnered sex. Knowing that the medication is producing the physiological response makes the partnered context dramatically less anxious.

Should I take a higher dose if a normal dose does not work the first time? Not without a clinician’s input. The first dose may not be the right dose, but it may also not have been a fair test — timing, food, alcohol, and arousal all affect the response. A clinician can walk you through what to try next.

Can I get these medications without seeing anyone? In the U.S., PDE5 inhibitors are prescription medications and require a clinician evaluation. Telehealth has made this much easier — many men now get their first prescription through a 15-minute video or asynchronous text consult — but the prescription still has to come from a licensed provider who has reviewed your history.

Are the online generic versions safe? Generic sildenafil and tadalafil from licensed U.S. pharmacies are the same chemical as the branded versions and are safe at substantially lower cost. Products sold from non-pharmacy websites without a prescription are a different story — counterfeit ED medications are one of the most common categories in international drug enforcement actions, and the contents are unpredictable.

Educational only. This article is not medical advice, does not establish a clinician-patient relationship, and should not replace consultation with a licensed provider familiar with your history.

Erectile dysfunction: causes, red flags, and what actually works · Medlo Health