The Digestive System and Gas

Medically Reviewed by Sabrina Felson, MD on March 08, 2024
3 min read

Gas is a normal result of the foods you eat and swallowing air. As your digestive system does its thing, it makes gas.

Usually, you get rid of gas through your mouth (burping) or through your anus (flatulence). People gas about 20 times a day. It’s an ordinary occurrence, but it can be painful and embarrassing.

You make gas in two ways: when you swallow air, and when the bacteria in your large intestine help digest your food.

Undigested food moves from the small intestine to the large intestine. Once it gets there, the bacteria go to work, making hydrogen, carbon dioxide, and methane, which then leave your body.

Not everyone will get gas from the same foods.

You also swallow air when you eat and drink. This helps make gas. You usually release swallowed air by burping it. Whatever isn't released by burping goes into the small or large intestine, where it’s released as flatulence.

You’re most likely to get gas by eating carbs, which are found in foods like:

  • Beans
  • Vegetables (especially broccoli, cabbage, and onions)
  • Fruits
  • Dairy products
  • Whole-grain foods
  • Soft drinks
  • Fruit drinks

In addition to burping and flatulence, you may feel bloated. You could also have pain in your belly or sides. That pain could be mistaken for something else, like a heart attack or appendicitis.

Chronic belching may be a sign of a problem with your digestive system, like gastroesophageal reflux disease. You may hear this called GERD.

Many things cause bloating, including:

  • Fluid build-up
  • Irritable bowel syndrome (IBS)
  • Colon cancer
  • Crohn's disease
  • Ulcerative colitis
  • A hernia
  • Constipation
  • Lactose intolerance 
  • Celiac disease
  • And many others

Since diet is the main cause of gas, your doctor will want to know about the foods you eat and your symptoms. They may ask you to keep a record of what you eat and drink to help them identify foods that cause you trouble. They may also ask you to keep track of how often you pass gas.

You may have to stop eating certain foods. For example, if lactose intolerance is believed to be the cause, you’ll probably have to cut down on dairy.

If bloating is a problem, your doctor may examine you to rule out different things.

If you have chronic belching, your doctor will look for signs that you swallow a lot of air. If they think you do, they’ll look for a cause. They may get an X-ray of your esophagus, stomach, and upper small intestine – they may call it your GI tract -- to rule out disease.

Gas problems are treated by changing your diet and by training yourself to swallow less air. There are also prescription and over-the-counter medications that can help.

Changing your diet will mean getting rid of the foods that cause gas. Unfortunately, this may also result in you having fewer nutritious foods. Ask your doctor to help you build a diet that’s healthy but doesn't cause much gas.

Over-the-counter medications include:

  • Antacids -- especially those that contain simethicone
  • Probiotics -- used to help inhibit the growth of bad bacteria and add good bacteria to the digestive tract
  • Lactase products such as Lactaid and Dairy Ease -- may help people with lactose intolerance
  • Beano -- contains the enzyme that helps digest sugars in beans and many other vegetables

Your doctor may prescribe drugs to help move food through your digestive system. Medicines that do that may also move gas through quicker.

To swallow less air, you can try:

  • Cutting out gum or hard candy
  • Eating more slowly
  • Making sure any dentures you wear fit properly
  • Not drinking through straws