Erectile dysfunction (ED) is often associated with older age, but erection problems can also affect men in their 20s and 30s. Being young does not automatically mean that erectile dysfunction is “just psychological.”
ED means having persistent or recurring difficulty getting an erection or keeping one firm enough for satisfactory sexual activity. Psychological factors such as stress and performance anxiety are important in younger men, but physical causes—including diabetes, cardiovascular risk factors, hormonal disorders, medications and substance use—also need to be considered.
For men under 40, erectile dysfunction can sometimes be an early clue that something else is affecting physical or emotional health. Here are 10 commonly overlooked causes of erectile dysfunction in younger men.
1. Performance Anxiety
One of the most common problems in younger men is worrying about whether they will be able to get or maintain an erection.
A single episode of difficulty can sometimes start a cycle:
Erection difficulty → worry about it happening again → increased anxiety → greater difficulty getting an erection.
Stress activates the body's sympathetic nervous system—the “fight or flight” response—which can interfere with the relaxation and blood-flow changes required for an erection.
Performance anxiety may be especially likely when erections are normal during sleep or masturbation but become difficult during partnered sexual activity. However, this pattern alone cannot confirm the cause.
Anxiety, depression, stress, low self-esteem and negative body image are all recognized psychological factors that may contribute to ED.
What to consider: Persistent anxiety, relationship stress or fear surrounding sexual performance may be worth discussing with a healthcare professional or qualified therapist.
2. Chronic Stress and Mental Health Problems
It is not only sexual performance anxiety that can affect erections.
Work pressure, financial stress, relationship problems, depression and generalized anxiety may reduce sexual arousal and interfere with erectile function.
Chronic stress may also affect sleep, alcohol consumption, exercise and overall cardiovascular health—all factors that can influence sexual function.
Depression may reduce sexual interest, while some medicines used to treat depression can themselves contribute to sexual side effects.
Key point: Erectile dysfunction can have both physical and psychological components at the same time. It does not always have a single cause.
3. Medicines You Would Not Expect to Affect Erections
Younger men sometimes overlook their medications when trying to understand why ED has developed.
Medicines associated with erectile problems can include certain:
Sedatives
Opioid pain medicines
Hormonal medicines
Some other prescription and over-the-counter drugs
NIDDK lists medications among the recognized causes of erectile dysfunction.
If erection problems began after starting a medicine or changing its dose, tell your healthcare provider.
Important: Do not stop a prescribed medicine suddenly because of sexual side effects. A clinician may be able to adjust the dose, change the medicine or investigate another cause.
4. Prediabetes or Diabetes
Diabetes is not only a condition affecting older adults.
Type 2 diabetes can develop in younger men, particularly when other risk factors such as excess body weight, inactivity or family history are present.
Persistently elevated blood glucose can damage both the blood vessels and nerves involved in erections.
Interestingly, sexual problems can occasionally be one of the health changes that encourage someone to undergo metabolic testing.
Men with diabetes may also develop erectile dysfunction earlier than men without diabetes.
Possible accompanying signs of diabetes include:
Increased thirst
Frequent urination
Unexplained fatigue
Blurred vision
Slow-healing wounds
However, diabetes can also exist for some time without obvious symptoms.
What may be checked: A healthcare professional may consider fasting glucose or HbA1c depending on your history and risk factors.
5. High Cholesterol, High Blood Pressure and Early Blood-Vessel Problems
An erection depends heavily on healthy blood flow.
Conditions affecting the lining of blood vessels—known as the endothelium—can therefore interfere with erectile function.
High cholesterol, hypertension, smoking, diabetes and obesity can contribute to vascular dysfunction even in younger adults.
This is particularly important because erectile dysfunction is recognized by major urology guidelines as a potential risk marker for cardiovascular disease.
Research examining young men with ED has also found evidence that metabolic and cardiovascular risk factors should not automatically be dismissed simply because someone is under 40.
This does not mean that a young man with ED necessarily has heart disease. It means persistent or unexplained ED can provide a reason to review cardiovascular risk factors rather than assuming the problem is purely psychological.
6. Excess Weight and Physical Inactivity
Being overweight does not automatically cause erectile dysfunction, but excess body fat and inactivity may increase several conditions associated with ED.
These include:
Insulin resistance
Abnormal cholesterol
Reduced cardiovascular fitness
Hormonal abnormalities
Regular physical activity supports cardiovascular function and blood circulation throughout the body.
NIDDK recommends lifestyle measures such as physical activity, maintaining a healthy body weight, stopping smoking and following a healthy eating pattern as part of preventing or improving erectile problems.
Improving overall metabolic health may therefore benefit both long-term cardiovascular health and sexual function.
7. Smoking, Heavy Alcohol Use and Recreational Drugs
Smoking can damage blood vessels and interfere with healthy circulation.
Because erections depend on adequate arterial blood flow, vascular damage associated with smoking may contribute to erectile dysfunction.
Excessive alcohol can also interfere with sexual arousal and the nervous-system signals involved in erections. Recreational and illicit drugs may affect sexual function in different ways depending on the substance.
NIDDK identifies smoking, excessive alcohol consumption and recreational or illicit drug use among lifestyle factors associated with ED.
Younger men may overlook these factors because they otherwise feel physically healthy.
Occasional erection difficulty after drinking heavily is different from persistent ED, but repeated problems warrant attention.
8. Low Testosterone or Other Hormonal Problems
Testosterone is important for sexual desire and normal sexual function, but ED does not automatically mean testosterone is low.
In fact, many younger men presenting with erectile dysfunction have normal testosterone levels. One large study of men under 40 with ED found that the majority had a normal hormonal environment.
However, hormonal conditions can contribute in some men.
Possible problems include:
Low testosterone
Thyroid disorders
Abnormal prolactin levels
Pituitary disorders
Other endocrine conditions
Low testosterone may be more likely when ED occurs alongside symptoms such as:
Reduced sex drive
Fatigue
Loss of muscle mass
Reduced morning erections
Fertility problems
Hormone testing should be guided by a healthcare professional rather than relying on symptoms alone.
9. Anabolic Steroid or Non-Medical Testosterone Use
This cause may be especially easy to overlook in younger men who use bodybuilding or performance-enhancing drugs.
Taking anabolic-androgenic steroids can suppress the body's own hypothalamic-pituitary-gonadal hormonal system.
While sexual function may appear normal—or sometimes heightened—during androgen use, stopping anabolic steroids can result in suppressed natural testosterone production.
Possible symptoms after discontinuation can include:
Low libido
Erectile dysfunction
Fatigue
Depressed mood
Reduced testicular function
Fertility problems
Research has documented prolonged hormonal suppression and impaired sexual function in some former anabolic-steroid users.
Recovery varies significantly between individuals.
Anyone experiencing sexual or hormonal symptoms after anabolic steroid use should discuss the history openly with an endocrinologist, urologist or other qualified healthcare professional rather than attempting unsupervised hormonal treatment.
10. Pelvic, Nerve or Penile Problems
Occasionally, erectile dysfunction in younger men has a structural or neurological cause.
Examples include:
Pelvic or perineal injury
Spinal cord or nerve injury
Previous pelvic surgery
Peyronie's disease
Significant penile trauma
Vascular injury
Long periods of intense cycling have also been investigated because pressure from a bicycle saddle can compress nerves and blood vessels in the perineal region. Older clinical research in young men with organic ED identified perineal trauma and vascular abnormalities among possible causes.
Peyronie's disease involves scar tissue within the penis that may cause curvature, discomfort and sometimes erectile problems.
Seek medical assessment if ED is accompanied by penile pain, a new curvature, numbness, significant pelvic trauma or neurological symptoms.
Is Erectile Dysfunction Under 40 Usually Psychological?
Not necessarily.
Psychological causes are important in younger men, but assuming all ED under 40 results from anxiety can cause physical conditions to be overlooked.
Research has shown that younger men may have psychological, organic or mixed causes of erectile dysfunction.
A young man might, for example, have mild vascular dysfunction that creates occasional erection difficulty. Worrying about the problem can then create performance anxiety, making the original physical problem worse.
Therefore, psychological and physical ED are not always separate conditions.
When Should a Young Man See a Doctor About ED?
One unsuccessful sexual experience is not necessarily erectile dysfunction.
Temporary erection difficulties can happen because of:
Stress
Fatigue
Alcohol
Relationship problems
Anxiety
Temporary illness
However, medical evaluation is reasonable when erection problems:
Continue for several weeks or months
Happen frequently
Are becoming progressively worse
Occur during both partnered sex and masturbation
Are associated with reduced libido
Begin after starting a medication
Follow anabolic steroid use
Occur alongside diabetes or cardiovascular risk factors
Are associated with penile curvature or pain
ED can sometimes provide an opportunity to identify another health condition earlier. Both American and European urology guidance recognize the relationship between ED and cardiovascular risk.
How Is Erectile Dysfunction in Younger Men Evaluated?
A doctor will usually begin with a medical, sexual and mental-health history.
Evaluation may include:
Blood pressure
Weight and waist assessment
Cardiovascular risk factors
Medication and supplement review
Smoking, alcohol and recreational drug history
Sexual history
Mental health and relationship factors
Physical examination
Depending on the individual, laboratory tests may include blood glucose, cholesterol and testosterone. Additional hormone or specialist testing may be recommended when symptoms suggest a particular problem.
Specialized testing such as penile Doppler ultrasound is usually reserved for selected patients rather than being necessary for every case.
Can Erectile Dysfunction Under 40 Be Treated?
In many cases, yes.
Treatment depends on the underlying cause and may include:
Managing diabetes, cholesterol or blood pressure
Stopping smoking
Reducing excessive alcohol
Increasing physical activity
Weight management
Addressing anxiety or depression
Counseling or sex therapy
Reviewing medicines contributing to ED
Treating confirmed hormonal disorders
Prescription ED medications when appropriate
PDE5 inhibitors such as sildenafil or tadalafil increase blood flow to the penis and are commonly used treatments for ED, but they do not identify or correct every underlying cause. A medical assessment is particularly valuable when ED develops unexpectedly in a younger person.
Never use prescription ED medication obtained from an unreliable source or combine ED medicines with nitrate medicines without medical advice because potentially serious interactions can occur.
Frequently Asked Questions
Is erectile dysfunction normal at 25 or 30?
Occasional difficulty getting an erection can happen at any age. Frequent or persistent ED at 25 or 30 should not simply be considered normal and is worth discussing with a healthcare professional.
Can anxiety cause ED even if testosterone is normal?
Yes. Anxiety, stress and performance pressure can interfere with the nervous-system and arousal processes required for an erection even when hormone levels are normal.
Can a young man have ED because of poor blood circulation?
Yes. Diabetes, smoking, hypertension, abnormal cholesterol, obesity and other vascular factors can affect blood circulation at a younger age.
Does ED under 40 mean heart disease?
No. ED has many possible causes, and having ED does not mean someone has cardiovascular disease. However, persistent ED can be a cardiovascular risk marker, which is why reviewing blood pressure, glucose, cholesterol and other risk factors may be appropriate.
Can anabolic steroids cause erectile dysfunction?
They can contribute, particularly after discontinuation. Anabolic steroids may suppress natural hormone production, and some former users develop low libido, hormonal symptoms or ED during recovery.
Final Takeaway
Erectile dysfunction under 40 should not automatically be dismissed as a psychological problem.
Performance anxiety and stress are common contributors, but younger men can also experience ED because of medications, diabetes, vascular problems, smoking, excess weight, hormonal disorders, anabolic steroid use or neurological and structural conditions.
Persistent ED can sometimes be the first reason an otherwise healthy young man discovers an underlying metabolic or cardiovascular risk factor.
Rather than simply treating the erection problem, identifying why it is happening can lead to more appropriate treatment and better long-term health.



