Skip to main content
Irritable Bowel Syndrome

Anxiety and IBS: What’s the Connection?

Christine Giordano, MDFrank Schwalbe, MD
Written by Christine Giordano, MD | Reviewed by Frank Schwalbe, MD
Updated on February 26, 2024

Key takeaways:

  • Irritable bowel syndrome (IBS) is a common cause of abdominal pain, bloating, and diarrhea in adults. 

  • The brain and the digestive tract communicate with each other. This is sometimes called the gut-brain axis. 

  • IBS and anxiety disorders often affect the same people. But it is not clear exactly how the two are related, or if one causes the other. 

Save on related medications

It is common for anxiety and digestive problems to go hand in hand. You may have noticed that during stressful times you are more likely to suffer from constipation or diarrhea. But can anxiety really cause stomach pain? Or do problems in the digestive tract affect the mind? 

In this article, we’ll discuss the mind-gut relationship. And we’ll see how anxiety is related to irritable bowel syndrome (IBS), a common problem that causes abnormal bowel movements. 

What is IBS?

Featuring Anthony Starpoli, MDReviewed by Alexandra Schwarz, MD | December 22, 2023

IBS is a functional disorder of the digestive tract. This means that, unlike diseases like Crohn’s disease or ulcerative colitis, there are not always changes in the physical structure of the digestive tract. In people with IBS, blood and stool testing, imaging, and even colonoscopy results may be normal. The diagnosis of IBS is usually made based on symptoms, after other conditions get ruled out. 

Symptoms of IBS can vary. But in general, IBS symptoms include: 

  • Gas

  • Bloating

  • Diarrhea

  • Constipation

  • Abdominal pain

IBS is fairly common: About 10% to 15% of people in the U.S. have IBS. While the symptoms of IBS can be very disruptive, the condition is not dangerous and there are treatment options. 

What is an anxiety disorder?

Everyone experiences stress and worry. But if the worries are persistent, severe, or interfere with your normal life, it may be a sign of an anxiety disorder. People with anxiety disorders can also have physical symptoms like a fast heart rate, fatigue, and sweating. About one-third of U.S. adults will be affected by an anxiety disorder at some point in their lives. Common anxiety disorders include:

Studies have shown that mood disorders, like anxiety and depression, are more common in people with IBS. In one study, 44% of people with IBS had an anxiety disorder compared to only 8% of people without IBS. 

This may be because the mind and the gut are intertwined in what scientists call the gut-brain axis. This is a two-way signaling system between your brain and your digestive tract.

Here’s how the gut-brain axis works:

  • In the gut-brain axis, our thoughts, feelings, and environment lead to a release of chemicals. 

  • The theory is that when you feel anxious, your body releases stress-related chemicals to your gut.

  • This can cause abdominal pain, a change in your gut bacteria, and abnormal bowel movements.

  • In the other direction, a poorly functioning gut has been linked to mental health changes. This may be because the brain uses chemicals and hormones that are made by the bacteria in our gut.

  • Serotonin is an important chemical that plays a role in our mood and a lot of it is made in the gut.

So, when our brains feel stress and anxiety, they can cause our bowel habits to change. And when our gut is unhealthy, it can affect hormones that cause us to feel stress and anxiety.

Is IBS caused by anxiety?

We know that IBS and anxiety often coexist. But it’s not clear how they are related. Studies have shown evidence supporting two ideas. The first is that anxiety leads to problems with digestion. The second suggests that problems in the gut can cause anxiety.

But keep in mind that there are many people with anxiety who don’t have IBS — and vice versa. 

So, while anxiety and IBS are often related, experts can’t say exactly how yet. 

Can anxiety cause constipation or stomach pain?

Stress and anxiety can cause physical symptoms throughout the body. In the gastrointestinal system, increased stress can cause abdominal pain, diarrhea, and constipation. This can happen even in people who do not have IBS. Studies have shown that people with anxiety and depression are more likely to have episodes of abdominal pain or digestive problems.

What does stomach pain caused by anxiety feel like?

Stomach pain caused by anxiety, or by a functional digestive problem like IBS, can be hard to distinguish from other causes of abdominal pain. But stomach pain due to IBS often occurs after eating trigger foods or during a stressful event. And it usually improves after going to the bathroom. Signs that your abdominal pain may be due to something other than IBS or anxiety are:

  • Rectal bleeding

  • Unintentional weight loss 

  • Onset over age 50

  • Family history of bowel or ovarian cancer

  • Iron-deficiency anemia

  • Abdominal pain that wakes you up at night

What are risk factors for IBS?

Anxiety and depression may increase your risk for IBS. Other risk factors for IBS include: 

  • Having a relative who has IBS

  • Being younger than 50 years of age 

  • Experiencing chronic psychological stress

  • Smoking

  • Changes in your gut bacteria, due to infection or certain medications 

What can I do about IBS?

There isn’t a cure for IBS, but the symptoms can be managed. If you haven’t already done so, you’ll want to make an appointment with your healthcare provider. They’ll check if your symptoms are due to other health conditions. If it’s really IBS, they’ll work with you to improve your symptoms over time. Managing IBS usually requires a combination of diet and lifestyle changes, as well as medications.

Diet and lifestyle changes

In treating IBS, providers usually start with your diet. It’s a smart idea to keep a diary of what you eat and how it affects your bowel movements. This can be especially helpful to your provider as they discuss treatment recommendations with you.

Generally, research shows that avoiding the following might help prevent symptoms of IBS:

  • Gas-producing foods: Examples of gas-producing foods are beans, bananas, and brussels sprouts. 

  • Dairy products: Some dairy foods to avoid are milk, yogurt, and cheese.

  • Foods high in FODMAPs: FODMAPS — or fermentable oligosaccharides, disaccharides, monosaccharides, and polyols — include fructose and sorbitol, which appear in many fruits, some vegetables, and wheat. 

If you experience constipation, you’ll want to drink lots of water and eat small meals. A high-fiber diet or adding soluble fiber may also help. 

Also, remember that alcohol, tobacco, and caffeine can make symptoms of both IBS and anxiety worse. 

Medications 

If diet and lifestyle changes don’t work, there are also many medication options to help relieve symptoms. Always talk to your provider first before trying any new medications.

For IBS-related constipation, you might be asked to try:

For IBS-related diarrhea, you might be asked to try:

For IBS-related abdominal pain:

How can I manage my anxiety to prevent stomach pains and IBS flare ups?

Reviewed by Karen Hovav, MD, FAAP | May 13, 2025

If you suffer from anxiety and IBS, treating your anxiety may help improve your IBS symptoms. Some therapies used to treat anxiety disorders have also been been studied in IBS:

  • Cognitive behavioral therapy (CBT): CBT is a type of psychotherapy often used to help treat anxiety, depression, and other mental health conditions. But studies have shown that it can help reduce symptoms of IBS as well.

  • Antidepressant medications: SSRIs are often prescribed to people with anxiety disorders. But research has shown that these medications can also be helpful for some people with IBS

  • Exercise: Regular exercise — 20 to 60 minutes of vigorous exercise 3 to 5 times a week — can improve symptoms of both anxiety and IBS.

The bottom line

There is a clear link between anxiety and IBS. But it’s unclear if anxiety causes IBS or vice versa. That’s because both conditions are the result of many different factors. If you do have both anxiety and IBS, you are not alone. Luckily, there are many treatment options and lifestyle changes that can help relieve symptoms. Be sure to discuss some of these options with your healthcare provider.

why trust our exports reliability shield

Why trust our experts?

Christine Giordano, MD, is board-certified in general internal medicine. She received her medical degree from Rutgers New Jersey Medical School and completed residency at Thomas Jefferson University.
Karla Robinson, MD, is a medical editor for GoodRx. She is a licensed, board-certified family physician with almost 20 years of experience in health through varied clinical, administrative, and educational roles.
Frank Schwalbe, MD
Reviewed by:
Frank Schwalbe, MD
Frank Schwalbe, MD, is an assistant professor of anesthesiology at the Yale School of Medicine. He has practiced anesthesiology for 30 years.

References

GoodRx Health has strict sourcing policies and relies on primary sources such as medical organizations, governmental agencies, academic institutions, and peer-reviewed scientific journals. Learn more about how we ensure our content is accurate, thorough, and unbiased by reading our editorial guidelines.

Was this page helpful?

Latest articles