Enjoy sex like you used to

Learn more

Can Stomach Gas Cause Erectile Dysfunction?

Kelly Brown MD, MBA

Reviewed by Kelly Brown, MD

Written by Geoffrey C. Whittaker

Published 05/11/2022

Updated 04/27/2024

Whether you’re dealing with a mild stomach ache or a more persistent gut-related illness, an upset stomach is never an enjoyable experience. It can also lead to additional problems. Can stomach gas cause erectile dysfunction (ED)? Maybe.

You might find it difficult to get or maintain an erection when experiencing stomach symptoms. Is this a coincidence? Can bowel problems cause erectile dysfunction — or, more specifically, can constipation cause erectile dysfunction? Possibly.

But these questions are best answered with perspective. While there doesn’t seem to be a direct link between the digestive system and sexual performance, some research does suggest that chronic digestive issues may be a risk factor for ED.

Ahead, we’ll look at the potential link between digestive problems and sexual function issues, such as erectile dysfunction, as well as other common causes of ED.

Though the stomach and gastrointestinal tract aren’t directly related to erectile function, stomach and bowel issues can cause problems like sexual avoidance or anxiety. Some scientific research suggests that certain digestive diseases might be linked to ED, ejaculation issues and other forms of sexual dysfunction.

Stomach problems that can cause or affect sexual performance include:

  • Inflammatory bowel disease (IBD)

  • Ulcerative colitis

  • Irritable bowel syndrome (IBS)

  • Crohn’s disease

For instance, IBD is associated with several sexual issues, including weak sexual desire and erectile dysfunction (the inability to get or maintain an erection hard enough or long enough for intercourse).

In a study of men with newly diagnosed inflammatory bowel disease, 94 percent were affected by some degree of ED. The researchers also found that erectile dysfunction correlated with older age and reduced physical and mental health.

While IBD is closely associated with ED, researchers aren’t aware of any direct physical connection between digestive problems and erectile dysfunction. Put simply, although they’re linked, there isn’t yet a clear stomach health or digestive factor that seems to directly cause erection problems.

ED treatment

Hard facts on better erections

So then, why do some guys have trouble performing when they have stomach gas? It might have to do with the mental health aspect of bowel issues.

Experts have speculated that the reason is psychological, potentially relating to sexual performance anxiety and depression. Anxiety, depression and body image issues are common in people with IBD — especially active IBD that causes ongoing symptoms.

There’s also the discomfort factor, which can be significant with stomach problems. When you have to go to the bathroom frequently, need to pass gas, feel physically uncomfortable or just don’t quite feel right, your sex drive and general sexual activity might suffer.

So, can constipation cause ED? The answer could be another question: Do you typically feel ready for sex when constipated?

Currently, only limited research is available about any potential link between digestive system health and erectile function.

So what does cause ED? Several things.

Physical Health Conditions That Contribute to ED

Since erections rely on healthy blood flow and nerve function, various physical health conditions can cause issues with erections.

Common physical causes of erectile dysfunction include:

If you have any of these medical conditions and are having trouble getting or maintaining erections, let your healthcare provider know.

Psychological Factors for ED

Sometimes, erectile dysfunction is either caused or made worse by a psychological issue.

You may have a higher risk of developing ED if you have:

  • Depression

  • Anxiety

  • Poor body image

  • Low self-esteem

  • Worries about sexual failure

  • Feelings of guilt about sexual intercourse

  • Acute or chronic stress

Our guide to the psychological causes of ED discusses these factors in more detail, including how they can impact your sex life.

ED is a known side effect of antidepressant medications, anti-androgens, anxiety and sleep medications, appetite suppressants, medications for stomach ulcers and some types of blood pressure medication, such as beta blockers or diuretics.

Lifestyle Habits That May Cause ED

Finally, your lifestyle and general well-being can have a big impact on your sexual health, including your erections.

Lifestyle factors that may cause ED include:

  • Drinking alcohol

  • Smoking

  • Using illegal drugs

  • Abusing prescription drugs

  • Not getting enough physical activity

  • Having overweight or obesity

Our full guide to erectile dysfunction has more info about ED symptoms, causes of ED and treatment options.

While erectile dysfunction can be annoying to deal with — and potentially affect your overall quality of life — the good news is that it’s almost always treatable.

Today, many options are available to treat ED. This includes oral medication to take before sex, daily medication, simple lifestyle changes and even safe, proven methods for treating severe ED that doesn’t respond well to conventional treatments.

Here’s what you can do to address gastrointestinal erectile dysfunction.

1. Start by Treating Your Digestive Health

If you have health problems relating to your digestive tract, it’s best to start by talking to a healthcare professional who can help you come up with a treatment plan.

Let your healthcare provider know about:

If you feel embarrassed to talk to your regular doctor about your symptoms, you can connect with a licensed healthcare provider online with our primary care services.

2. Get Checked for Other Health Issues

When erectile dysfunction is caused by a physical issue, treating the underlying cause may help improve your erections and sexual health. Make sure to get a regular health checkup with appropriate exams and screenings based on your age and health status.

During a checkup, your healthcare provider might detect underlying conditions that might cause or worsen ED, such as high blood pressure or low testosterone levels.

3. Consider Erectile Dysfunction Medications

One of the most effective ways to treat erectile dysfunction is with ED medication, like sildenafil (the active ingredient in Viagra®), tadalafil (generic Cialis®), vardenafil (Levitra®) or avanafil (Stendra®).

These medications are in a class of drugs called PDE5 inhibitors. They work by making it easier for blood to flow to the erectile tissue in your penis. This helps you to get and stay hard when sexually aroused.

Our guide to what to expect from erectile dysfunction medication has more info about how common ED drugs work, how you can take them to improve your erections, their potential side effects and more.

4. Make Changes to Your Habits and Lifestyle

Making changes to your habits and lifestyle can improve your health and reduce the severity of erectile dysfunction.

Here’s what you can try to improve your erections and sexual performance:

  • Keep yourself physically active. Try to get at least 150 minutes of aerobic exercise a week, like brisk walking or a bike ride, and two muscle-strengthening workouts. This is just a goal — start where you’re at and work your way up.

  • Maintain a healthy body weight. Weight and ED are closely linked — in fact, one study found that men with overweight or obesity have a significantly higher risk of ED than those in the healthy BMI (body mass index) weight range. Aiming for a healthy weight may help to prevent ED and improve sexual function.

  • If you smoke, try to quit. Smoking cigarettes can increase your risk of vascular disease and limit blood flow in your body. Smoking is also linked to ED. If you smoke and have erectile dysfunction, try your hardest to kick the habit for good.

  • Limit alcohol consumption. Excessive drinking is closely associated with sexual dysfunction, as with alcohol-induced ED (or what some call “whiskey dick”). While it’s okay to drink in moderation (the CDC recommends no more than two drinks a day for guys), cutting back might help your bedroom performance.

  • Avoid illegal drugs. Many illegal drugs can affect sexual function and may make it harder to get an erection. Avoid using any illicit drugs and seek expert help if you have a substance use disorder.

Our list of ways to naturally protect your erection has other tips for reducing the severity of ED and improving sexual function.

ED Treatment

Enjoy sex like you used to

Can bowel problems cause erectile dysfunction? And more specifically, can stomach gas cause erectile dysfunction? Potentially — but probably not directly.

Here’s what to keep in mind about digestive issues and ED:

  • Research is lacking. Research suggests gas and indigestion are ED risk factors, although available study data is limited.

  • Medications can play a role. Some medications can cause stomach issues, such as selective serotonin reuptake inhibitors (SSRIs) and other antidepressants. So they could indirectly contribute to erection issues and other sexual performance problems.

  • Help is available. If you have ED and think stomach-related medical conditions might be to blame, it’s best to talk to a healthcare provider. They can check for digestive problems that could affect your erections and general sexual health.

  • ED treatments are effective. You can also access proven, evidence-based erectile dysfunction medication online through our telehealth platform.

Hims offers a range of ED medications online, following a digital consultation with a licensed healthcare provider who can prescribe one based on your needs and health status.

Want to learn more about dealing with ED? Our guide to the most common erectile dysfunction treatments and drugs has everything you need to know.

15 Sources

  1. Definition & Facts for Erectile Dysfunction. (2017, July). Retrieved from https://www.niddk.nih.gov/health-information/urologic-diseases/erectile-dysfunction/definition-facts
  2. Erection Ejaculation: How It Occurs. (2020, November 27). Retrieved from https://my.clevelandclinic.org/health/articles/10036-erection-ejaculation-how-it-occurs
  3. Christensen, B. (2014). Inflammatory Bowel Disease and Sexual Dysfunction. Gastroenterology & Hepatology. 10 (1), 53-55. Retrieved from https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4008960/
  4. Shmidt, E., et al. (2019, July 17). Erectile Dysfunction Is Highly Prevalent in Men With Newly Diagnosed Inflammatory Bowel Disease. Inflammatory Bowel Diseases. 25 (8), 1408-1416. Retrieved from https://pubmed.ncbi.nlm.nih.gov/30861068/
  5. Symptoms & Causes of Erectile Dysfunction. (2017, July). Retrieved from https://www.niddk.nih.gov/health-information/urologic-diseases/erectile-dysfunction/symptoms-causes
  6. Barkin, J. (2011, April). Erectile dysfunction and hypogonadism (low testosterone). Canadian Journal of Urology. 18 Suppl, 2-7. Retrieved from https://pubmed.ncbi.nlm.nih.gov/21501544/
  7. Oliva, V., et al. (2021, July 13). Gastrointestinal side effects associated with antidepressant treatments in patients with major depressive disorder: A systematic review and meta-analysis. Progress in Neuro-Psychopharmacology & Biological Psychiatry. 109, 110266. Retrieved from https://pubmed.ncbi.nlm.nih.gov/33549697/
  8. Dhaliwal, A. & Gupta, M. (2021, June 25). PDE5 Inhibitors. StatPearls. Retrieved from https://www.ncbi.nlm.nih.gov/books/NBK549843/
  9. Preventing Erectile Dysfunction. (2017, July). Retrieved from https://www.niddk.nih.gov/health-information/urologic-diseases/erectile-dysfunction/prevention
  10. How much physical activity do adults need? (2022, March 17). Retrieved from https://www.cdc.gov/physicalactivity/basics/adults/index.htm
  11. Skrypnik, D. Bogdański, P. & Musialik, K. (2014, February). Obesity—significant risk factor for erectile dysfunction in men. Polski Merkuriusz Lekarski : Organ Polskiego Towarzystwa Lekarskiego. 35 (212), 137-141. Retrieved from https://pubmed.ncbi.nlm.nih.gov/24720114/
  12. Health Effects of Cigarette Smoking. (2021, October 29). Retrieved from https://www.cdc.gov/tobacco/data_statistics/fact_sheets/health_effects/effects_cig_smoking/
  13. Arackal, B.S. & Benegal, V. (2007). Prevalence of sexual dysfunction in male subjects with alcohol dependence. Indian Journal of Psychiatry. 49 (2), 109-112. Retrieved from https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2917074/
  14. Dietary Guidelines for Alcohol. (2020, December 29). Retrieved from https://www.cdc.gov/alcohol/fact-sheets/moderate-drinking.htm
  15. Treatment for Erectile Dysfunction. (2017, July). Retrieved from https://www.niddk.nih.gov/health-information/urologic-diseases/erectile-dysfunction/treatment
Editorial Standards

Hims & Hers has strict sourcing guidelines to ensure our content is accurate and current. We rely on peer-reviewed studies, academic research institutions, and medical associations. We strive to use primary sources and refrain from using tertiary references. See a mistake? Let us know at [email protected]!

This article is for informational purposes only and does not constitute medical advice. The information contained herein is not a substitute for and should never be relied upon for professional medical advice. Always talk to your doctor about the risks and benefits of any treatment. Learn more about our editorial standards here.

Kelly Brown MD, MBA
Kelly Brown, MD

Dr. Kelly Brown is a board certified Urologist and fellowship trained in Andrology. She is an accomplished men’s health expert with a robust background in healthcare innovation, clinical medicine, and academic research. Dr. Brown was previously Medical Director of a male fertility startup where she lead strategy and design of their digital health platform, an innovative education and telehealth model for delivering expert male fertility care.

She completed her undergraduate studies at University of North Carolina at Chapel Hill (go Heels!) with a Bachelor of Science in Radiologic Science and a Minor in Chemistry. She took a position at University of California Los Angeles as a radiologic technologist in the department of Interventional Cardiology, further solidifying her passion for medicine. She also pursued the unique opportunity to lead departmental design and operational development at the Ronald Reagan UCLA Medical Center, sparking her passion for the business of healthcare.

Dr. Brown then went on to obtain her doctorate in medicine from the prestigious Northwestern University - Feinberg School of Medicine and Masters in Business Administration from Northwestern University - Kellogg School of Management, with a concentration in Healthcare Management. During her surgical residency in Urology at University of California San Francisco, she utilized her research year to focus on innovations in telemedicine and then served as chief resident with significant contributions to clinical quality improvement. Dr. Brown then completed her Andrology Fellowship at Medical College of Wisconsin, furthering her expertise in male fertility, microsurgery, and sexual function.

Her dedication to caring for patients with compassion, understanding, as well as a unique ability to make guys instantly comfortable discussing anything from sex to sperm makes her a renowned clinician. In addition, her passion for innovation in healthcare combined with her business acumen makes her a formidable leader in the field of men’s health.

Dr. Brown is an avid adventurer; summiting Mount Kilimanjaro in Tanzania (twice!) and hiking the incredible Torres del Paine Trek in Patagonia, Chile. She deeply appreciates new challenges and diverse cultures on her travels. She lives in Denver with her husband, two children, and beloved Bernese Mountain Dog. You can find Dr. Brown on LinkedIn for more information.

Education & Training


Research

Published as Kelly Walker



Read more

Related Articles

Start your ED assessment

Answer a few questions so we can help