Skip to main content
Irritable Bowel Syndrome

Anxiety and IBS: What’s the Connection?

Christine Giordano, MDPatricia Pinto-Garcia, MD, MPH
Written by Christine Giordano, MD | Reviewed by Patricia Pinto-Garcia, MD, MPH
Updated on April 3, 2026

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’s not clear exactly how the two are related, or if one causes the other. 

Save on related medications

It’s common for anxiety and digestive problems to go hand in hand. You may have noticed that during stressful times you are more likely to experience 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 condition that causes abnormal bowel movements.

What is IBS?

Featuring Anthony Starpoli, MDReviewed by Karen Hovav, MD, FAAP | December 3, 2025

IBS is a functional disorder of the digestive tract. This means that, unlike diseases like Crohn’s disease or ulcerative colitis, there aren’t 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. Common 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 digestive tract.

Here’s how the gut-brain axis works:

  • Our thoughts, feelings, and environment lead to a release of chemicals. When you feel anxious, your body releases stress-related chemicals that affect 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 responds to chemicals and hormones that are made by the bacteria in our gut.

  • For example, 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 the relationship may not be as simple as one causing the other. Studies have shown that the relationship between anxiety and IBS is complex — sometimes gut problems precede mood symptoms and vice versa. So while anxiety can cause problems with digestion, there’s also evidence that poor gut health can affect mental health.

Can anxiety cause constipation or stomach pain?

Yes, studies have shown that people with anxiety and depression are more likely to have episodes of abdominal pain or digestive problems.

Stress and anxiety can cause physical symptoms throughout the body. In the gastrointestinal system, increased stress can lead to:

  • Changes in gut motility: This is how fast things move through the digestive tract. 

  • Alterations in the gut microbiome: Stress can affect the balance of “good” to “bad” bacteria. 

  • Diet: You may find yourself craving foods higher in sugar or fat when you’re stressed. 

All of this can lead to symptoms like abdominal pain, diarrhea, and constipation. This can happen even in people who don’t have IBS. 

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

  • Experiencing chronic psychological stress

  • Smoking

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

How can you manage IBS symptoms?

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 team. They’ll check if your symptoms are due to other health conditions. If you have 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 changes 

Diet changes are a key part of IBS treatment. It’s a smart idea to keep a diary of what you eat and how it affects your bowel movements. This can help you figure out what foods can trigger your symptoms.

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. Try to avoid alcohol, tobacco, and caffeine — these can make symptoms of both IBS and anxiety worse. 

Medication to regulate bowel movements

There are also many medication options to help relieve symptoms. Always talk with your healthcare team 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:

Anxiety treatment

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

Anxiety treatment may help improve your IBS symptoms. 

Several 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.

  • Biofeedback therapy: Biofeedback therapy is a way to gain conscious control over bodily functions. During a biofeedback therapy session, unconscious activities like heart rate and respiratory rate are monitored in order to help someone develop more control over them. In the case of people with anxiety and IBS, biofeedback therapy may help IBS patients with sphincter relaxation

  • Hypnotherapy: Hypnotherapy involves putting participants in a deep state of relaxation so that they can receive therapeutic suggestions. There’s some evidence that hypnotherapy can improve symptoms of IBS

  • 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.

Frequently asked questions

IBS is a chronic condition. There’s no cure for IBS. But a combination of lifestyle changes, medication, and other therapies can ease symptoms. With treatment, some people experience long stretches of time where they have no symptoms. 

Many people notice bowel habit changes in times of stress. But that isn’t necessarily the same thing as having IBS. Generally symptoms have to occur for at least 6 months to be considered IBS. 

Yes, anxiety and stress can cause vomiting. There are a wide variety of conditions that can trigger nausea and vomiting, including physical and psychological stress.

The bottom line

There’s 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 a healthcare professional.

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.
Patricia Pinto-Garcia, MD, MPH, is a medical editor at GoodRx. She is a licensed, board-certified pediatrician with more than a decade of experience in academic medicine.

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