Where Does Gas Come From in the Human Body?

Most gas in your digestive system comes from just two sources: air you swallow and gases produced by bacteria in your large intestine as they break down food. Your gut holds less than 200 mL of gas at any given moment, but you expel an average of 600 to 700 mL per day, and passing gas 14 to 23 times daily is completely normal.

Swallowed Air

Every time you eat, drink, or swallow saliva, a small amount of air travels down into your stomach and intestines. Most of this air is nitrogen and oxygen, the same gases that make up the atmosphere. A portion gets absorbed into your bloodstream or released through burping, but some continues through your digestive tract and exits as gas.

Certain habits increase the amount of air you swallow. Eating too fast, talking while eating, chewing gum, sucking on hard candy, drinking through a straw, smoking, and drinking carbonated beverages all push extra air into your stomach. Carbonated drinks add carbon dioxide on top of the air you’re already swallowing, which is why a can of soda can leave you feeling bloated within minutes.

Bacterial Fermentation in the Colon

The bigger source of gas, especially the gas you pass as flatulence, is your gut bacteria. Your small intestine can’t fully digest certain carbohydrates, so they arrive in the colon still intact. Trillions of bacteria there ferment these leftovers, and the byproducts of that fermentation are gases: primarily hydrogen, carbon dioxide, and methane.

More than 99% of the gas your gut bacteria produce is made up of these three odorless gases. The process is essentially the same as what happens when yeast ferments sugar to make bread rise or beer carbonate. Your colon is its own fermentation chamber, and the volume of gas it produces depends heavily on what you eat.

What Intestinal Gas Is Made Of

The average composition of flatus breaks down roughly like this:

  • Nitrogen: about 65%, mostly from swallowed air and diffusion from your bloodstream
  • Methane: about 14%, produced by a specific type of microbe in the gut
  • Carbon dioxide: about 10%, from bacterial fermentation and chemical reactions in the small intestine
  • Hydrogen: about 3%, from bacterial fermentation
  • Oxygen: about 2%, from swallowed air

None of these gases have any smell. The odor comes from sulfur-containing compounds that make up less than 1% of the total volume. The primary culprit is hydrogen sulfide, the same compound that gives rotten eggs their smell. Two other sulfur gases, methanethiol and dimethyl sulfide, contribute as well, but hydrogen sulfide concentration correlates most strongly with how bad things smell.

Why Some People Produce More Methane

Not everyone’s gas contains the same mix. Methane production depends on whether you harbor a specific microorganism called Methanobrevibacter smithii. Breath tests detect methane in roughly 40% of people, though DNA analysis of stool samples finds M. smithii in about 96% of individuals. The difference suggests most people carry the microbe, but only some have enough of it to produce detectable levels of methane.

This matters because methane-dominant gas behaves differently in the gut. Methane slows intestinal movement, which is why people who produce large amounts of it tend toward constipation and bloating rather than the looser stools associated with hydrogen-dominant gas production.

Foods That Produce the Most Gas

The foods that cause gas are the ones richest in carbohydrates your small intestine can’t break down. These pass to your colon undigested, where bacteria feast on them and release gas. The main categories:

Beans and lentils are the classic offenders because they contain a sugar called raffinose that humans lack the enzyme to digest. Cruciferous vegetables like broccoli, cabbage, and Brussels sprouts contain the same type of sugar. Onions, garlic, and artichokes are high in fructans, another carbohydrate that reaches the colon intact. Fruits like apples, pears, and stone fruits contain sugar alcohols (sorbitol, for example) that ferment readily. Dairy products cause gas in people who don’t produce enough lactase to break down lactose, which then ferments in the colon just like any other undigested sugar.

One study measured gas output after adding 200 grams of baked beans to a standard diet and found daily gas expulsion rose to 600 to 700 mL. The fiber and raffinose in beans are a near-perfect fuel source for gas-producing bacteria.

Gas From the Bloodstream

There’s a third, less obvious source. Gases constantly diffuse back and forth between your bloodstream and your intestinal lining, moving from areas of higher pressure to lower pressure. Most of the nitrogen in your intestines actually originates from your blood diffusing into the gut, not from swallowed air. Conversely, hydrogen produced by bacteria in the colon diffuses into your bloodstream, which is how breath tests can measure gas that was generated deep in your intestines.

When Gas Signals a Problem

Passing gas more than 23 times a day, or noticing a significant change from your baseline, can signal something worth investigating. One common cause is small intestinal bacterial overgrowth (SIBO), where bacteria that normally live in the colon colonize the small intestine. Because food spends more time in the small intestine, these misplaced bacteria get early access to undigested carbohydrates, producing gas higher up in the digestive tract. This leads to bloating, distension, and often diarrhea or constipation.

SIBO is typically identified through a breath test that measures hydrogen and methane levels after you drink a sugar solution. A rise of more than 20 parts per million in hydrogen within 90 minutes, or methane above 10 parts per million, suggests bacterial overgrowth. Food intolerances, particularly to lactose or fructose, can also cause excess gas and are diagnosed with similar breath tests.

Celiac disease, inflammatory bowel disease, and pancreatic insufficiency can all increase gas production by impairing digestion and leaving more unabsorbed nutrients for bacteria to ferment. If excessive gas comes with weight loss, chronic diarrhea, or persistent abdominal pain, those patterns point toward a condition that goes beyond diet.