Several over-the-counter (OTC) medications help relieve gas and associated symptoms, such as pain, bloating, and swelling.

Experiencing gas every now and then is common, especially during or after meals. Burping and farting can typically help you find relief. However, if you’re finding it difficult to pass gas, you may benefit from taking medication for gas.

Read on to learn more about eight types of medications for gas that are widely available — and when you should speak with a doctor for severe gas symptoms.

Simethicone helps you pass gas bubbles out of your digestive tract more easily through burping or farting. This helps relieve symptoms like bloating, abdominal pain, and diarrhea.

Simethicone is usually available as an oral capsule, tablet, or liquid. Some common OTC medications that contain simethicone include:

  • Alka-Seltzer
  • Gas-X
  • Maalox
  • Mylanta
  • Phazyme

Simethicone does not typically cause side effects.

Activated charcoal has been treated with high heat to increase the number of pores on its surface.

Gas molecules are absorbed into these pores as the charcoal moves through your stomach and intestines, relieving bloating and abdominal pain.

It’s often used in medications that contain simethicone, such as Gas-X. You can also find it as an OTC medication in the form of capsules, powder, or tablets.

Experts typically recommend taking between 10 and 100 milligrams (mg) dissolved in water.

It’s important to know that charcoal can also absorb compounds from the food and beverages you consume. Over time, taking activated charcoal too often can lead to nutrient deficiencies.

Bismuth subsalicylate is a common medication used to treat gas and diarrhea.

It reduces inflammation and helps slow down fluids and electrolytes that cause your bowels to move, keeping gas buildup and diarrhea under control.

Pepto Bismol is the most common OTC gas medication containing bismuth subsalicylate. It’s available as a liquid that you can drink several times per day, using a 20-milliliter (mL) plastic cup to help you measure your dosage.

You shouldn’t take bismuth subsalicylate for longer than 2 days at a time. Pepto Bismol and similar medications may contain dyes and other possible allergens that some people might be sensitive to.

Antacids are used to control stomach acid that has built up to high levels, causing heartburn and gas pain.

They contain ingredients like calcium carbonate that can absorb excess stomach acid, relieving pain and heartburn that might make gas pain worse.

Some common antacid medications for gas include:

Antacids can contain artificial ingredients like dyes and flavors that might be unhealthy to consume over a long period. It’s important to read the medication labels carefully to make sure you’re not allergic to any ingredients.

Alpha-galactosidase is an enzyme that can help break down ingredients like sugars and carbohydrates that might be hard for your body to digest.

This can help your digestive tract move more quickly and reduce gas buildup that might result from the slow breakdown of food in the stomach and intestines, helping relieve gas and bloating.

Some common OTC medications for gas that contain alpha-galactosidase include:

  • Beano
  • Bean-Zyme
  • Gas-X

Medications with alpha-galactosidase may interact with medications like simethicone and affect your absorption of nutrients.

Lactase is a natural enzyme that breaks down lactose found in dairy products.

People who have lactose intolerance may get relief from taking lactase when eating dairy products like milk, cheese, and ice cream.

Lactaid is the most widely available OTC medication containing lactase for gas. To reduce gas, experts typically recommend taking up to 9,000 FCC units of lactase before you eat dairy.

Lactase medications can sometimes cause side effects that resemble allergies, such as:

  • rash
  • itchiness
  • hives
  • face, tongue, or throat swelling

If you experience any of these side effects, it is important to seek immediate medical attention.

Loperamide is a type of opioid that’s widely used to treat diarrhea.

Loperamide acts on opioid receptors in the body that control the movement of smooth muscle in the intestine, slowing down gut motility and reducing pain or swelling caused by gas and diarrhea.

You only need to take about 4 mg of loperamide at a time. Imodium is the most common OTC version of loperamide.

Loperamide has the potential for addiction and may have side effects if you use too much at once or over time. Possible side effects include:

  • constipation
  • headache
  • farting
  • nausea

The drug should only be used in people who have gas associated with diarrhea. Loperamide is not a good option for treating gas as a solitary symptom.

Sodium bicarbonate (often called baking soda) is a mineral compound with many uses, including cooking and cleaning. It can also be used as a home remedy for gas.

When sodium bicarbonate reacts with stomach acid, it produces salt, water, and carbon dioxide that are easier to pass out of the body, reducing gas and excessive stomach acid.

To treat gas, you don’t need to use a lot of sodium bicarbonate — dissolving half a teaspoon in water and drinking the solution can typically be enough.

It’s important not to drink too much sodium bicarbonate at once, as drinking too much carries a risk of stomach rupture if you’re full after a meal.

Seek immediate medical care if you experience any of the following symptoms along with gas:

  • abdominal swelling
  • blood in your poop
  • diarrhea or constipation that lasts for more than 3 days
  • gas that gets worse
  • heartburn
  • persistent abdominal pain
  • unusual or unexpected weight loss
  • vomiting

Simethicone is often considered the best medication for gas, as it can help provide quick relief.

Several medications, including simethicone, lactase supplements, and activated charcoal, can help reduce gas.

There are plenty of OTC medications for gas that can help you relieve pain, bloating, and swelling. But most medications for gas are meant to be taken in moderation.

You may wish to speak with a doctor if you’re concerned about any side effects you’re experiencing or if your symptoms worsen.