Constipation that occurs after diarrhea may result from medication use or dietary changes. Some health conditions, such as inflammatory bowel disease (IBD), can also involve both diarrhea and constipation.

Some people may have underlying conditions that affect their digestive system as well.

Looking at other symptoms may help a person and their doctor identify the underlying cause. Treatment will vary based on the cause.

This article reviews some causes of constipation after diarrhea, treatments, prevention, and when to see a doctor.

Person's legs as they sit on the toilet with jeans around ankles.Share on Pinterest
Image credit: Virojt Changyencham/Getty Images

It is possible to experience diarrhea after constipation, but it is not common.

This article outlines a few possible underlying causes.


A person’s diet can often cause changes in bowel movements.

Some foods may irritate the intestines, though these foods will vary from person to person.

Some people may have an intolerance or allergy to certain foods. The National Institute of Diabetes and Digestive and Kidney Diseases (NIDDK) note that common food allergies could also lead to long-term symptoms, such as chronic diarrhea.

These common food allergens include:

  • cow’s milk
  • cereal grains, such as wheat
  • soy
  • eggs
  • seafood
  • fructose
  • sugar alcohols

The NIDDK indicate that eating these foods may cause a reaction in the digestive system, leading to symptoms such as constipation and diarrhea.

If the symptoms occur occasionally but are frequent enough to cause annoyance, try keeping a food journal to keep track of diet and bowel movements.

This may help identify trigger foods and intolerances.

Learn more about which foods can cause diarrhea here.

Stomach bug

A stomach or intestinal infection may cause temporary changes in a person’s bowel habits and movements. For example, the norovirus, which is a temporary viral infection in the stomach or intestines, may cause diarrhea.

The symptoms occur as the bowels inflame, making it harder for them to absorb water, which causes diarrhea.

Some flu symptoms, such as a high fever, may dry the body out, which could lead to a change of symptoms from constipation to diarrhea.

Look out for other telling symptoms of an infection.

Other signs of a stomach infection include:

  • loss of appetite
  • fever
  • chills
  • body aches or a headache
  • vomiting
  • stomach pain

Learn more about a 24-hour stomach bug here.

Reaction to medicines

In some cases, drastic changes in bowel movements could be due to a medicine a person has taken.

According to one review, some medications may have gastrointestinal side effects similar to the symptoms of irritable bowel syndrome (IBS) or inflammatory bowel disease (IBD).

These medications include nonsteroidal anti-inflammatory drugs (NSAIDs), antipsychotics, antidepressants, and metformin.

Anyone who experiences gastrointestinal changes after starting a new medication or adjusting a dosage should contact their doctor for more information.

Some of these changes may be temporary and will improve as the body gets used to a medication.

Every drug and body is different, so it is best to talk to a doctor in each case.

Learn more about the potential side effects of medications here.


Pregnancy causes various changes in the body. A person’s hormonal fluctuations may affect the transit time of their bowel movements. For example, increased progesterone during pregnancy may reduce gut motility and lead to constipation in up to 38% of pregnancies.

A person can work with a doctor to find ways to ease any uncomfortable conditions or symptoms that occur during pregnancy, such as constipation and diarrhea.

Learn more about constipation during pregnancy here.

Underlying digestive disorders

Someone who experiences constipation after diarrhea regularly may have an underlying digestive disorder, such as the following.


According to the NIDDK, IBS may cause fluctuations in the texture and consistency of bowel movements.

IBS symptoms can vary from person to person, but these changes generally occur along with other hallmark symptoms, such as:

  • fatigue
  • abdominal pain
  • gas
  • bloating
  • mucus in the stool

IBS symptoms may also occur due to other triggers, such as eating something the body has a sensitivity to, high levels of stress, or changes in the gut bacteria.

The NIDDK indicate that there are several different types of IBS. Doctors categorize them according to the symptoms a person experiences, such as IBS-C for constipation or IBS-D for diarrhea.

A person may also have IBS with mixed bowel habits (IBS-M). People with this condition may regularly experience both diarrhea and constipation.

A person with IBS-M experiences at least a quarter of their stools as hard and lumpy and at least a quarter as watery and loose.

Learn more about foods to avoid with IBS.


IBD is different from IBS. IBD refers to several conditions, including Crohn’s disease and ulcerative colitis.

These conditions can develop if the autoimmune responses are not working properly, and they do not respond to triggers correctly.

According to the Centers for Disease Control and Prevention (CDC), IBD causes chronic inflammation in different parts of the digestive tract.

Chronic inflammation can worsen symptoms and lead to damage over time.

Symptoms of IBD may include regular and persistent diarrhea and abdominal pain. Other symptoms may include fatigue, weight loss, and rectal bleeding.

Symptoms may appear in response to certain foods or other triggers.

Learn more about the differences between IBD and IBS here.

Treatments for constipation and diarrhea will vary based on the underlying cause and severity of symptoms.

For occasional cases, the person may only need to make minor adjustments, such as consuming more liquids and adding more fiber to their diet to improve stool consistency.


When a mild stomach infection is the culprit, a doctor may recommend that a person drinks plenty of fluids, such as water, broth, and electrolyte drinks.

After the infection clears, doctors may recommend a person take probiotics to help replenish their healthful gut bacteria.

Treating IBS

Doctors may recommend different ways to control the triggers of IBS in each case.

The NIDDK state that doctors may recommend a range of treatments, including:

  • relaxation therapy to reduce stress and anxiety levels
  • drugs to relieve specific symptoms, such as diarrhea or constipation.
  • dietary changes or taking fiber supplements to increase stool health
  • taking probiotics

Learn more about other treatment options for IBS here.


There is currently no cure for IBD. The condition requires regular treatment and checkups with a doctor. Imaging procedures, such as a colonoscopy, can help doctors examine the bowels.

According to the Crohn’s & Colitis Foundation, doctors may recommend a number of different drugs, depending on the person’s needs. These may include anti-inflammatory drugs, immunosuppressant drugs, and specific drugs to relieve diarrhea or constipation.

Some people with IBD may require surgery.

Learn more about Crohn’s disease here.

It may not be possible to prevent constipation after diarrhea in every case. A person should note any personal symptom triggers and try to eliminate them. It is also important to pay attention to overall digestive health as well as diet and lifestyle factors.

Methods for preventing constipation after diarrhea may vary based on the cause and condition.

However, these tips may help:

  • stay hydrated
  • eat a fiber-rich diet
  • exercise regularly
  • avoid overeating
  • take regular probiotics to promote gut health
  • reduce stress levels
  • reduce anxiety or situations that cause anxiety.
  • limit tobacco use
  • limit alcohol consumption

Learn more about foods to avoid when Crohn’s disease flares up.

While experiencing constipation after diarrhea is uncommon, it is not usually a cause for concern. Often, a person has a stomach bug or has eaten something their body has trouble digesting.

However, it is important to pay attention to any other symptoms that may develop. Anyone who experiences severe symptoms or symptoms that last for several days should see a doctor.

A person should also see a doctor if they experience certain symptoms, including continuous pain, bloody stools, and regular fatigue.

Lengthy bouts of constipation may lead to impacted stools that are extremely hard to pass. This may lead to complications, such as hemorrhoids or tears in the anus skin from too much strain. In some cases, the stool may become too difficult to pass at all.

If it becomes very difficult or impossible to have a bowel movement, contact a doctor.

Continuous diarrhea may dehydrate the body. Pay attention to any symptoms of dehydration, such as:

  • very dark urine
  • no urine production
  • dry mouth
  • increased thirst
  • headache
  • dizziness and confusion

Anyone noticing the signs of dehydration after regular diarrhea should also see their doctor.

Constipation and diarrhea may not commonly occur together, but it is possible. A few different issues can cause this rapid change in bowel patterns.

Managing symptoms may sometimes be enough, such as when a temporary infection or food intolerance has caused constipation after diarrhea.

More chronic symptoms may require medical treatment, and doctors will need to diagnose and regularly treat the underlying condition, such as in people with IBS or IBD.