Causes of ED in Your 30s and 40s, and What to Check

Key takeaways
- Erectile dysfunction in your 30s and 40s is common: in one clinic study, about one in four men seeking help for new ED was under 40.
- Most cases have more than one contributor. Blood vessel health, metabolic health, hormones, medications, sleep, alcohol and stress often overlap.
- In younger men, ED can be the first visible sign of a blood vessel or blood sugar problem, so it is worth a proper medical look rather than a guess.
- A useful first workup is a medical and sexual history, blood pressure, and labs such as glucose or HbA1c, lipids and a morning testosterone.
- Psychological factors are real causes, not a diagnosis of exclusion, and they frequently sit on top of a physical one.
Erectile dysfunction in your 30s and 40s is usually caused by a combination of factors: reduced blood flow from early vascular or metabolic changes, medications, alcohol or nicotine, poor sleep, low testosterone in some men, and stress or performance anxiety. It is rarely a single mystery, and most contributors can be identified with a short history, a blood pressure reading and a few routine labs.
It is also more common than most men assume at this age. A community study of men aged 40 to 70 in Massachusetts found that about half reported some degree of erectile difficulty, and an Italian clinic study found that roughly one in four men coming in with a new ED complaint was younger than 40. This guide walks through the main causes, how to tell which ones might apply to you, and what a sensible evaluation looks like. If you want the bigger picture on treatment, start with our guide to online ED care.
How common is ED before 50?
The Massachusetts Male Aging Study, one of the foundational population studies of erectile function, surveyed men aged 40 to 70 and found that about 52% reported some degree of ED, ranging from minimal to complete. The share with complete ED roughly tripled across that age span, from about 5% at 40 to about 15% at 70. In other words, mild or occasional difficulty is common in your 40s, and severe ED is less so.
Younger men are not exempt. In a 2013 study of men attending an Italian outpatient clinic for new-onset ED, 26% were under 40, and nearly half of those younger men had ED rated as severe. The younger men in that study had fewer medical conditions on paper, but they smoked and used recreational drugs more often. That pattern is worth remembering: in your 30s, the causes often live in habits and in conditions that have not been diagnosed yet.
Is it physical or psychological?
The old split between organic and psychogenic ED is less useful than it sounds, because most men have some of both. A small physical change, such as slightly reduced blood flow, leads to one disappointing night; the worry that follows makes the next attempt harder. The American Urological Association guideline asks clinicians to take a full medical, sexual and psychosocial history for exactly this reason.
A few patterns can point in one direction or the other. None of them is diagnostic on its own:
- Leaning physical: a gradual decline over months, fewer or weaker morning and nighttime erections, difficulty in every situation including solo, and known risk factors such as high blood pressure, smoking or a growing waistline.
- Leaning psychological: a sudden start tied to a stressful event or new relationship, normal morning erections, and difficulty mainly with a partner or in specific situations.
- Mixed: the most common picture. A modest physical contributor plus anxiety about performance is the classic combination in men under 45. Our piece on performance anxiety and ED covers that side in detail.
Blood flow and metabolic health: the most common physical causes
An erection is a blood flow event. The arteries that supply the penis are small, so they show the effects of stiffening, inflammation and plaque earlier than larger vessels do. Anything that damages the lining of blood vessels can therefore show up first in the bedroom. The National Institute of Diabetes and Digestive and Kidney Diseases lists the leading physical contributors:
- Prediabetes and type 2 diabetes: high blood sugar damages both blood vessels and the nerves that trigger an erection. Many men in their 30s and 40s have elevated blood sugar without knowing it.
- High blood pressure and high cholesterol: both narrow and stiffen arteries over time.
- Excess weight, especially around the waist: linked to insulin resistance, lower testosterone and vascular changes. A randomized trial in men with obesity found that sustained weight loss and more exercise improved erectile function scores over two years.
- Smoking and vaping nicotine: a systematic review of observational studies found smokers had a higher risk of ED, with risk rising with the amount and duration of smoking.
- Low physical activity: in a large cohort of US health professionals, the most active men had a meaningfully lower risk of ED than the least active.
Because these causes overlap with heart disease risk, ED in a younger man deserves the same attention you would give a high blood pressure reading. Our article on ED and heart health explains that link and why it matters most for men under 50.
Medications, alcohol and other substances
A surprising number of common prescriptions list erectile problems as a possible side effect. NIDDK highlights several classes, including some blood pressure medicines, antidepressants (particularly SSRIs), certain medicines for anxiety, and drugs that block or lower androgens. If your difficulty began within weeks of starting or changing a medication, tell the prescriber. Never stop a prescribed medicine on your own; there are often alternatives with a lower sexual side effect burden.
Heavy drinking, cannabis use in some men, and stimulants can all interfere, as can anabolic steroids, which shut down the body's own testosterone production. Men who have used steroids or testosterone from non-medical sources sometimes notice erectile problems after they stop, when their own production has not yet recovered.
Hormones: where testosterone fits, and where it does not
Testosterone mainly drives sexual desire. Low testosterone can contribute to ED, especially when it comes with low libido, fatigue and fewer morning erections, but it is a less common primary cause than blood flow problems. Many men with ED have normal testosterone, and many men with low testosterone still get erections.
That is why a morning testosterone level belongs in a basic ED workup when symptoms fit, but should not be the only thing checked. Thyroid problems and high prolactin are less common hormonal causes a clinician may also consider. If you want to see whether your symptoms point toward a hormone test, our low T symptom check is a reasonable starting point, and the article on low testosterone and ED explains how the two interact.
Sleep, stress and mental health
Your 30s and 40s are often the most compressed years of life: demanding work, young children, little sleep and not much time to exercise. Each of these feeds into erectile function. Short or fragmented sleep lowers testosterone and raises stress hormones, and untreated obstructive sleep apnea is linked with both ED and cardiovascular disease. Depression and anxiety reduce desire and arousal directly, and some of their treatments add a medication effect on top.
Relationship strain matters too. Resentment, poor communication or a partner's own health concerns can all affect arousal. These are legitimate medical contributors, and counseling or sex therapy has supportive evidence, often used alongside medication rather than instead of it.
What should be checked, and in what order?
For most men in this age group, the evaluation does not need to be elaborate. Guidelines emphasize a careful history and a targeted set of tests:
- History: onset, morning erections, desire, ejaculation, relationship and stress, sleep, alcohol, nicotine and drug use, and every medication and supplement.
- Vitals and basics: blood pressure, weight and waist circumference.
- Labs: fasting glucose or HbA1c, a lipid panel, and a morning total testosterone when symptoms fit, with additional hormone tests depending on the result. A baseline lab panel covers most of this in one draw.
- Follow-up questions about the heart: chest pain or shortness of breath on exertion, family history of early heart disease. These change the urgency and may mean you should see a primary care clinician or cardiologist in person.
Specialized testing, such as penile ultrasound, is rarely needed at the start. It is generally reserved for men who have had pelvic injury or surgery, a curvature, or who do not respond to first-line treatment.
How is ED in younger men treated?
Treatment follows the cause. When a reversible contributor is found, such as a medication, heavy drinking, untreated sleep apnea or poorly controlled blood sugar, addressing it is the first step, and the lifestyle changes with the best evidence are worth starting regardless. Oral PDE5 inhibitors such as sildenafil and tadalafil are FDA-approved first-line medications and are often used alongside those changes, particularly while anxiety about performance is part of the picture.
A licensed provider decides whether medication is appropriate and which one fits, after reviewing your health history, blood pressure and medications, especially any nitrates. Our sexual health program starts with that review.
Common questions
Is it normal to have ED in your 30s?
It is common enough that it should not be a source of shame. In one clinic study about a quarter of men seeking help for new ED were under 40. Common does not mean it should be ignored, though: in younger men it can be the first sign of a blood sugar, blood pressure or cholesterol problem, so a basic medical review is worthwhile.
Can stress alone cause erectile dysfunction?
Yes. Stress, anxiety and depression can interfere with arousal through the nervous system, even when blood vessels are healthy. A clue is normal morning erections with difficulty mainly in specific situations. Stress also commonly amplifies a small physical cause, so it is worth checking both.
What blood tests are useful for ED?
A typical starting set is fasting glucose or HbA1c, a lipid panel and a morning total testosterone, with other hormone tests added depending on the result and your symptoms. Your clinician may add thyroid or prolactin testing when the history suggests it. A baseline panel can cover most of these in a single draw.
Does porn cause erectile dysfunction?
The research is mixed and largely based on surveys, so firm conclusions are hard to draw. Some men notice that heavy use changes what they find arousing with a partner. It is reasonable to consider as one factor among several, but it should not stop you from checking the physical and medical causes as well.
Can ED in your 40s improve without medication?
Sometimes. In a randomized trial of men with obesity, weight loss and more physical activity improved erectile function over two years, and stopping smoking, cutting back on alcohol and treating sleep problems can also help. How much each change helps varies from person to person, which is why many men use medication alongside these changes at first.
When should ED be checked in person?
Seek in-person care promptly if ED comes with chest pain, breathlessness on exertion, a new curvature or pain, numbness in the groin, or followed an injury or surgery. An erection lasting more than four hours is an emergency.
Sources
- Burnett AL, Nehra A, Breau RH, et al. Erectile dysfunction: AUA guideline. J Urol. 2018;200(3):633–641. Link (opens in a new tab)
- Feldman HA, Goldstein I, Hatzichristou DG, et al. Impotence and its medical and psychosocial correlates: results of the Massachusetts Male Aging Study. J Urol. 1994;151(1):54–61. Link (opens in a new tab)
- Capogrosso P, Colicchia M, Ventimiglia E, et al. One patient out of four with newly diagnosed erectile dysfunction is a young man. J Sex Med. 2013;10(7):1833–1841. Link (opens in a new tab)
- National Institute of Diabetes and Digestive and Kidney Diseases (NIH). Symptoms and causes of erectile dysfunction. Link (opens in a new tab)
- Esposito K, Giugliano F, Di Palo C, et al. Effect of lifestyle changes on erectile dysfunction in obese men: a randomized controlled trial. JAMA. 2004;291(24):2978–2984. Link (opens in a new tab)
- Cao S, Yin X, Wang Y, et al. Smoking and risk of erectile dysfunction: systematic review of observational studies with meta-analysis. PLoS One. 2013;8(4):e60443. Link (opens in a new tab)
- Bacon CG, Mittleman MA, Kawachi I, et al. Sexual function in men older than 50 years of age: results from the Health Professionals Follow-up Study. Ann Intern Med. 2003;139(3):161–168. Link (opens in a new tab)
This article is for general education and is not medical advice. Protocols described here require an online consultation with a licensed provider who will determine if a prescription is appropriate for you. Explore sexual health options or read the FAQ.




