Can a healthy diet and constipation go together? Have you started a new diet recently that just won’t let you “go”? Learn why your latest healthy lifestyle change may be causing you constipation.

You resolved to clean up your eating act, and started to adopt a healthier diet. Maybe you broke up with sugar and gave up red meat. Maybe you started eating more salads. Maybe you adopted a full-on keto diet or similar strict, low-carb eating plan.

Or perhaps you eliminated grains, legumes, dairy and sugar as part of a Whole30 type regimen. Or conversely, you even embraced a full-fledged whole foods, plant-based – or minimally-processed vegan – diet. But as the saying goes, “No good deed goes unpunished.”

Whatever the nature of your big, seemingly healthy eating change, there’s been another unexpected change that accompanied it: You’re suddenly constipated, and you simply cannot figure out why. Here’s how a healthy diet and constipation can happen.

While it may seem counterintuitive, it’s not at all uncommon for people to experience a downgrade in their digestive regularity alongside an upgrade in their diet quality. Here are three of the most common reasons why people become constipated – and how to fix them, including what foods help with constipation.

How a Healthy Diet and Constipation Can Occur

There are three reasons that a healthy diet can cause constipation.

1. Your new diet lacks soluble fiber.

Many popular diet regimens – like gluten-free, paleo, keto, Whole30 and low-carb plans – significantly cut grains. And some involve a reduction in root vegetable and fruit intake as well. These foods, which are rich in a type of fiber called soluble fiber, are often replaced by lower-carb alternatives like leafy greens, berries and nuts, which are rich in a type of fiber called insoluble fiber. These foods with insoluble fiber are some examples of foods to avoid when constipated.

While this may seem like an even trade, in fact, the two types of fiber behave very differently in your digestive tract. Soluble fiber can hold onto water, serving to plump up your poops and help keep them bulky and soft, no matter how long their journey to the exit may last.

The insoluble fiber that predominates in “roughage,” veggie skins and seeds, on the other hand, can’t really hold onto water as it passes through the digestive tract. Therefore, if you’re someone whose bowels trend toward the slower side, there’s a fair chance that your insoluble fiber-predominant diet includes foods that cause constipation and can produce poops prone to being hard and dried out by the time they reach the end of their digestive journey.

Some of the best foods for constipation caused by a lack of insoluble fiber include:

• Zucchini.
• Carrots.
• Winter squash.
• Pumpkin.
• Chia seeds.
• Avocado.
• Cantaloupe

If these aren’t an option, then magnesium supplements in doses of 400 to 500 milligrams taken at night will help draw extra water into your bowel and speed your stool along to help promote softer, more expeditious evacuations. This is particularly helpful for people experiencing tiny, hard balls of stool.

If your stools are large but just too hard to pass comfortably, an over-the-counter stool softener like docusate sodium (Colace) may help them hold on to moisture better. Another potentially helpful option is a bulking fiber supplement, like psyllium husk or calcium polycarbophil (Fibercon).

2. Your new diet is too low in fat.

When people make dietary changes like giving up dairy, switching from eggs to egg whites or adopting a more plant-based diet, it often results in a whole lot less fat. What you may not know, however, is that fat plays a role in stimulating motility – or forward motion – in the colon, which in turn promotes more regular bowel movements. So, those fat-free foods that your new diet is promoting might mean you’re eating less of the fattier foods that make you poop.

A nerve signal called the gastrocolic reflex is one way that our upstream digestive organs (the stomach and small intestine) communicate with the downstream digestive organs (namely, the colon) to let them know what is on its way so they can prepare.

Very large meals and meals that contain a decent amount of fat both stimulate this communication reflex, essentially informing the colon that a significant amount of food has just entered the system. In response to the gastrocolic reflex, the colon ramps up its motility to make some room for what’s headed its way. The gastrocolic reflex is one reason why very high-fat meals can cause an urgent need to poop – and even diarrhea – soon after a meal in some people.

When your healthy diet pattern happens to also be a low-fat diet pattern, then you may sometimes find that your meals don’t provoke as robust of a digestive system response as they used to. If you’re not sure what to eat when constipated, try including healthy fats with your meals more often: avocados, nut butters, pumpkin or sunflower seeds, tahini, hummus, an extra drizzle of olive oil or fatty fish like salmon are all good choices. Some people find that fish oil or flaxseed oil supplements can provide a modest benefit as well.

3. Your new diet ditches natural sugars.

Some of the more restrictive diet regimens in circulation these days take a pretty hardline approach to foods that have more than a minimal amount of naturally-occurring sugar, like milk or yogurt; sweeter fruits like bananas, grapes, mango or watermelon; dried fruit like raisins, dates and apricots; and even certain root veggies like carrots and beets.

However, many of the natural sugars contained in such foods – the lactose in dairy foods, the fructose in fruit, the sorbitol in dried fruits – can exert a mild laxative effect in our colons by attracting water into the bowel. So if you’d been eating foods on this list regularly, you may not have realized to what extent they were contributing to your previously smooth digestive function in the form of softer stools.

I don’t advocate for restricting any whole fruits, vegetables or unsweetened dairy products on the basis of their natural sugar content; I’ve never seen someone gain excess weight or develop Type 2 diabetes because they ate too many carrots or bananas.

But if you prefer to avoid such foods, you might benefit from finding another way to attract some extra moisture into your plumbing. Magnesium in doses of 400 to 800 milligrams taken at night often does the trick in a natural way, though may not be suitable for people with impaired kidney function.

Click here to read more about a healthy diet and constipation.