
Erectile dysfunction (ED) affects men of all ages, and it has more than one possible cause. Sometimes it's physical, like high blood pressure limiting blood flow to the penis, or low testosterone. Sometimes it's lifestyle, like smoking or drinking too much alcohol over time. And sometimes it's relational, like tension, distance, or unspoken needs with a partner.
In younger men, ED is often psychological. Up to 30% of men under 40 have experienced erection difficulties, and one study found up to 85% of those cases are psychological rather than physical (Nguyen et al., 2017). In these cases, there's no physical root cause. Stress and performance anxiety get in the way of the state you need to get and keep an erection.
There's no single treatment for erectile dysfunction (ED) because there's no single cause. Here's the hopeful part: for many men, understanding what helps and what doesn't relieves a lot of the problem on its own. The right treatment matches the cause: therapy and nervous-system work for psychological ED, medication or devices for physical ED, and habit changes that support all of it. This guide covers every cause of ED and how to treat it.
The first step is diagnosis. The table below maps each cause to the treatments that apply.
| Cause | What is it? | What are my treatment options? | What should I expect? |
|---|---|---|---|
| Psychological | Anxiety, stress, unregulated nervous system, relationship concerns, or performance anxiety disrupt arousal | Psychosexual therapy, communication-based approaches, solo practices (mindfulness, mindful masturbation) | No pills, pumps, or surgery required; often improves with the right approach and an understanding of what is going on |
| Physical | Restricted or limited blood flow to the erection, hormone imbalance, nerve function | PDE5 inhibitors, testosterone therapy, injectables or suppositories, surgery (rare) | Confirm the physical cause with a doctor. Ongoing management may be needed. |
| Lifestyle | Smoking, alcohol, inactivity, weight gain, or drug use affect erections | Quit smoking, drink less alcohol, get 150 minutes of moderate exercise a week, and stop recreational drug use. | These causes are modifiable, so symptoms often improve. |
| Mixed factors | More than one cause category at once | Rule out a medical cause first. Then focus on psychological and lifestyle changes. | Most common real-world pattern |
Once you have an idea of which category fits, the next move is to find out whether your ED is physical or psychological. A doctor can help you narrow it down. Getting a diagnosis for ED also rules out other conditions worth catching early, like heart disease or diabetes, regardless of how the ED itself resolves.
Between 30 million and 50 million men in the US have ED (NIDDK, 2024a). It becomes more common with age: about 40% of men are affected at 40, rising to about 70% by 70 (NIDDK, 2024a).
Causes often overlap. For example, a physical trigger, like a medication side effect, can lead to a psychological one, like performance anxiety that outlasts the original problem. Looking at the full picture leads to better, longer-lasting treatment.
We asked three experts to break down what actually works, organized by cause:
Psychological erectile dysfunction covers erections affected by emotional or mental factors, like performance anxiety or stress, even when there's no physical cause. It responds to therapy, communication, and practice, not medication or surgery.
Psychosexual therapy is the recommended first treatment for most psychological causes of ED. It can include History Taking, CBT, sensate focus, and couples counseling. General talking therapy helps too, not just specialist sexual or mental-health therapy. It gives you space to explore how what's going on in your life connects with your sexual self, since stress and low mood affect erections even when the issue isn't explicitly sexual. A therapist can also help you work out whether anxiety started the problem, or whether it showed up afterward as a reaction to it. That distinction changes which treatment actually helps.
Hearing from other men who've dealt with the same thing takes some of the pressure off. Talking to a partner, a friend, or someone you trust can reduce ED symptoms on its own, and talking about it, instead of staying silent, can ease the anxiety. Seeking anonymous support from people with the same experience, like the Mojo app's community, works the same way. Your relationship itself can play a part, too. Tension, distance, or needs that go unspoken can feed into ED, so talking things through with your partner can be part of what helps, and it's fine to get support with those conversations if they feel hard to start.
Some men get stuck watching and judging their own performance during sex instead of enjoying it. Therapists call this pattern spectatoring, and being aware of it helps you notice it happening in the moment. The goal is to notice those unhelpful thoughts and learn to replace them, so you can stay present in your body instead. Mindful masturbation trains the same skill solo. It helps you focus on physical sensations during sex, which can support your erection. Learning basic breathing, and grounding practices can also help, since a body that's already stressed will find it hard to relax and enjoy sex.
Dr. Shannon Chavez is a licensed clinical psychologist, AASECT-certified sex therapist, and certified clinical sexologist. She built The Erection Reset, a Mojo course, for men with psychological or mixed factor erection issues.
Dr. Chavez takes evidence-based techniques from her one-on-one practice and builds them into the course, including nervous-system regulation and arousal training.
For ED with a physical cause, the first step is talking with a doctor. They might prescribe a PDE5 inhibitor pill, then move to other options if needed.
The most widely used drugs for ED belong to a group of medicines called PDE5 inhibitors. You probably know them by their brand names — the most famous one is Viagra.
| Option | How it works | Typical use case | Things to know |
|---|---|---|---|
| PDE5 inhibitors (e.g., Viagra) | Oral medicine that improves blood flow to the penis (NIDDK, 2024b) | First option for most physical ED | May be prescribed with testosterone if levels are low |
| Testosterone therapy | Pill, patch, or gel that raises low testosterone (NIDDK, 2024b) | Used alongside PDE5 inhibitors when testosterone is low | Not effective if testosterone imbalance isn't the root cause |
| Vacuum erection device (VED) | Plastic tube, pump, and elastic ring draw blood into the penis (NIDDK, 2024b) | Non-drug option, or when medication isn't suitable | Can cause temporary numbness or bruising unless you follow the device instructions |
| Injectable/suppository (alprostadil) | Vasodilator drug increases blood flow via self-injection or urethral suppository (Leslie et al., 2025) | Typically the second option after oral PDE5 inhibitors | Requires guidance from a prescribing doctor |
| Surgery | Implant surgery, or surgery to repair blood flow to the penis | Considered only after other options have failed (NIDDK, 2024b) | Most people with ED do not need this surgery |
Viagra is the best-known PDE5 inhibitor. It blocks an enzyme called PDE5 in the blood vessel walls, which relaxes them and increases blood flow to the penis (NIDDK, 2024b). That's often enough for physical ED, but it does little for psychological ED, since anxiety redirects blood flow away from the penis as part of the body's stress response.
Common side effects include headaches, stomach upset, and nasal congestion. Always read the information that comes with your prescription, and tell your doctor about every other medication and health condition you have. PDE5 inhibitors aren't safe to combine with certain heart medications, since the combination can cause a dangerous drop in blood pressure. If you're worried about relying on medication to get hard, talk to a doctor or therapist rather than increasing the dose on your own.
There's a condition called priapism, an erection lasting more than four hours, that needs medical care right away. The same goes for sudden vision or hearing loss after taking an oral ED medicine (NIDDK, 2024b).
A vacuum erection device (VED) is sometimes called a penis pump. A pump draws blood into the penis, and a ring at the base holds it there (NIDDK, 2024b). Follow the device instructions closely. Leaving the ring on too long can cause tissue damage, cold or numb feelings, or bruising.
An ED ring works on a similar idea without the pump. Placed around the base of an existing erection, it slows blood flow leaving the penis. Use lube to get it on and off comfortably, and clean it with warm water and mild soap between uses.
If bloodwork shows low testosterone, a doctor may prescribe testosterone therapy as a pill, patch, or gel, sometimes alongside a PDE5 inhibitor (NIDDK, 2024b). Testosterone needs medical supervision, since taking it without a diagnosed deficiency carries real risks.
Alprostadil is a medicine that widens blood vessels. It's injected into the penis or used as a small suppository called MUSE, usually after PDE5 inhibitors haven't worked (Leslie et al., 2025). A doctor teaches you the technique first.
Surgery is a last resort. Most people with ED do not need it (NIDDK, 2024b). Penile implants place rods in the penis, and vascular surgery repairs a blocked blood vessel. Doctors only offer these after other treatments have failed.
Diet, exercise, alcohol, sleep, smoking, and drug use all affect erections. Clinicians recommend quitting smoking, limiting or stopping alcohol, increasing physical activity, maintaining a healthy weight, following a healthy eating plan, and stopping recreational drug use (NIDDK, 2024b). NIDDK specifically recommends at least 150 minutes of moderate-intensity activity a week, like brisk walking (US HHS ODPHP, 2018, as cited in NIDDK, 2024b). This supports erections and overall health at the same time.
A few other changes clinicians consistently point to:
These changes take time, and a doctor's diagnosed physical cause may still need direct medical care alongside them. They support blood flow, hormone levels, and stress response all at once, which is why clinicians recommend them alongside almost every other treatment on this page.
The Erection Reset is a training program for better erections and more satisfying sex, built by clinical psychologist Dr. Shannon Chavez. Sign up for The Erection Reset.
Mojo aims to provide useful wellbeing resources. It isn't a substitute for medical care. Always speak with a qualified doctor or other healthcare professional about your specific symptoms before starting any treatment.
ED caused by lifestyle or psychological factors often improves substantially or resolves with the right treatment. ED from some physical causes may need ongoing management rather than a one-time cure. Treatment works best when it's matched to what's causing your ED.
Partial erections usually point to reduced blood flow, nerve issues, low arousal, or anxiety interrupting the process. The fix depends on which of those is happening, which is why a doctor's visit or symptom-tracking helps narrow it down.
Often, yes. Reversibility is lower when ED stems from unmanaged diabetes, cardiovascular disease, or nerve damage, though symptoms can still often improve.
If your partner has ED, open communication without pressure can help. Join a counseling session together if they invite you. ED usually isn't about how attracted they are to you.
See a doctor once ED happens more than once. They can check for other causes, like heart disease, diabetes, or low testosterone.
Mojo aims to provide useful wellbeing resources to its users; however, you should not solely rely on opinions or advice available on the Website or given by the Community. Always seek advice from a qualified medical doctor or other healthcare professional before acting.

With 18 years as a psychosexual and relationship therapist, Amanda helps people navigate desire, intimacy, and the changes life brings.
.avif)
A medical doctor and Mojo's medical advisor, Matt keeps what you read about erections and physical health accurate and evidence-based.