People pass gas because the digestive system constantly produces it as a normal byproduct of breaking down food. The average person passes gas between 14 and 23 times a day, often without noticing. Two main sources feed this supply: air you swallow while eating and drinking, and gases produced by bacteria in your large intestine as they ferment food your body couldn’t fully digest on its own.
The Two Sources of Intestinal Gas
Every time you eat, drink, or swallow saliva, a small amount of air travels down into your digestive tract. Certain habits pull in more air than usual: eating too fast, talking while eating, chewing gum, sucking on hard candy, drinking through a straw, smoking, and drinking carbonated beverages. Some of this swallowed air gets burped back up, but the rest continues through the digestive system and eventually exits as gas.
The second, larger source is bacterial fermentation in your colon. Your small intestine absorbs most nutrients from food, but certain carbohydrates resist digestion entirely. When these undigested carbohydrates reach the large intestine, trillions of resident bacteria break them down and release gases in the process. This is completely normal and actually a sign that your gut bacteria are doing their job.
What Gas Is Actually Made Of
Five odorless gases make up more than 99% of flatulence: nitrogen, oxygen, carbon dioxide, hydrogen, and methane. The proportions vary enormously from person to person. Nitrogen can range from 11% to 92% of total gas volume, hydrogen from 0% to 86%, and methane from 0% to 54%. These wide ranges reflect differences in diet, gut bacteria composition, and how much air someone swallows.
The smell comes from a completely separate set of compounds that make up less than 1% of the gas. Hydrogen sulfide produces the classic rotten-egg smell. Methanethiol smells more like rotting vegetables or garlic. Dimethyl sulfide has a cabbage-like quality. A tiny amount of these sulfur compounds goes a long way.
Foods That Produce the Most Gas
The foods most likely to cause gas are those rich in carbohydrates your small intestine can’t break down. These include beans and lentils, many vegetables, fruits, grains, and for some people, dairy products. The specific carbohydrates responsible include a group called raffinose family oligosaccharides (found in beans), fructans (found in wheat, onions, and garlic), and polyols (found in certain fruits and sugar-free sweeteners). Lactose, the sugar in milk, also falls into this category for people who don’t produce enough of the enzyme that breaks it down.
Fiber-rich foods are a well-known trigger, especially when you increase your intake quickly. Your gut bacteria need time to adjust to a new supply of fermentable material. Adding fiber gradually over a few weeks gives them that adjustment period and typically reduces the bloating and cramping that come with a sudden change.
Foods high in sulfur are specifically responsible for foul-smelling gas. Meat, poultry, eggs, onions, garlic, broccoli, cabbage, Brussels sprouts, and cauliflower all contain sulfur compounds. The more sulfur-rich food you eat, the more pungent the result.
How Your Body Knows to Release Gas
Your body has a surprisingly sophisticated system for telling the difference between gas, liquid, and solid matter in the lower digestive tract. The inner anal sphincter periodically relaxes through a reflex that allows a small sample of rectal contents to contact the upper anal canal. The lining there is packed with nerve receptors sensitive to touch, temperature, and pressure. These receptors identify what’s present and send that information to the brain, which decides whether it’s safe to release gas while maintaining control over everything else. This is why you can usually pass gas without any unwanted surprises.
When Excess Gas Signals Something Else
Passing gas more than 23 times a day, or experiencing it alongside persistent bloating, cramping, or changes in bowel habits, can point to an underlying issue. Lactose intolerance is one of the most common culprits. When your body doesn’t produce enough of the enzyme needed to digest milk sugar, lactose passes intact into the colon, where bacteria ferment it rapidly and produce a surge of gas.
A condition called small intestinal bacterial overgrowth, or SIBO, can also cause excessive gas. Normally, most of your gut bacteria live in the large intestine. In SIBO, unusually large populations of bacteria colonize the small intestine, where they start fermenting carbohydrates before your body has a chance to absorb them. This produces gas higher up in the digestive tract, often causing bloating and discomfort that feels different from typical lower-intestinal gas. A breath test that measures hydrogen and methane levels can help identify whether bacterial overgrowth is contributing to the problem.
Everyday Habits That Increase Gas
Beyond food choices, several common behaviors add extra air to your digestive system. Eating quickly is one of the biggest contributors, because you swallow more air with each hurried bite. Talking during meals has the same effect. Chewing gum and sucking on hard candy keep you swallowing repeatedly, each time pulling in a small pocket of air. Drinking through a straw forces you to suck air along with your beverage, and carbonated drinks deliver carbon dioxide directly into the stomach.
Slowing down at meals, skipping the straw, and cutting back on carbonated drinks are simple changes that can meaningfully reduce the swallowed-air component of gas. For the fermentation side, keeping a food diary for a week or two can help you spot which specific foods are your biggest triggers, since gut bacteria vary so much between individuals that no single food list applies to everyone equally.

