Finding the right foods for managing IBS, especially when you’re having a sick day, can feel a lot like solving a mystery — piecing together clues and uncovering culprits. As you learn ways to ease symptoms like diarrhea and constipation, you’re likely to get overwhelmed by the long list of foods you shouldn’t eat. You want to know what you can eat when IBS symptoms strike so you can stay well nourished. Some say that a low-FODMAP diet can help improve IBS symptoms. For example, a review published in the journal Gastroenterology & Hepatology in 2017 found that 50 to 86 percent of people with IBS showed improvement in their symptoms on a low-FODMAP diet. The diet involves eliminating foods that are high in certain carbohydrates called FODMAPs, or fermentable oligosaccharides, disaccharides, monosaccharides, and polyols. But the diet doesn’t offer specific advice for diarrhea or constipation, said Baharak Moshiree, MD, a physician specializing in gastroenterology at Atrium Health in Charlotte, North Carolina. Tweaking your diet according to your specific sick day symptoms will help even more. Here’s how to get started.

Which Foods Trigger IBS?

Some diet changes will help regardless of which category you fall into. Start by eating small meals and make them low in fat. It’s better to grill foods using a light cooking spray than to douse your meal in oil, Dr. Moshiree advises. Red meat can also irritate the stomach, so it’s best to go for poultry or fish. Also, a high-protein diet will help with both diarrhea and constipation, so that piece of fish or chicken is better than a bowl of pasta. Raw vegetables are more likely to cause gas and bloating, so consider cooking them, Moshiree said. It’s important to know your own body and how it will react to different foods. Most people with IBS have a very hard time with dairy products, so eliminate those right off the bat. You may also be sensitive to gluten, found in bread and baked goods made with wheat, rye, and barley. Research has suggested that for some people, IBS and gluten sensitivity may overlap. A review published in November 2017 in the journal Nutrients concluded that a gluten-free diet can benefit both patients with gluten-related symptoms, as well as those with IBS who could have a gluten or wheat sensitivity. Moshiree tells her patients to do a two-week trial of eliminating gluten to see if symptoms improve. If they do, you probably need to follow a gluten-free diet, especially when your symptoms are acting up. The same can be done for other food categories that are associated with IBS symptoms, such as foods with high fructose corn syrup, artificial sweeteners, and garlic and onions along with dairy. Once you know your trigger foods, you’ll know what you need to avoid when IBS is acting up. Because gas and bloating is also an issue when you have constipation or diarrhea, pass on beans and other legumes and foods that contain insoluble fiber such as apples, grapes, and blueberries when you’re having symptoms. Also remember to eliminate alcohol, which is known to provoke symptoms.

How Do You Soothe IBS With Diarrhea?

When people are sick, they tend to turn to high-carbohydrate foods with sugars to feel better, but that’s not what you want to do when you have IBS, said Melissa Garrett, MD, a gastroenterologist at Parkview Health in Fort Wayne, Indiana. That’s because many problems with IBS are from intolerance to some carbohydrates in foods. Instead, try these meals when you’re having IBS-related diarrhea. Breakfast A bowl of oatmeal with cinnamon without sugar or artificial sweetener Lunch Grilled or baked fish or chicken and a baked sweet potato without butter Dinner A spinach salad with lean protein such as grilled chicken (made without oil) Snack Protein shake or protein bar. Be sure to read the label and avoid products with high fructose corn syrup or artificial sweeteners, because those ingredients alone can cause significant diarrhea. Drinks Moshiree tells her patients to hydrate with water or an electrolyte replacement drink like Hydralyte or Pedialyte when they have diarrhea.

IBS and Constipation: What to Eat

Figuring out what to eat when you’re constipated can be trickier, according to Dr. Garrett. Adding in some fruits and vegetables that are typically banned on a low-FODMAP diet can help move your bowels, but they can also increase bloating. The key is to avoid gas-forming insoluble fiber. Choose stone fruits such as prunes and peaches over bananas and apples, she said. Breakfast Fresh peaches and prunes with peppermint tea or something with natural peppermint oil, which is a laxative, Dr. Garrett said. Lunch A fruit and vegetable salad with some lean protein such as fish and a little oil. If you don’t make it a heavy meal, it should help to relieve constipation, she said. Dinner Another light meal with a fruit, cooked vegetables or a salad with a little oil and vinegar, and lean protein such as fish or chicken. Drinks Water, tea, or coffee, which may act as a laxative.

When Will IBS Symptoms Go Away?

How long symptoms last varies from person to person. As you work on your diet, remember to also work on lowering stress. Even when you’re eating perfectly, high stress may make your symptoms stick around, Moshiree said. When you do start to feel better, Moshiree warns against rushing back to eating foods that you know make your symptoms worse; sample only in small amounts. That’s an individual thing you have to determine on your own. If you eat a healthy diet and learn what to avoid when symptoms strike, you should be better able to manage your IBS. Additional reporting by Ashley Welch