# Alternating Constipation and Diarrhea Causes

A gastroenterologist explains why bowel habits swing between constipation and diarrhea, from irritable bowel syndrome to diet, medicines, infection and stress.

[Alternating constipation and diarrhea](/alternating-constipation-and-diarrhea-meaning-and-definition) means your bowel movements switch between hard, infrequent stools and loose, urgent ones, and the causes range from [irritable bowel syndrome](/irritable-bowel-syndrome-definition-and-spanish-term) to diet, medicines and past infection. The pattern itself is a symptom, not a diagnosis, so the useful question is what is driving the change in your bowel motility. This page explains the causes a gastroenterologist considers and when the pattern deserves medical assessment. 

## Irritable bowel syndrome and bowel motility 

Irritable bowel syndrome, often shortened to IBS, is a leading explanation for bowel habits that swing in both directions. In IBS the gut and brain communicate poorly, so the muscles of the bowel contract too strongly at times and too weakly at others. That disturbed bowel motility produces cramps, bloating, and stools that alternate between hard and loose. IBS is diagnosed from the pattern of symptoms rather than a single test, and a clinician checks for warning signs before settling on it. 

## Diet, fiber and fluid in the swing 

Dietary fiber and fluid intake shape stool consistency, and an uneven intake can push stools both ways. A day of very little fiber and fluid favors hard, slow stools, while a large fatty meal or a lot of caffeine can loosen them. Some people react to lactose, sorbitol or other fermentable sugars with gas and urgency. Keeping meals and fluids steady helps show whether diet is part of the pattern. 

## Medicines, infection and the gut-brain axis 

Medicines are a frequent cause of changing bowel habits, and antibiotics, iron supplements, opioid painkillers and laxatives all alter stool form. An intestinal infection can leave the bowel irritable for a period after the illness clears, a pattern clinicians call post-infectious change. Stress acts through the gut-brain axis, the two-way signaling between the nervous system and the digestive tract, and can speed or slow the bowel. A review of all medicines and a history of recent infection helps sort these causes out. 

## Questions About Alternating Bowel Habits 

### What causes alternating constipation and diarrhea? 

Alternating constipation and diarrhea has several causes, and irritable bowel syndrome is a frequent one. Diet and fluid intake, medicines such as antibiotics or iron tablets, a recent intestinal infection, and stress acting through the gut-brain axis can all disturb bowel motility. A clinician looks at the full pattern, your medicines and your history before naming a cause. 

### Can stress cause constipation and diarrhea to alternate? 

Yes, stress can make bowel habits swing between constipation and diarrhea. The gut-brain axis links emotional stress to the nerves and muscles of the bowel, which can slow down or speed up. Stress alone does not explain every case, so other causes such as diet, medicines and infection are still checked. 

### Can medicines cause alternating bowel habits? 

Yes, several medicines can cause alternating constipation and diarrhea. Antibiotics disturb the gut bacteria, iron supplements and opioid painkillers slow the bowel, and laxatives can overshoot into loose stools. Reviewing every medicine, including anything bought without a prescription, with a clinician or pharmacist helps identify the culprit. 

### When should alternating constipation and diarrhea be checked by a doctor? 

Alternating constipation and diarrhea deserves medical assessment when it comes with blood in the stool, weight loss, fever, or symptoms that start after age 45. A gastroenterologist can arrange tests to rule out infection, inflammation and other causes. Do not treat the pattern with laxatives or antidiarrheal drugs for long stretches without advice.
