If you’ve had repeated trouble getting or keeping an erection firm enough for sex over a period of three months or more, that meets the clinical definition of erectile dysfunction. Occasional difficulty, especially when you’re tired, stressed, or have been drinking, is normal and doesn’t count. The distinction matters: ED is a pattern, not a one-off bad night.
About 5% to 10% of men under 40 experience ED, and it becomes more common with age. Roughly 22% of men have moderate to complete ED by age 40, rising to 49% by age 70. If you’re wondering whether what you’re experiencing is real, you’re far from alone.
What ED Actually Looks and Feels Like
ED doesn’t always mean a complete inability to get an erection. It exists on a spectrum. You might get partially hard but not firm enough for penetration, or you might lose your erection partway through sex. Some men can get erect during foreplay but lose it when attempting intercourse. Others notice their erections are less rigid than they used to be, even if sex is still technically possible.
Doctors use a five-question scoring tool called the IIEF-5 to gauge severity. It asks about your confidence in getting an erection, how often erections are firm enough for penetration, how often you can maintain them during sex, how difficult it is to maintain them, and how satisfying intercourse has been. Scores range from 1 to 25: 22 to 25 is normal, 17 to 21 is mild ED, 12 to 16 is mild-to-moderate, 8 to 11 is moderate, and 1 to 7 is severe. You can find this questionnaire online and score yourself in a few minutes.
The Morning Erection Test
One of the simplest clues to what’s going on is whether you still get erections during sleep or when you wake up. Healthy men typically get several erections overnight during REM sleep, completely independent of sexual thoughts. If you’re waking up with firm erections or getting them fine on your own but struggling during partnered sex, the plumbing is likely working and the cause is more likely psychological: performance anxiety, stress, relationship tension, or depression.
If morning erections have become rare, weak, or absent, that points more toward a physical cause, such as reduced blood flow, nerve damage, or a hormonal issue. This isn’t a perfect diagnostic tool, but it’s a useful first signal. There’s even a more formal version called the nocturnal penile tumescence test, where you wear a small device around your penis for at least two nights to measure whether erections happen during sleep.
Physical ED vs. Psychological ED
The pattern of your symptoms reveals a lot about the underlying cause. Physical (organic) ED tends to come on gradually over months or years. You notice erections slowly becoming less reliable, less firm, or harder to maintain. Ejaculation and sex drive often remain normal at first. Risk factors include diabetes, heart disease, high blood pressure, smoking, heavy drinking, and obesity.
Psychological ED is different. It often starts suddenly, sometimes tied to a specific event: a new relationship, job loss, a period of depression, or a particularly embarrassing sexual experience. You can still get good erections when masturbating or waking up, but they disappear with a partner. You might also notice premature ejaculation or an inability to ejaculate at all, both of which are more common with psychological causes.
Many men have a mix of both. A mild physical issue creates one bad experience, which triggers anxiety, which makes the next attempt worse. Sorting out the proportions matters because the treatment approach differs significantly.
Medications That Can Cause ED
If your erection problems started around the same time as a new prescription, the medication could be the culprit. Several common drug classes are known to cause or worsen ED.
- Blood pressure medications: Water pills (thiazide diuretics) are the most common offenders. Beta-blockers are the next most likely. Alpha-blockers tend to cause fewer problems.
- Antidepressants and anti-anxiety drugs: SSRIs and older antidepressants frequently affect sexual function, as do benzodiazepines used for anxiety.
- Opioid painkillers: Chronic use of prescription opioids suppresses testosterone and commonly causes ED.
- Antihistamines: Some over-the-counter allergy and heartburn medications can contribute, especially with regular use.
- Recreational drugs: Alcohol, nicotine, marijuana, cocaine, and amphetamines all carry ED risk, with smoking and heavy drinking showing clear dose-dependent effects.
Never stop a prescribed medication on your own because of sexual side effects. But knowing that your medication might be involved gives you something concrete to discuss with your doctor, who can often switch you to an alternative.
Why ED Can Be an Early Warning Sign
Erections depend on healthy blood flow. The arteries supplying the penis are smaller than those feeding the heart, so they tend to show the effects of vascular damage earlier. Research from the American Heart Association found that men with ED had roughly double the risk of a future cardiovascular event compared to men without it. ED and heart disease share the same root causes: inflammation, arterial plaque buildup, and damage to the lining of blood vessels.
This is one of the most important reasons not to ignore persistent erection problems, especially if you’re in your 40s or 50s. ED can surface years before a heart attack or stroke would. Getting evaluated for ED often uncovers undiagnosed high blood pressure, elevated cholesterol, or diabetes.
What Happens at a Doctor’s Visit
Many men put off seeing a doctor because they’re unsure what the visit involves. It’s more straightforward than you might expect. The doctor will ask about your symptoms, when they started, whether they came on gradually or suddenly, and whether you still get morning or nighttime erections. They’ll ask about your medical history, medications, alcohol and drug use, and your mental health.
The physical exam focuses on a few specific things: blood pressure, pulses in your legs and feet (to check circulation), sensation in the genital area (to assess nerve function), and a check of the penis and testicles for any structural abnormalities. A prostate check is often included. The whole exam is brief.
Blood work is standard. Your doctor will check testosterone levels, blood sugar (to screen for diabetes), and cholesterol. A urine test may also be ordered. These results help identify whether a treatable medical condition is driving the problem. In many cases, treating the underlying issue, whether it’s low testosterone, poorly controlled blood sugar, or a medication side effect, improves erections without needing additional ED-specific treatment.
Lifestyle Factors You Can Evaluate Now
Before or alongside a medical evaluation, it’s worth honestly assessing your lifestyle. Cigarette smoking has a dose-dependent relationship with ED: the more you smoke, the higher your risk, and quitting measurably improves vascular health over time. Physical activity shows the opposite pattern. More exercise correlates with lower ED risk, likely because it improves blood flow, reduces inflammation, and helps maintain a healthy weight.
Heavy alcohol use is another clear contributor. A drink or two might reduce performance anxiety for some men, but chronic or heavy drinking damages nerves and blood vessels and disrupts hormone levels. Poor sleep, particularly untreated sleep apnea, is an underrecognized contributor as well, since testosterone production peaks during deep sleep.
If you’re overweight, sedentary, smoking, or drinking heavily, and you’re also experiencing erection problems, those habits are likely playing a direct role. Addressing them won’t produce overnight results, but the evidence consistently shows that men who improve their cardiovascular fitness see measurable improvements in erectile function.

