Ever been in a situation where passing wind is going to be hugely embarrassing and you've had to hold in a fart? Let's face it — we all have.

Trying to hold it in leads to a build-up of pressure and major discomfort.

A build-up of intestinal gas can trigger abdominal distension, with some gas reabsorbed into the circulation and exhaled in your breath.

Holding on too long means the build-up of intestinal gas will eventually escape via an uncontrollable fart.

The research is not clear on whether the rise in pressure in your rectum increases your chance of developing a condition called diverticulitis, where small pouches develop in the gut lining and become inflamed — or whether it doesn't matter at all.

What is flatus?

Flatus, farts and breaking wind refer to intestinal gases that enter the rectum due to the body's usual gastrointestinal processes of digestion and metabolism, and then leave via the anus.

As your body digests food in the small intestine, components that can't be broken down move further along the gastrointestinal tract and eventually into the large intestine, called the colon.

Intestinal bacteria break down some of the contents by fermentation.

This process produces gases and by-products called fatty acids that are reabsorbed and used in metabolic pathways related to immunity and preventing disease development.

Gases can either be reabsorbed through the gut wall into the circulation and eventually exhaled through the lungs or excreted via the rectum, as a fart.

How much flatus is normal?

It can be challenging for researchers to get people to sign up for experiments that measure farts.

But thankfully, 10 healthy adults volunteered to have the amount of gas they passed over a day quantified.

In a 24-hour period all the flatus they expelled was collected via a rectal catheter (ouch).

They ate normally but to ensure a boost in gas production they also had to eat 200 grams (half a large can) of baked beans.

The participants produced a median total volume of 705 millilitres of gas in 24 hours, but it ranged from 476ml to 1,490ml per person.

Hydrogen gas was produced in the greatest volume (361ml over 24 hours), followed by carbon dioxide (68ml/24 hr).

Only three adults produced methane, which ranged from 3ml/24 to 120ml/24 hr. The remaining gases, thought to mostly be nitrogen, contributed about 213ml/24 hr.

Men and women produced about the same amount of gas and averaged eight flatus episodes (individual or a series of farts) over 24 hours.

The volume varied between 33 and 125 ml per fart, with bigger amounts of intestinal gas released in the hour after meals.

Gas was also produced while they were asleep, but at half the rate compared to during the day (median 16ml/hr vs 34ml/hr).

Fibre and flatus

In a study on dietary fibre and flatus, researches investigated what happens to intestinal gas production when you put people on a high-fibre diet.

The researchers got 10 healthy adult volunteers to eat their usual diet for seven days while consuming 30 grams of psyllium a day as a source of soluble fibre, or not.

In the psyllium week, they were asked to add 10 grams — about one heaped tablespoon — to each meal.

At the end of each week, the participants were brought into the lab and, in a carefully controlled experiment, had an intra-rectal catheter inserted to quantify how gas (in terms of gas volume, pressure and number) moved through the intestine over a couple of hours.

They found the high psyllium-fibre diet led to longer initial retention of gas, but the volume stayed the same, meaning fewer but bigger farts.

Where do the gases come from?

Gas in the intestines comes from different sources. It can be from swallowing air. Or from carbon dioxide produced when stomach acid mixes with bicarbonate in the small intestine. Or gasses can be produced by bacteria that are located in the large intestine.

While these gases are thought to perform specific tasks that impact on health, producing excessive intestinal gas can cause bloating, pain, borborygmus (which means rumbling sounds), belching and lots of farts.

The smelliest farts are due to sulphur containing gases.

This was confirmed in a study of 16 healthy adults who were fed pinto beans and lactulose, a non-absorbable carbohydrate that gets fermented in the colon. The odour intensity of flatus samples was evaluated by two judges (pity them).

The good news was that in a follow-up experiment, the researchers identified that a charcoal-lined cushion was able to help quash the smell of the sulphur gases.

Finally, some bad news for jet-setters: pressurised cabins on aeroplanes mean you're more likely to pass flatus due to the gas volume expanding at the lower cabin pressure, compared to being on the ground.

With modern noise-reduction features, your fellow passengers are more likely than they used to be to hear you fart.

What should you do?

The next time you feel a large volume of intestinal gas getting ready to do what it does, try to move to a more convenient location.

Whether you make it there or not, the best thing for your digestive health is to just let it go.

For some creative ideas (and a chuckle) on how to hold in a fart, check this Wiki How to do anything.

Clare Collins is a professor in nutrition and dietetics at the University of Newcastle.

This article originally appeared in The Conversation.