Why Do I Get Diarrhea When I’m Fasting?

Fasting triggers several overlapping changes in your digestive system that can, paradoxically, send you running to the bathroom even though you haven’t eaten anything. The most common culprits are bile acids pooling in your intestines without food to soak them up, a powerful set of gut contractions that only fires when you’re not eating, and shifts in your gut bacteria that alter how your colon handles fluid. The specific cause depends on how long you’re fasting, what you’re still consuming during the fast, and your individual anatomy.

Bile Acids With No Food to Bind To

Your liver produces bile acids continuously, and your gallbladder stores them between meals. When you eat, bile is released into the small intestine where it helps break down and absorb dietary fat. The fat and other nutrients in your meal essentially give bile acids a job to do, and most of them get reabsorbed at the end of the small intestine before they ever reach the colon.

When you’re fasting, bile acids still cycle through your system, but there’s no dietary fat waiting to bind with them. More of these acids slip past the small intestine and reach the colon. Once there, they trigger fluid secretion and increase the permeability of the colon’s lining, while also stimulating powerful contractions that push contents through faster than normal.1BMJ Publishing Group / Frontline Gastroenterology. Bile acid diarrhoea: pathophysiology, diagnosis and management The result is watery stool that moves through quickly, even though there’s very little solid material in your gut.

Some people overproduce bile acids to begin with, a condition sometimes called bile acid diarrhea. In those individuals, the feedback loop that normally throttles bile production doesn’t work properly, and bile synthesis can ramp up to six or seven times the normal rate.1BMJ Publishing Group / Frontline Gastroenterology. Bile acid diarrhoea: pathophysiology, diagnosis and management If you already run high on bile acid production, fasting removes the one thing that was keeping those acids occupied in the small intestine, and the effect on your colon is amplified.

Your Gut’s Cleaning Cycle Kicks In

Your stomach and small intestine have a built-in housekeeping mechanism that only operates when you haven’t eaten. It’s called the migrating motor complex, or MMC, and it’s a repeating wave of muscular contractions that sweeps through your upper digestive tract during fasting. The moment you eat, it shuts off.2PubMed. The migrating motor complex: control mechanisms and its role in health and disease

The cycle has several phases, and the most dramatic one involves a burst of strong contractions that starts in the stomach or duodenum and migrates downward through the small intestine.3PubMed. Redefining the functional roles of the gastrointestinal migrating motor complex and motilin in small bacterial overgrowth and hunger signaling Think of it as a broom sweeping debris, bacteria, and leftover digestive secretions toward the colon. Under normal circumstances, this is a good thing. It keeps bacterial populations in the small intestine under control and clears out residual material. But if your colon is already dealing with an excess of bile acids or if your gut is particularly sensitive, these vigorous contractions can push watery contents into the colon fast enough to trigger an urgent bowel movement.

The rumbling and gurgling you hear in your stomach during a long fast? That’s often the MMC at work. It’s completely normal, but in some people the downstream effect is looser stools, especially if the fast lasts long enough for multiple cycles to run back-to-back.

What You Consume During a Fast Matters More Than You Think

Most fasting protocols allow certain beverages: water, black coffee, tea, sometimes supplements. Each of these can contribute to diarrhea in ways that have nothing to do with the fasting itself.

Coffee is a major offender. It stimulates gut motility and promotes acid and bile secretion even when consumed on its own. Research has documented that coffee exerts pro-motility effects on the muscular layers of the digestive tract, and it can increase colonic contractions within minutes of drinking it.4PubMed Central. Effects of Coffee and Its Components on the Gastrointestinal Tract and the Brain-Gut Axis On an empty stomach, with bile acids already roaming untethered and the MMC already churning, adding coffee is like throwing gasoline on a campfire. If you’re fasting and drinking multiple cups of black coffee, that alone could explain your symptoms.

Magnesium supplements are another common trigger. Many people take magnesium during fasting windows, and certain forms of magnesium are poorly absorbed in the gut. When magnesium stays in the intestinal lumen, it draws water in by osmosis, producing loose or watery stools. Even in controlled studies where participants were given very high magnesium doses, diarrhea was the primary side effect researchers were measuring.5PubMed Central. Perspective: Call for Re-evaluation of the Tolerable Upper Intake Level for Magnesium Supplementation in Adults If you’re taking magnesium citrate or magnesium oxide on an empty stomach, that may be your answer right there.

Electrolyte drinks and supplements marketed to fasters sometimes contain sugar alcohols or other additives that can cause osmotic diarrhea on their own. Reading the label for ingredients like sorbitol, mannitol, or maltitol is worth your time if you’re experiencing loose stools during fasts.

Your Gut Bacteria Shift Within Days

The trillions of bacteria living in your intestines depend on what you eat. When food stops arriving, the microbial ecosystem doesn’t just sit idle. It reorganizes, sometimes dramatically, and those shifts can change how your colon functions.

In one study of prolonged fasting in adults, Proteobacteria expanded roughly sixfold, while Bacteroidetes dropped by about half and Firmicutes decreased by about a third.6PubMed Central. Effects of Long-Term Fasting on Gut Microbiota, Serum Metabolome, and Their Association in Male Adults Proteobacteria include species associated with gut inflammation and looser stools, so a sudden bloom of these organisms could directly contribute to diarrhea.

Research on shorter fasting periods shows a different but related pattern. During fasting, butyrate-producing bacteria like Faecalibacterium prausnitzii tend to decrease, while bacteria capable of degrading the mucus lining of the gut become more active.7Nature Communications. Fasting alters the gut microbiome reducing blood pressure and body weight in metabolic syndrome patients Butyrate is a short-chain fatty acid that nourishes colon cells and helps maintain the gut barrier. When its production drops, the colon may become less efficient at absorbing water, and stool consistency changes.

Interestingly, not all microbial shifts during fasting are harmful. Research on Ramadan fasting found decreases in certain harmful microbes and increases in beneficial short-chain fatty acids over the 30-day fasting period.8PubMed Central. Dietary composition and fasting regimens differentially impact gut microbiome and short-chain fatty acid profile in a Pakistani cohort The gut seems to adapt over time, which may explain why fasting-related diarrhea is often worst in the first few days and then improves.

The Gut Lining Itself Can Change

Your small intestine is lined with tiny finger-like projections called villi that massively increase the surface area available for absorbing nutrients and water. During prolonged fasting, these structures can physically shrink. In patients who had been fasting for extended periods, researchers found that the median length of intestinal villi was significantly shorter compared to controls, with some patients showing outright mucosal atrophy. Microscopic examination revealed disrupted microvilli on the surface of the cells, the appearance of autophagy-related structures inside cells, and widened spaces between cells with detachment from the underlying membrane.9PubMed Central. Prolonged Fasting Induces Histological and Ultrastructural Changes in the Intestinal Mucosa That May Reduce Absorption and Revert after Enteral Refeeding

Those widened spaces between cells are particularly relevant to diarrhea. They represent a leakier barrier, meaning that fluid can pass more freely across the intestinal wall in both directions. A compromised barrier absorbs water less effectively, and the unabsorbed fluid ends up in the colon. The good news from the same research is that these changes appear to reverse with refeeding, so the damage is not permanent for most people.

During fasting, the intestinal ecosystem also shifts toward bacteria that consume host-derived substrates like mucus, rather than bacteria that feed on dietary fiber. This makes biological sense since there’s no incoming fiber, but the practical effect is that the mucus layer protecting the gut wall gets thinner, potentially compounding the barrier problem.10ScienceDirect / Trends in Microbiology. Remodelling of the intestinal ecosystem during caloric restriction and fasting

If You’ve Had Your Gallbladder Removed

People who have had a cholecystectomy face a specific version of this problem. Without a gallbladder to store and concentrate bile between meals, bile acids drip continuously into the small intestine regardless of whether food is present. When you eat, the food at least partially absorbs and processes those bile acids. When you fast, there’s nothing to intercept them, and they flow more or less directly into the colon.

Excessive bile acids in the colon stimulate the mucosal lining to secrete water and electrolytes, which in severe cases causes diarrhea.11PubMed Central. Diagnosis and treatment of post-cholecystectomy diarrhoea If you no longer have a gallbladder and you find that fasting reliably gives you diarrhea, bile acid malabsorption is the most likely explanation. Your doctor can test for this specifically, and bile acid sequestrants are an effective treatment for many people.

Fasting With IBS

If you have irritable bowel syndrome, fasting can cut both ways. Up to half of IBS patients report that their symptoms worsen after eating, which is why some are drawn to fasting as a potential relief strategy.12PubMed Central. Irritable bowel syndrome: the role of food in pathogenesis and management And for some, skipping meals genuinely does calm things down temporarily.

But IBS involves visceral hypersensitivity, altered gut motility, low-grade inflammation, and disrupted communication between the gut and the brain. Several of the fasting-related mechanisms discussed above, particularly the MMC contractions and bile acid shifts, can aggravate these underlying issues. A gut that’s already oversensitive to normal contractions may react even more strongly to the vigorous sweeping phase of the MMC. And an already-leaky intestinal barrier could become leakier during a fast, triggering an inflammatory cascade.

There’s no simple rule here. Some IBS patients feel better fasting; others feel worse. If you have IBS and you’re experimenting with fasting, pay close attention to which subtype you have. People with diarrhea-predominant IBS may find fasting makes things worse, while those with constipation-predominant IBS might tolerate it better, though the evidence is largely anecdotal rather than trial-based.

The Fluid and Salt Shift

Fasting produces a well-documented surge in urine output and sodium excretion, a phenomenon that has puzzled researchers for decades. This fasting-associated diuresis and natriuresis is most pronounced in people who are obese or hypertensive, and the mechanisms driving it remain somewhat speculative, as the usual hormonal pathways that regulate sodium and water balance appear to be initially suppressed rather than activated.13PubMed Central. Fasting-Induced Natriuresis and SGLT: A New Hypothesis for an Old Enigma

While this primarily affects the kidneys rather than the gut, it contributes to the overall picture. Rapid fluid shifts during fasting can alter the balance of water in the intestines. If your body is aggressively excreting sodium and water through the kidneys, the intestinal absorption of water may also be affected, and the combined effect can make stools looser. People who fast without adequate hydration sometimes experience alternating episodes of dehydration and loose stools, which seems contradictory but reflects the complex way the body redistributes fluid when food intake stops.

The Strange History of “Hunger Diarrhea”

Diarrhea during starvation has been documented for centuries, particularly in wartime and famine settings. Historical reports from concentration camps and conflict zones consistently described a noncontagious form of diarrhea among starving populations. But here’s where it gets interesting: in settings where starved individuals are isolated from others, such as prisoners on hunger strikes or people with anorexia nervosa, diarrhea is generally not a feature.14PubMed Central. Starvation and Its Effects on the Gut

This distinction suggests that the “hunger diarrhea” seen in camps and conflict settings had a significant infectious or environmental component layered on top of the starvation itself, likely contaminated water, crowded conditions, and suppressed immune function combining to produce diarrhea that looked like a starvation symptom but was really a sanitation one. For modern voluntary fasters in clean environments, outright starvation-level diarrhea is rare. What most people experience is milder: loose stools, increased frequency, or urgency driven by the bile acid, motility, and microbiome mechanisms rather than by true malnutrition or infection.

How Your Pancreas Responds

The pancreas doesn’t just sit idle when food stops arriving. During fasting, the pancreas undergoes measurable decreases in its protein content, enzyme levels, and water content. Its overall capacity for producing digestive enzymes drops off progressively the longer the fast continues.15ScienceDirect / Gastroenterology. Effects of Fasting and Feeding on the Pancreas

This matters primarily when the fast ends. If you’ve been fasting long enough for your pancreas to downregulate its enzyme production, and then you eat a large or fatty meal, your body may not produce enough lipase and other enzymes to properly digest that food. Undigested fat reaching the colon is a reliable trigger for diarrhea. This is why many fasting protocols recommend breaking a fast with small, easily digested meals rather than jumping straight into a heavy dinner. The pancreas recovers with refeeding, but there’s a window where its diminished capacity can produce the same symptoms you were dealing with during the fast itself.

Practical Steps to Reduce Fasting-Related Diarrhea

Since multiple mechanisms can operate simultaneously, there’s no single fix, but several adjustments tend to help:

  • Cut back on coffee: If you’re drinking black coffee on an empty stomach, try reducing the amount or switching to tea. Coffee’s pro-motility and bile-stimulating effects are stronger without food to buffer them.
  • Check your supplements: Magnesium, especially magnesium citrate and oxide, is a common hidden cause. Switch to a better-absorbed form like magnesium glycinate, or take it with your eating window instead.
  • Read electrolyte labels: Sugar alcohols in electrolyte mixes or flavored waters draw water into the intestines. Look for products without sorbitol, mannitol, or maltitol.
  • Ease into longer fasts: Your gut bacteria and intestinal lining need time to adjust. If you’re new to fasting, starting with shorter fasting windows and gradually extending them gives your system time to adapt rather than shocking it.
  • Break fasts gently: A small, low-fat meal gives your pancreas and bile system time to ramp back up before you challenge them with a full dinner.
  • Talk to your doctor if it persists: Chronic diarrhea during fasting, especially if you’ve had your gallbladder removed or have a history of IBS, warrants a conversation about bile acid malabsorption testing or other workup.

When Fasting-Related Diarrhea Signals Something Else

Occasional loose stools during a fast, particularly in the first day or two, are common enough to be considered a normal adjustment response. But certain patterns should prompt you to stop fasting and get evaluated. Bloody stool is never a fasting side effect and always warrants medical attention. Severe, watery diarrhea lasting more than a day can cause dangerous dehydration, especially if you’re also losing fluid through the fasting-related diuresis described above. Diarrhea accompanied by fever suggests an infection, not a fasting adaptation. And if you consistently develop diarrhea every time you fast, even short fasts of 16 to 18 hours, that pattern may point to an underlying condition like bile acid malabsorption, celiac disease, or microscopic colitis that’s being unmasked rather than caused by the fast.

Fasting is increasingly popular, and the gut symptoms it can produce are real and physiologically explainable. But because fasting removes food from the diagnostic picture, it can also serve as a kind of unintentional stress test for your digestive system, revealing vulnerabilities you might not notice when meals are spacing out and buffering your gut’s baseline activity throughout the day.