Farts happen when gas builds up in your digestive tract and your body pushes it out through the rectum. That gas comes from two main sources: air you swallow and gas produced by bacteria in your large intestine as they break down food your body couldn’t digest on its own. The average person farts about 15 times a day, though anywhere from 3 to 40 times falls within the normal range.
Where the Gas Comes From
Every time you eat, drink, or swallow saliva, small amounts of air travel down into your stomach. Most of that swallowed air contains nitrogen and oxygen. Some of it comes back up as a burp, but whatever passes deeper into the intestines eventually works its way out the other end.
The bigger gas factory, though, is your colon. Your small intestine absorbs most nutrients from food, but certain carbohydrates slip through undigested. When they arrive in the large intestine, trillions of bacteria get to work fermenting them. That fermentation process generates three major gases: hydrogen, carbon dioxide, and methane. In some people, hydrogen is further converted into methane by a specific type of microbe called a methanogen, or into hydrogen sulfide by sulfate-reducing bacteria. Together, five gases make up more than 99% of what comes out: nitrogen, oxygen, carbon dioxide, hydrogen, and methane.
Why Certain Foods Make You Gassy
Beans are the classic culprit, and there’s a clear biochemical reason. Beans and other legumes are loaded with sugars called raffinose family oligosaccharides. Your body simply doesn’t produce the enzyme needed to break them down (called alpha-galactosidase), so these sugars pass through your stomach and small intestine completely intact. Once they hit your colon, bacteria ferment them rapidly, producing a surge of hydrogen, methane, and carbon dioxide.
Beans aren’t alone. Any carbohydrate that resists digestion in your upper gut will feed colonic bacteria and produce gas. Common triggers include onions, garlic, cruciferous vegetables like broccoli and cabbage, whole grains, and many fruits. Fiber supplements and prebiotics like inulin are specifically designed to reach the colon undigested, which is great for gut health but also means more fermentation and more gas. Dairy products cause the same effect in people who don’t produce enough lactase to break down milk sugar, since undigested lactose ferments in the colon just like raffinose does.
What Makes Some Farts Smell
Most of the gas in a fart is completely odorless. Nitrogen, oxygen, carbon dioxide, hydrogen, and methane have no smell at all. The stink comes from trace sulfur compounds that make up less than 1% of the total volume. The primary offender is hydrogen sulfide, the same compound that gives rotten eggs their smell. In studies measuring flatus composition, hydrogen sulfide was the most abundant sulfur gas, present at roughly five times the concentration of the next two contributors: methanethiol and dimethyl sulfide. Researchers found that the intensity of the bad smell correlated directly with hydrogen sulfide levels.
Foods rich in sulfur tend to produce smellier gas. Eggs, meat, cheese, broccoli, cauliflower, and garlic all contain sulfur-containing amino acids or other sulfur compounds that colonic bacteria convert into hydrogen sulfide during fermentation. So a high-fiber meal might produce a large volume of gas that barely smells, while a smaller amount of gas after a steak and eggs meal could clear a room.
How Your Body Decides to Release Gas
Your body has a surprisingly sophisticated system for telling the difference between gas and stool, and it operates mostly without your conscious input. When gas or stool moves into the rectum, it triggers something called the rectoanal inhibitory reflex. This reflex briefly relaxes the inner ring of muscle at the top of the anal canal, allowing a tiny sample of the rectal contents to contact the sensitive nerve endings there. Those nerves can distinguish between solid, liquid, and gas, which is how your brain knows whether it’s safe to let something pass.
If the signal says “gas,” a second reflex kicks in. When a wave of muscle contraction in the colon pushes content toward the exit, the coloanal reflex relaxes both the inner and outer sphincter muscles. This is what actually lets the gas escape. The inner sphincter relaxes through a chain of nerve signals involving the release of nitric oxide, while the outer sphincter, which you normally control voluntarily, also relaxes automatically when a strong enough propulsive wave arrives. That’s why farts can sometimes catch you off guard: if the colonic contraction is forceful enough, the reflex can override your voluntary control.
Why Some People Are Gassier Than Others
The composition of your gut microbiome plays a major role. Different bacterial communities ferment the same foods at different rates and produce different ratios of gases. Someone whose colon is home to more hydrogen-consuming methanogens may produce less total gas volume, because those microbes convert hydrogen into methane (a smaller-volume byproduct). Someone with more sulfate-reducing bacteria may produce less gas overall but smellier output, since those bacteria generate hydrogen sulfide.
Diet is the most obvious variable. A person eating 40 grams of fiber a day will almost certainly produce more gas than someone eating 10 grams. But eating speed matters too. Fast eaters and people who chew gum or drink carbonated beverages swallow significantly more air, adding to the total gas load. Stress and anxiety can increase air swallowing as well, a habit called aerophagia that many people don’t realize they have.
Underlying digestive conditions can also shift the balance. In conditions like lactose intolerance, celiac disease, or small intestinal bacterial overgrowth, more undigested material reaches the colon than normal, giving bacteria extra fuel to ferment. This is why a sudden, noticeable increase in gas, especially paired with symptoms like abdominal pain, diarrhea, constipation, or unexplained weight loss, can signal something worth investigating rather than just an inconvenience.
What Happens to Gas You Hold In
Holding in a fart doesn’t make the gas disappear. Some of it gets reabsorbed into the bloodstream through the intestinal wall, travels to the lungs, and leaves your body in your breath. Some simply builds up, distending the colon and causing bloating, discomfort, or cramping until you eventually release it. The gas itself doesn’t become toxic or dangerous, but the pressure can be genuinely uncomfortable, and in rare cases, chronic retention contributes to distension that worsens symptoms for people already dealing with irritable bowel syndrome or similar conditions.