Intestinal gases produced in the gut. Carbon dioxide (CO2) is chemically produced in the stomach, whereas hydrogen (H2), methane (CH4), CO2 and sulfur containing compounds are produced in the small intestine and colon. Nitrogen (N2) is introduced through swallowed air. The non-absorbed gases are pushed forward from one segment to the next along the gut. Gases produced along the gut are either absorbed into the blood, changed into chemical components via microbial activities or released through farts.
Intestinal gas is mainly made up of nitrogen, oxygen, carbon dioxide, hydrogen & methane. It originates from swallowed air, internal chemical reactions and bacterial fermentation of food. Of the potential sources of gases associated with ingestion of food, only swallowed nitrogen (N2) from air and the gases produced by intestinal fermentation are likely to cause bloating. Although swallowed air is difficult to control, choosing food that is low in readily fermentable, slowly absorbed or indigestible short chain carbohydrates (low FODMAP) leads to reduced gas production (as shown by reduced H2 excretion in the breath) and relief of symptoms in the majority of patients with IBS. Diet has been shown to have a major influence on the composition of the gut microbiome and the volume of farts.
For instance, the total gas passed daily in both healthy individuals and patients with IBS was, on average, <300ml daily on a low FODMAP diet. This volume increased to 500–1,500ml daily when healthy volunteers were fed a high FODMAP diet that included 200g daily of baked beans. Food choice also influences the odor of the gas which often relates to the degree of protein fermentation occurring and, subsequently, the amount of sulfur-containing trace gases produced.
Read more on the causes of smelly farts here.