Gas in your digestive system comes from two main sources: air you swallow and gas produced inside your gut by chemical reactions and bacteria. On any given day, your body generates and moves between 476 and 1,491 milliliters of gas through your intestines, with a typical amount around 705 ml. Most of that gas is completely odorless, and a surprising amount of it never exits as flatulence at all. It gets absorbed into your bloodstream and quietly exhaled through your lungs.
Swallowed Air: The Biggest Contributor
The single largest component of intestinal gas is nitrogen, which averages about 65% of total gas volume and can range as high as 88%. Almost all of that nitrogen comes from air you swallow, a process called aerophagia. You swallow small amounts of air every time you eat, drink, chew gum, smoke, or even talk. Eating quickly or drinking through a straw increases the amount. Carbonated drinks add extra carbon dioxide on top of that.
Some of this swallowed air comes back up as a burp before it ever reaches your intestines. The rest travels through your stomach and into your small intestine, where it mixes with gases produced further along the digestive tract.
Chemical Reactions in Your Stomach
Your stomach produces strong acid to break down food. When that acidic mixture moves into the upper part of your small intestine, your body releases bicarbonate to neutralize it. The reaction between acid and bicarbonate generates carbon dioxide gas. This is the same basic chemistry as dropping baking soda into vinegar.
Carbon dioxide typically makes up about 10% of intestinal gas, though it can reach as high as 27%. Much of the carbon dioxide produced in this reaction never makes it to your colon. It gets reabsorbed through the intestinal wall into your bloodstream, travels to your lungs, and leaves your body when you breathe out. This is one reason you produce far more gas internally than you actually pass as flatulence.
Bacterial Fermentation in the Colon
The large intestine is home to trillions of bacteria that break down nutrients your own digestive enzymes can’t handle. When these bacteria ferment undigested carbohydrates, they produce hydrogen, carbon dioxide, and in some people, methane. This fermentation process is the same basic mechanism that produces bubbles in beer and bread, just happening inside your gut instead of a brewery.
Hydrogen can make up anywhere from a trace amount to nearly half of total gas volume, depending on what you’ve eaten. Like carbon dioxide, a large portion of hydrogen gets absorbed into the bloodstream and exhaled through the lungs. Doctors actually use this fact diagnostically: breath tests that measure hydrogen and methane levels can reveal whether bacteria are overgrowing in the small intestine, where they don’t normally belong. A hydrogen rise of 20 parts per million or more within 90 minutes, or methane at 10 ppm or above at any point, suggests a problem.
Why Some People Produce Methane
Methane production depends on a specific type of microorganism called archaea, which are distinct from bacteria. The dominant species in the human gut, Methanobrevibacter smithii, works by consuming hydrogen and carbon dioxide and converting them into methane. Among people who do produce methane, this organism accounts for virtually 100% of the output.
Methane can range from 0% to over 30% of total gas. Whether you’re a methane producer depends on whether you carry enough of these archaea in your colon, and that’s largely determined by your individual gut ecosystem rather than what you ate for dinner. Methane slows intestinal movement, which is why high methane production is sometimes associated with constipation.
Foods That Produce the Most Gas
The foods that generate the most gas are those containing short-chain carbohydrates your small intestine can’t fully absorb. These pass intact into your colon, where bacteria ferment them enthusiastically. The main categories include:
- Fructans and galacto-oligosaccharides: found in wheat, rye, onions, garlic, and legumes like beans and lentils
- Lactose: the sugar in milk, soft cheeses, and yogurt, particularly if you produce less of the enzyme that breaks it down
- Excess fructose: found in honey, apples, and foods sweetened with high-fructose corn syrup
- Sugar alcohols: sorbitol and mannitol, used as artificial sweeteners and naturally present in some fruits
These are collectively known as FODMAPs. Everyone ferments them to some degree, but people with irritable bowel syndrome tend to experience more bloating, pain, and gas from the same amounts. The gas itself isn’t different. The gut’s sensitivity to distension is.
What Makes Gas Smell
The five major gases in your intestines (nitrogen, oxygen, hydrogen, carbon dioxide, and methane) are all completely odorless. The smell comes from trace sulfur-containing compounds that make up a tiny fraction of total gas volume. The primary culprit is hydrogen sulfide, the same compound responsible for the smell of rotten eggs. Two other sulfur gases, methanethiol and dimethyl sulfide, contribute as well, but hydrogen sulfide correlates most strongly with odor intensity.
These sulfur gases come from bacterial breakdown of sulfur-containing amino acids in protein-rich foods. Eggs, meat, cruciferous vegetables like broccoli and cabbage, and alliums like garlic and onions are common sources. This is why a high-protein meal or a plate of Brussels sprouts can produce gas that smells noticeably worse than what follows a bowl of rice, even though the total volume of gas may be similar.
How Your Body Gets Rid of Gas
Flatulence is the most obvious exit route, but it’s not the only one. Your body eliminates intestinal gas through three pathways. Burping releases gas that hasn’t yet left the stomach. Absorption through the intestinal wall moves gas into the bloodstream, where it travels to the lungs and gets exhaled with your breath. And whatever remains continues through the colon and exits as flatulence.
The balance between these pathways varies by gas type. Carbon dioxide and hydrogen are efficiently absorbed, so much of what’s produced never reaches the end of the line. Nitrogen, on the other hand, is poorly absorbed and makes up the bulk of what you actually pass. This is why flatulence is mostly odorless, high-volume nitrogen rather than the small, potent sulfur compounds that get all the blame.

