What Foods Give You Gas and How to Reduce It

Beans, cruciferous vegetables, dairy products, and certain fruits are among the most common gas-producing foods. They all share a basic trait: they contain sugars, fibers, or starches that your small intestine can’t fully break down. When these undigested compounds reach your large intestine, bacteria ferment them and produce hydrogen, carbon dioxide, and methane as byproducts.

Most people pass gas 13 to 21 times a day. That’s normal. But certain foods can push you well beyond that range, and knowing which ones are responsible can help you manage the discomfort.

Beans and Lentils

Beans are the most well-known gas producers, and for good reason. They’re loaded with a family of complex sugars called raffinose oligosaccharides, which include raffinose, stachyose, and verbascose. Humans lack the enzyme needed to break these sugars apart in the small intestine, so they pass intact into the colon, where bacteria feast on them and release gas.

The good news is that preparation matters. Soaking dried beans in cold water for two days reduces these gas-causing sugars by about 35%. Canned beans, which have been pre-soaked and cooked, tend to cause less trouble than freshly cooked dried beans. And your body adjusts: research looking at people who added beans to their daily diet found that gas production returned to normal levels within three to four weeks as their gut bacteria adapted.

Cruciferous Vegetables

Broccoli, Brussels sprouts, cabbage, cauliflower, and asparagus contain the same raffinose sugars found in beans, plus a generous amount of fiber. That combination makes them particularly gassy for many people. Cooking these vegetables softens the fiber and breaks down some of the complex sugars, which is why raw broccoli tends to cause more bloating than steamed broccoli.

Onions, Garlic, and Other Sulfur-Rich Foods

If your gas is not just frequent but especially foul-smelling, sulfur-containing foods are the likely culprit. Garlic, yellow onions, red onions, scallions, shallots, and leeks all belong to the same plant family and are rich in sulfur compounds. When gut bacteria break these compounds down, they produce hydrogen sulfide, the gas responsible for that rotten-egg smell.

Garlic and yellow onion rank among the highest in hydrogen sulfide-releasing capacity. Cooking reduces the intensity somewhat, but these foods will still contribute to odorous gas even when well-cooked.

Dairy Products

Milk, ice cream, soft cheeses, and other lactose-containing dairy products cause gas in people who don’t produce enough of the enzyme that breaks down lactose. That’s a much larger group than most people realize. Global estimates suggest roughly 68% of adults have some degree of lactose malabsorption, with rates lowest in northern Europe (around 28%) and highest in East Asia, Africa, and the Middle East.

When lactose isn’t absorbed in the small intestine, it travels to the colon and acts as fuel for bacteria, producing gas and sometimes diarrhea. If dairy consistently gives you trouble, hard aged cheeses and yogurt are often better tolerated because fermentation and aging reduce their lactose content significantly.

Fruits High in Fructose or Sorbitol

Apples, pears, cherries, peaches, and prunes are common gas triggers because they contain fructose and sorbitol, two sugars that many people absorb poorly. Most people with fructose sensitivity can handle about 10 to 15 grams per day without symptoms. A single large apple contains roughly 10 to 13 grams of fructose, so even one serving can push you past the threshold.

Sorbitol, a sugar alcohol found naturally in stone fruits (peaches, plums, cherries) and used as a sweetener in sugar-free gum, candy, and protein bars, follows the same pattern. It resists digestion in the small intestine and ferments in the colon. If you chew a lot of sugar-free gum and notice bloating, sorbitol is almost certainly the reason.

Whole Grains and Resistant Starches

Whole wheat, oats, and other whole grains contain both fiber and resistant starch, a type of starch that bypasses normal digestion. Foods high in resistant starch include uncooked rolled oats (about 4.4 grams per quarter cup), underripe bananas (about 4.7 grams per banana), and cooked lentils (about 3.4 grams per half cup).

There’s an important nuance here, though. Resistant starch ferments slowly in the colon, unlike the raffinose sugars in beans, which ferment rapidly. That slow fermentation means the gas is released gradually rather than all at once, so resistant starch is less likely to cause the sharp bloating and cramping you might get from a big bowl of chili. It’s still a source of gas, but it tends to be more manageable.

An interesting quirk: cooking and then cooling starchy foods like potatoes, rice, and pasta increases their resistant starch content. A reheated bowl of rice produces slightly more gas than freshly cooked rice for this reason.

Carbonated Drinks

This one is straightforward. Carbonated water, soda, and sparkling drinks introduce carbon dioxide directly into your digestive tract. Some of it comes back up as burps, but the rest travels through and contributes to gas lower down. Beer is a double hit because it’s both carbonated and fermented, which can feed gut bacteria further.

How to Reduce Gas From These Foods

You don’t necessarily need to eliminate these foods. Many of them, especially beans, cruciferous vegetables, and whole grains, are among the healthiest things you can eat. A few strategies make them easier to tolerate.

  • Increase fiber gradually. Adding high-fiber foods slowly over two to three weeks gives your gut bacteria time to adjust. Studies consistently show that gas production normalizes within three to four weeks of a dietary change.
  • Soak dried beans. A long soak of 12 to 48 hours in cold water, with at least one water change, reduces the oligosaccharide content that drives fermentation.
  • Cook vegetables thoroughly. Steaming, roasting, or sautéing breaks down some of the complex sugars and fiber that cause gas. Raw versions of broccoli, cabbage, and onions are harder on the gut.
  • Watch portion sizes. Gas production is dose-dependent. A small serving of a trigger food might cause no symptoms at all, while a large serving overwhelms your digestive capacity.
  • Combine foods strategically. Eating a gas-producing food as part of a larger meal slows digestion and gives your small intestine more time to absorb sugars before they reach the colon.

Everyone’s gut bacteria are different, which is why a food that devastates one person barely affects another. Paying attention to your own patterns matters more than following a universal list. If you notice that gas is persistent, painful, or accompanied by changes in your bowel habits, that points to something beyond normal food fermentation and is worth investigating further.