Difficulty getting or keeping an erection is one of the most common sexual health issues men face, and it rarely comes down to a single cause. About 26% of men under 40 experience some form of erectile difficulty, and that number climbs steadily with age, affecting roughly half of all men between 40 and 70. Whether this is happening to you occasionally or every time, something specific is driving it, and most causes are treatable.
How Erections Actually Work
An erection is a vascular event. When you’re aroused, nerves in the penis release a chemical signal called nitric oxide. That signal triggers a chain reaction that relaxes the smooth muscle tissue inside the penis, allowing blood to rush into two spongy chambers called the corpora cavernosa. As those chambers fill, they compress the veins that normally drain blood away, trapping it inside and producing firmness.
Any disruption along that chain, from the initial nerve signal to the blood flow to the vein compression, can make it hard to get or stay erect. That’s why erectile problems have so many possible causes. The issue could be in the blood vessels, the nerves, your hormones, your mental state, or some combination.
The Most Common Physical Causes
Blood flow problems are the number one physical reason men can’t get hard. Anything that narrows or stiffens your arteries, including high blood pressure, high cholesterol, and diabetes, reduces the amount of blood that can reach the penis. The arteries supplying the penis are smaller than those feeding the heart, so they tend to show damage first. Erectile difficulty often appears 2 to 5 years before a man has a heart attack, which is why doctors increasingly treat it as an early warning sign of cardiovascular disease.
Smoking roughly doubles the risk of erectile problems in otherwise healthy men. Nicotine damages the lining of blood vessels and reduces their ability to dilate, directly undermining the process that produces an erection. Obesity carries a similar impact, contributing to inflammation and hormonal changes that interfere with arousal and blood flow.
Low testosterone is another well-known factor. The American Urological Association defines low testosterone as a total level below 300 ng/dL, and the likelihood of erectile problems rises as levels drop further below that threshold. Testosterone doesn’t directly cause erections, but it plays a supporting role in sex drive, nerve signaling, and the production of nitric oxide. Low levels are more common in men over 40 but can occur at any age, especially with obesity, sleep deprivation, or chronic stress.
Medications That Interfere
If your erection problems started around the same time you began a new medication, there may be a direct connection. Antidepressants are among the most common culprits. Drugs that affect serotonin carry the highest risk, including widely prescribed SSRIs like sertraline (Zoloft), fluoxetine (Prozac), and paroxetine (Paxil), with paroxetine carrying the greatest risk of the group. SNRIs like venlafaxine (Effexor) and older tricyclic antidepressants can also cause problems.
Blood pressure medications, particularly older classes like beta-blockers and thiazide diuretics, are another frequent cause. If you suspect a medication is involved, don’t stop taking it on your own. A doctor can often switch you to an alternative that’s less likely to affect sexual function.
Psychological and Situational Causes
Erections depend on your nervous system shifting into a relaxed, parasympathetic state. Anxiety, stress, and depression work against that shift. Performance anxiety is especially common in younger men: one bad experience creates worry about the next one, which makes the next one more likely to fail. This cycle can feel physical even though the root cause is psychological.
A useful clue is whether you still get erections in other situations. If you wake up with morning erections or can get hard during masturbation but not with a partner, the underlying hardware is likely working fine, and the issue is more situational or psychological. If erections are difficult in every context, a physical cause is more probable.
Relationship stress, poor sleep, heavy alcohol use, and even something as simple as being distracted or tired can all temporarily shut down your ability to get hard. Occasional difficulty in these circumstances is normal and not a sign of a lasting problem.
Lifestyle Changes That Help
Because erections are so dependent on blood flow, anything that improves cardiovascular health tends to improve erectile function. Regular aerobic exercise, losing excess weight, quitting smoking, and reducing alcohol intake all have measurable effects. For men whose erectile problems stem from early vascular damage, these changes can sometimes restore function without any other treatment.
Pelvic floor exercises, often called Kegels, strengthen the muscles at the base of the penis that help trap blood during an erection. Multiple clinical trials have found that pelvic floor training improves erectile function, though the specific programs varied in length and intensity. These exercises are free, have no side effects, and can be done anywhere. The basic movement involves squeezing the muscles you’d use to stop urinating midstream, holding for a few seconds, and repeating.
Sleep matters more than most men realize. Testosterone production peaks during deep sleep, and chronic sleep deprivation can lower testosterone levels significantly. If you’re consistently getting fewer than six hours, that alone could be contributing.
Medical Treatment Options
The most well-known treatment is a class of oral medications called PDE5 inhibitors, which includes sildenafil (Viagra), tadalafil (Cialis), and vardenafil (Levitra). These drugs work by blocking the enzyme that breaks down the chemical signal responsible for relaxing penile blood vessels. They don’t create arousal on their own; you still need stimulation. They simply make the natural erection process more effective.
A large patient-reported study of over 130,000 men found that sildenafil at medium to high doses produced slightly better satisfaction and hardness scores compared to similar doses of tadalafil. However, tadalafil is known for lasting significantly longer in the body, which some men prefer for its flexibility. The best choice depends on how you want the medication to fit into your life.
If medications don’t work or aren’t suitable, other options exist, including vacuum erection devices, penile injections, and surgical implants. Current treatment guidelines from the American Urological Association emphasize that there’s no required order. You don’t have to “fail” one treatment before trying another. The right starting point depends on your preferences, the severity of the problem, and what’s causing it.
When It Points to Something Bigger
Erectile difficulty isn’t just a quality-of-life issue. Because the blood vessels in the penis are among the smallest in the body, they’re often the first to show signs of damage from conditions like diabetes, atherosclerosis, and high blood pressure. The 2-to-5-year window between the onset of erectile problems and a cardiovascular event means that getting evaluated now could catch a serious condition early.
A basic workup typically involves a conversation about your symptoms, a physical exam, and blood tests checking testosterone levels, blood sugar, and cholesterol. These are straightforward, routine tests. If you’re under 40 with no obvious risk factors, a doctor may focus more on psychological contributors and medication side effects before ordering extensive testing.

