Diarrhea, or watery, loose stool, is a symptom of an upset stomach. Most adults have some form of diarrhea every year. Most of the time, these episodes are caused by a bad bacteria or virus that your body is trying to get rid of in a hurry. But it’s also not unusual to have diarrhea that’s triggered by specific foods that you eat.

Foods that cause diarrhea tend to contain high amounts of artificial ingredients, oils, spices, or stimulants. Here are some of the common culprits.

Spicy seasoning is perhaps the most common source of food-induced diarrhea, especially if it’s a strong spice that you’re not used to. It irritates the stomach lining while it is digested. This causes gas, bloating, burning, and in many cases, diarrhea. Chili peppers and curry blends are common causes.

To add a bit of kick to your food, try mustard powder or ground paprika, which tend to be milder on the stomach.

Alternative sugars such as aspartame, saccharine, and sugar alcohols known as FODMAPs disrupt the biology of the lower intestinal tract. In fact, cutting out artificial sweetener is now a recommended treatment for irritable bowel syndrome. So it’s not surprising that eating food with artificial sweetener in it causes a lot of people to have diarrhea.

Instead of reaching for diet or fat-free versions of your favorite sweets, you’re probably better off eating a small portion of the food that contains regular sugar.

If you find that drinking milk or eating other dairy products has you running to the bathroom, you may be lactose intolerant. Lactose intolerance tends to run in families. It can develop later in life, and many people don’t know that they have it. Lactose intolerance means you don’t have the enzymes to break down the milk sugar, leaving it indigestible. So your body disposes of it pretty much immediately, often in the form of diarrhea.

These days, there are plenty of substitutes for cow’s milk. A lactose-free version of whole milk may treat you better. Milk substitutes made of cashews, almonds, flaxseeds, or coconuts are available everywhere. Try them until you find something you like.

The caffeine in coffee is a stimulant. It doesn’t just jump-start our brains, it also stimulates our digestive systems. Add that to the fact that many of us stir in other digestive triggers, such as dairy and artificial sweeteners, to our morning cup of joe, and coffee can be one of the most common diarrhea triggers for some people.

There’s no real substitute for the real thing when it comes to coffee, but try getting it half-caffeinated instead. If you take it sweetened, make sure to use a small amount of real sugar. And instead of cream of milk, use a dairy substitute, such as almond milk or coconut creamer.

Both garlic and onions are extremely high in insoluble fiber. They also contain juices that, when broken down by the acid in your stomach, can release gases that irritate the bowels. They’re also fructans, meaning they contain a carbohydrate complex that’s difficult to digest. All of this means these recipe favorites can turn into a recipe for upset stomach.

Shallots and leeks are gentler alternatives to the more caustic garlic and onions. But to avoid members of the allium family entirely while cooking, you’ll have to get creative. Experiment with celery or fennel. These can give your food the slightly bitter taste of onions or garlic.

Broccoli and cauliflower contain high amounts of nutrients, as well as bulk vegetable fiber. You might think that would be a good thing, but the digestive tract doesn’t react well to large amounts of fiber when it’s not used to eating them. Unless you regularly eat broccoli or cauliflower, a big serving might cause constipation, gas, or diarrhea.

Don’t avoid broccoli and cauliflower, but do be mindful of how much you eat at a time. Start with small portions if you’re trying to get more fiber in your diet with these foods.

Foods that are high in saturated fats, such as the ones found in fast food restaurants, aren’t easy for the body to break down and digest. There’s little nutritional value in them, so there’s not much for your body to extract. Instead, these foods just pass on through your body and exit quickly.

If you’re in the mood for fast food, avoid options that have been deep fried in oil, such as fried chicken and french fries. Be wary of ground beef or bacon that comes from the drive-through, too. They are also often prepared with saturated fats and oils.

Turkey burgers, grilled chicken, and vegetarian options can still satisfy your fast-food craving with fewer of the undesirable aftereffects.

When you have diarrhea, remember to drink water. Eight to ten glasses per day is the typical recommendation. When you have diarrhea, you may need to drink even more. This is because dehydration puts you at risk of complications from diarrhea. Drinking water is the key to flushing your system and feeling better sooner.

Resist the urge to starve yourself until the diarrhea passes. This will make you so hungry that once you feel better, you may overeat. A huge, calorie-dense meal could bring on another round of loose stools.

Instead, stick to a temporarily low-fiber diet. Potassium-rich bananas are gentle on the stomach lining and help you retain sodium you might otherwise lose through waste. A caffeine-free, herbal tea with ginger or peppermint might also calm your bowels.

If you need to take over-the-counter medication, plenty of choices are available. Loperamide (in Imodium) and bismuth subsalicylate (in Pepto-Bismol) are the most common active ingredients in drugs that help relieve diarrhea.

Shop for anti-diarrheal medications.

Read more: What you want to know about Pepto-Bismol »

If you have diarrhea that lasts for several days, you may have symptoms that weren’t caused by your diet. You should see a doctor if:

  • your diarrhea contains blood or pus
  • you have severe abdominal pain or cramping
  • you show symptoms of dehydration
  • you have diarrhea frequently or chronically

If you have frequent diarrhea, you may have irritable bowel syndrome and should seek medical guidance.

As a starting point for avoiding diarrhea, always make sure to cook your food completely. Avoid allergens that trigger your digestive tract.

There are plenty of causes of diarrhea, so it may be impossible to prevent yourself from having diarrhea ever again. But unlike diarrhea caused by a virus, bacteria, or parasite, diarrhea caused by something you’ve eaten tends to end as quickly as it began.