What Causes Stomach Gas: Common and Medical Triggers

Stomach gas comes from two basic sources: air you swallow and gas produced by bacteria breaking down food in your intestines. Most people pass gas anywhere from a few times a day to once every hour or two, and the vast majority of it is completely odorless. Five gases (nitrogen, oxygen, carbon dioxide, hydrogen, and methane) account for 99% of what your body produces. The tiny remaining fraction contains sulfur compounds responsible for the smell.

Swallowed Air

Every time you chew, breathe, or talk, a small amount of air enters your stomach. Most of it gets quietly absorbed or released through burping before it ever reaches your intestines. But certain habits increase air intake well beyond normal levels, a pattern sometimes called aerophagia.

Common culprits include eating too fast, talking while eating, chewing gum, sucking on hard candy, drinking through a straw, and drinking carbonated beverages. Smoking also introduces extra air with each inhale. These are the simplest causes of gas to fix, since they’re purely behavioral.

A few medical situations can make things worse. Loose-fitting dentures cause your mouth to produce more saliva, which means more frequent swallowing and more air entering the stomach. People who use a CPAP machine for sleep apnea sometimes swallow excess air delivered by the device overnight, waking up bloated. Stress and anxiety can also trigger a pattern of repeated, unconscious gulping that sends air straight to the gut.

Bacterial Fermentation in the Large Intestine

The bigger source of gas for most people is what happens when food reaches your large intestine. Your small intestine handles most digestion and absorption, but certain carbohydrates slip through without being fully broken down. When they arrive in the colon, trillions of bacteria go to work fermenting them. The byproducts of that fermentation are hydrogen, carbon dioxide, and methane, which together make up more than 99% of bacterially produced gas. Less than 1% consists of sulfur-containing gases that create the odor.

This process is completely normal and happens in everyone. The amount of gas produced depends on what you eat, how efficiently your small intestine absorbs nutrients, and the specific mix of bacteria living in your colon.

Foods That Produce the Most Gas

Certain short-chain carbohydrates are especially prone to fermentation because the human small intestine absorbs them poorly. Researchers group these under the acronym FODMAPs (fermentable oligosaccharides, disaccharides, monosaccharides, and polyols). In controlled studies, people eating a diet high in FODMAPs produced roughly four times more hydrogen gas over the course of a day compared to a low-FODMAP diet.

Practically speaking, the most gas-producing foods include:

  • Beans and lentils, which contain complex sugars your body lacks the enzymes to break down in the small intestine
  • Cruciferous vegetables like broccoli, cabbage, cauliflower, and Brussels sprouts
  • Onions and garlic, rich in fructans that ferment readily
  • Whole grains, particularly wheat and rye
  • Certain fruits such as apples, pears, and stone fruits, which contain high levels of fructose or sorbitol

These foods are nutritious, and the gas they produce is a sign of a healthy, active gut microbiome. The goal isn’t to eliminate them entirely but to identify which ones cause you the most discomfort and adjust portions accordingly.

Sugar Alcohols and Artificial Sweeteners

Sugar alcohols like sorbitol, xylitol, and mannitol are common in sugar-free gum, candy, protein bars, and even liquid medications like cough syrup. Your small intestine absorbs them very slowly compared to regular sugar. The unabsorbed portion travels to the colon, where bacteria ferment it into gas. At higher doses, these substances also pull water into the intestinal tract through osmotic pressure, which can add bloating and loose stools on top of the gas.

The effect is dose-dependent. A single piece of sugar-free gum rarely causes problems, but chewing through half a pack or drinking a sugar-free beverage sweetened with sorbitol can produce noticeable bloating. Erythritol is an exception among sugar alcohols because it’s absorbed more efficiently in the small intestine and tends to cause fewer symptoms.

Lactose Intolerance

Around two-thirds of the world’s adult population produces less lactase, the enzyme that breaks down the sugar in milk. Without enough lactase, lactose passes through the small intestine intact and reaches the colon, where bacteria ferment it into hydrogen, methane, and carbon dioxide. The undigested lactose also draws extra water into the intestines, which is why dairy-related gas often comes alongside cramping and diarrhea.

The severity varies widely. Some people can handle a glass of milk with no issue, while others react to the small amount of lactose in a slice of cheese. Hard and aged cheeses, as well as yogurt with live cultures, tend to be better tolerated because much of the lactose has already been broken down during production.

Small Intestinal Bacterial Overgrowth

Normally, most of your gut bacteria live in the large intestine. When bacteria colonize the small intestine in abnormally high numbers, they begin fermenting food before it’s had a chance to be properly absorbed. This condition, known as SIBO, produces excess hydrogen or methane (or both) and causes persistent bloating, gas, and abdominal discomfort that doesn’t respond to simple dietary changes.

SIBO is diagnosed with a breath test that measures hydrogen and methane levels after drinking a sugar solution. A hydrogen rise of 20 parts per million or more within 90 minutes, or a methane level of 10 parts per million or more at any point during the test, is considered positive. Conditions that slow gut motility, such as diabetes, prior abdominal surgery, or long-term use of acid-suppressing medications, can raise the risk. Proton pump inhibitors, commonly taken for acid reflux, have been linked to bacterial overgrowth by reducing the stomach acid that normally keeps bacterial populations in check.

Other Medical Causes

Several digestive conditions produce excess gas as a core symptom. Irritable bowel syndrome (IBS) amplifies the body’s response to normal amounts of gas. In studies comparing people with IBS to healthy volunteers on identical diets, those with IBS reported significantly more bloating, pain, and lethargy, even though the volume of gas produced was only moderately higher. The issue appears to be heightened sensitivity of the gut nerves, not just overproduction.

Celiac disease damages the lining of the small intestine, impairing absorption and leaving more carbohydrates for bacterial fermentation. Chronic conditions like gastroparesis, where the stomach empties too slowly, can also trap gas and create persistent bloating. Pancreatic insufficiency, in which the pancreas doesn’t produce enough digestive enzymes, leads to poor fat and carbohydrate absorption with similar downstream effects.

Why Some People Produce More Gas

The composition of your gut microbiome plays a major role. About one in three people harbors significant populations of methane-producing bacteria, while others produce almost none. Hydrogen levels after eating the same meal can vary dramatically from person to person. In breath-test studies, individual hydrogen readings ranged from near zero to 86% of total gas output, highlighting just how different gut ecosystems are.

Speed of digestion matters too. When food moves slowly through the colon, bacteria have more time to ferment it, producing more gas. Constipation, reduced physical activity, and certain medications can all slow transit time. Conversely, people with faster gut motility may produce less gas overall but pass it more frequently.

Hormonal shifts also play a role. Many women notice increased bloating and gas in the days leading up to menstruation, when rising progesterone slows intestinal motility. Pregnancy produces a similar effect, with elevated progesterone and physical compression from the growing uterus both contributing to gas retention.