Difficulty getting an erection is one of the most common sexual health issues men experience, affecting 20 to 30 percent of men between ages 40 and 70 and more than half of men over 70. But it also affects younger men more often than most people realize. The causes range from stress and anxiety to blood vessel problems, hormonal shifts, medications, and lifestyle factors, often overlapping in ways that make it hard to pin down a single reason.
How Erections Actually Work
An erection is fundamentally a blood flow event. When you’re sexually aroused, nerve signals trigger the release of nitric oxide in the erectile tissue of the penis. Nitric oxide sets off a chemical chain reaction that relaxes the smooth muscle cells lining the blood vessels and the spongy chambers (called the corpus cavernosum) inside the penis. Those chambers fill with blood, the tissue expands, and veins that normally drain blood out get compressed shut, trapping blood inside and creating rigidity.
Anything that disrupts this process at any step, whether it’s the nerve signal, the chemical chain reaction, the blood flow in, or the trapping of blood, can make it difficult to get hard or stay hard. That’s why so many different conditions can cause the same symptom.
Stress and Anxiety Shut Down the Process
Your nervous system has two competing modes: one for relaxation and arousal, another for fight-or-flight. They can’t both run at full power simultaneously. When you’re anxious, stressed, or worried about performance, your sympathetic nervous system activates. Your heart rate increases, breathing deepens, and your body actively inhibits functions it doesn’t need for survival. Erections are one of the first things to go.
This isn’t just a mental block. Stress hormones like cortisol directly suppress testosterone, the hormone responsible for sex drive and partly involved in the blood flow changes that produce erections. So chronic stress hits you from two directions: it activates the system that physically prevents erections while also lowering the hormone that supports them.
Performance anxiety creates a particularly frustrating cycle. One failed erection leads to worry about the next attempt, which triggers the stress response, which makes the next attempt harder. Many men with no underlying physical problem develop persistent erectile difficulty purely through this feedback loop.
Blood Vessel Problems Are the Most Common Physical Cause
The arteries that supply the penis are small, roughly 1 to 2 millimeters in diameter. That makes them some of the first blood vessels in the body to show damage from atherosclerosis, the process where cholesterol builds up in vessel walls and forms plaques. Before atherosclerosis narrows larger arteries enough to cause chest pain or a heart attack, it can already be restricting blood flow to the penis.
The earliest stage of this process is called endothelial dysfunction, where the inner lining of blood vessels loses its ability to dilate properly. When penile arteries can’t widen during arousal, not enough blood enters the spongy tissue and the erection is weak or doesn’t happen at all. As atherosclerosis progresses and plaques physically narrow the vessels, the problem gets worse.
This is why erectile difficulty is sometimes called an early warning sign for heart disease. The same vascular damage is happening throughout the body, but the small penile arteries show symptoms first. If you’re over 40 and experiencing new erectile problems without an obvious psychological cause, it’s worth paying attention to your cardiovascular health more broadly.
Diabetes Triples the Risk
Men with diabetes are three times more likely to develop erectile dysfunction than men without it. Diabetes damages blood vessels and nerves simultaneously. High blood sugar over time injures the endothelial lining of arteries (worsening the blood flow problem described above) while also degrading the small nerve fibers that carry arousal signals to the penis. The combination is especially damaging because both the signal and the plumbing are compromised at once.
Low Testosterone Plays a Role, but Not Always the One You’d Expect
Testosterone is essential for sex drive, and low levels are linked to erectile difficulty, but the relationship is more nuanced than “low T equals no erections.” The American Urological Association defines low testosterone as a total level below 300 ng/dL, but hitting that number alone doesn’t mean testosterone is your problem. You need both the low number and symptoms.
A large European study of over 3,300 men found that the probability of experiencing erectile dysfunction increased as testosterone dropped, with men below roughly 230 ng/dL facing about twice the odds compared to men with normal levels. But plenty of men with moderately low testosterone maintain erections fine, while some men with normal testosterone still struggle. Low testosterone more reliably reduces desire than it prevents the physical mechanics of an erection. If your libido is fine but you can’t get hard, testosterone is less likely to be the sole explanation.
Medications That Can Interfere
Several commonly prescribed drugs can make erections harder to achieve. Blood pressure medications are among the most frequent culprits, specifically thiazide diuretics, loop diuretics, and beta-blockers. These can decrease blood flow to the penis directly.
Interestingly, the effect is partly psychological. In one study of men starting a beta-blocker for heart disease, almost a third reported erectile problems when they were told the drug could cause them. Among men who weren’t told about the side effect, only 3 percent reported issues. That doesn’t mean the side effect isn’t real, but it shows how powerfully expectation and anxiety amplify the problem. Other blood pressure drugs, including ACE inhibitors and angiotensin-receptor blockers, rarely cause erectile issues and may be worth discussing as alternatives.
Antidepressants, particularly SSRIs, are another common cause. They affect the signaling pathways involved in arousal and orgasm. If you started a new medication and noticed a change in erectile function within weeks, the timing is worth noting.
Lifestyle Factors You Can Change
Obesity is strongly linked to erectile difficulty through multiple pathways. Excess body fat increases inflammation, worsens insulin resistance, and lowers testosterone. It also accelerates the atherosclerosis that narrows penile arteries. Losing even a moderate amount of weight can improve erectile function in men who are overweight, partly by restoring healthier blood vessel function and partly by raising testosterone levels.
Smoking damages the endothelial lining of blood vessels directly, making them less capable of the dilation that erections require. Heavy alcohol use suppresses the nervous system signals needed for arousal. Sedentary habits reduce cardiovascular fitness, which directly affects blood flow capacity. Poor sleep, particularly untreated sleep apnea, lowers testosterone and increases stress hormones. Each of these factors is individually significant, and they tend to cluster together.
Nerve Damage and Neurological Conditions
Erections depend on signals traveling from the brain through the spinal cord to the penis. Conditions that interrupt this pathway, like multiple sclerosis or spinal cord injuries, can severely impair erectile function. Most men with spinal cord injuries can still get reflex erections (triggered by direct touch), but these are typically not firm or sustained enough for intercourse, and the brain-driven erections triggered by arousal or fantasy are often lost entirely.
Nerve damage from pelvic surgery, particularly prostate removal, is another well-known cause. The nerves that control erections run along the surface of the prostate, and even with nerve-sparing surgical techniques, recovery of erectile function can take months to years.
A Simple Clue: Morning Erections
One of the most useful things you can notice on your own is whether you still get erections during sleep or upon waking. Healthy men typically experience several erections during REM sleep each night. If you’re waking up with firm morning erections but can’t get hard during sex, that’s a strong signal that your blood vessels and nerves are working fine, and the cause is more likely psychological: anxiety, stress, relationship dynamics, or depression.
If morning erections have disappeared or become noticeably weaker, that points more toward a physical cause like vascular disease, nerve damage, or hormonal changes. This isn’t a perfect diagnostic tool, but it’s a meaningful starting point for understanding what’s going on.
What Happens During a Medical Evaluation
If you see a doctor about erectile difficulty, the initial workup is straightforward: blood tests to check testosterone, blood sugar, cholesterol, and thyroid function, along with a review of your medications, health history, and mental health. This alone identifies the cause in many cases.
If the picture is unclear, a penile Doppler ultrasound can measure blood flow directly. During this test, a medication is injected into the penis with a small needle to trigger an erection, and ultrasound imaging measures how much blood flows in through each artery and whether blood is leaking back out through the veins too quickly (called venous leak). This test can distinguish between arterial supply problems, venous drainage problems, and nerve issues with a high degree of accuracy.
For most men, though, the cause is identifiable without advanced testing. The combination of your age, health history, medication list, morning erection patterns, and blood work usually tells a clear enough story to guide treatment.