Can diabetes cause erectile dysfunction?

Erectile dysfunction (ED), also known as impotence, is when you struggle to get or maintain an erection long enough to have sex. It is an extremely common problem, affecting 52% of men between the ages of 40 and 70.
Sexual arousal in people with penises is extremely complex and involves your brain, hormones, emotions, nerves, muscles and blood vessels. Anything that interferes with one of these systems, including physical health conditions, mental health conditions and certain medications, can cause ED.
One physical condition that can cause ED is diabetes. Let’s explore the relationship between diabetes and sex, the best medicine for ED due to diabetes and how to recognise ED due to diabetes.
What is diabetes?
Diabetes is a condition caused when your blood sugar (glucose) is too high.
Glucose mainly comes from carbohydrates in your food and drinks and is your body’s preferred source of energy. When glucose is in your bloodstream, your body uses insulin (a hormone) to help it reach your cells where it’s broken down into energy.
However, if you have diabetes, your body either doesn’t make enough insulin or it doesn’t use insulin properly. This means your body can’t break glucose down into energy and your blood glucose levels continue to increase.
The link between diabetes and erectile dysfunction
When it’s time for you to get an erection, aroused nerve impulses travel from the brain to the penis. These trigger the smooth muscle in the penis to relax and allow an increase in blood flow. The penis then fills with blood, which makes it bigger and more erect. This means your ability to get an erection is dependent on your blood supply.
However, having high blood glucose levels over a prolonged period of time can damage your nerves and blood vessels, including the ones that control blood flow to your penis. This can restrict the amount of blood flowing to your penis, making it difficult to get aroused and have an erection.
As a result, up to 75% of people with penises and diabetes will experience some degree of ED over the course of their lifetime. In fact, those with penises and diabetes are thought to develop ED between ten to 15 years earlier than those who do not have diabetes.
Find out more about the symptoms of ED in our guide.
How to treat erectile dysfunction caused by diabetes
If your ED is caused by an underlying condition, treatment usually focuses on managing that condition to see if your ED resolves as a result.In the case of diabetes, this involves keeping your blood glucose levels within a normal range.
How you achieve this will depend on whether you have type 1 diabetes or type 2 diabetes:
Type 1 diabetes
A lifelong condition caused when your body attacks the cells in your pancreas so it cannot make any insulin at all.
Type 1 diabetes and impotence are managed by:
- monitoring your blood glucose levels
- counting the carbohydrates in your food and drink
- calculating how much insulin you need
- taking insulin via injection several times a day
- watching out for signs of hypoglycaemia (hypos) and knowing how to treat it
Type 2 diabetes
A condition which occurs when your body does not make enough insulin or the insulin you do make doesn’t work properly. You’re more likely to develop type 2 diabetes if you’re older, at a higher weight and have a family history of the disease.
There is no shortcut to diabetic erectile dysfunction reversal, but type 2 diabetes and impotence are generally managed by making lifestyle changes, such as:
- eating a healthy, balanced diet
- trying to lose weight, if you are at a higher weight
- getting regular exercise
- quitting smoking
- reducing the amount of alcohol you drink
- going for regular health checks
Other treatments for ED
If managing your diabetes isn’t enough to prevent your erection difficulties, you may be recommended another treatment for ED. These include:
- erectile dysfunction pills – if you’re wondering if a diabetic can use Viagra, the answer is yes. People with diabetes can use ED pills such as sildenafil (Viagra), tadalafil (Cialis), vardenafil (Levitra) and avanafil (Spedra). These increase blood flow to the penis in response to sexual stimulation
- alprostadil – a synthetic, hormone like treatment that can be injected or placed into your urethra (the tube that pee leaves your body through). This helps stimulate blood flow to the penis
- hormone replacement therapy – if your ED is caused by low levels of testosterone, you may be recommended to take synthetic testosterone to bring your levels back to normal
- penis pumps – a hand or battery-operated pump that fits over your penis and creates a vacuum to pull blood into your penis and make it erectÂ
- penile implants – an implant that can either keep your penis firm all the time or allow you to inflate it when you want to have sex. This is fitted during a surgical procedure
- mental health support – ED can be caused by anxiety, depression or emotional concerns. If this is the case, ED is treated using therapeutic interventions
Sources
- Erection problems (erectile dysfunction). NHS. [Accessed 8 September 2025].
- Erectile dysfunction: Prevalence. NICE Clinical Knowledge Summaries. [Accessed 8 September 2025].
- Causes of erectile dysfunction. NHS Inform. [Accessed 8 September 2025].
- Erectile dysfunction - Symptoms and causes. Mayo Clinic. [Accessed 8 September 2025].
- Diabetes. Cleveland Clinic. [Accessed 8 September 2025].
- About diabetes. NHS Inform. [Accessed 8 September 2025].
- Erectile dysfunction: Frequently asked questions. Cambridge University Hospitals NHS Foundation Trust. [Accessed 8 September 2025].
- Sexual problems in men with diabetes. Diabetes UK. [Accessed 8 September 2025].
- Diabetes and erectile dysfunction. Better Health Channel (Victoria State Government). [Accessed 8 September 2025].
- Diabetes and erectile dysfunction. Diabetes.co.uk. [Accessed 8 September 2025].
- Treating erectile dysfunction. NHS Inform. [Accessed 8 September 2025].
- Differences between type 1 and type 2 diabetes. Diabetes UK. [Accessed 8 September 2025].
- Diabetes. NHS. [Accessed 8 September 2025].
- Treatment for type 1 diabetes. NHS. [Accessed 8 September 2025].
- Living with type 1 diabetes. NHS. [Accessed 8 September 2025].
- Treatment for type 2 diabetes. NHS. [Accessed 8 September 2025].
- Erectile dysfunction - Diagnosis and treatment. Mayo Clinic. [Accessed 8 September 2025].
- Treating erectile dysfunction. NHS Inform. [Accessed 8 September 2025].
- Best ED pill for diabetics: Options and considerations. Medical News Today. [Accessed 8 September 2025].