Gas (flatus) is made in the stomach and intestines as your body breaks down food into energy. All people pass gas, some people more than others. Everyone is different because it depends on what they eat, any medicines they may take, and any health conditions they have, especially any conditions of the digestive system.
What are common causes of gas?
Common causes of gas include:
- Swallowed air. If swallowed air isn't burped up, it passes through the digestive tract and is released through the anus as gas. Swallowing a lot of air may cause hiccups.
- Foods and drinks such as beans, broccoli, carbonated drinks, and beer. The amount of gas and the odor that different foods cause vary from person to person.
-
Lactose intolerance
. A person who can't easily digest lactose, a type of natural sugar found in milk and dairy products, can have both gas and bloating as well as other symptoms.
- Constipation. This can cause bloating but generally doesn't increase gas.
- Medicines or dietary supplements. Both prescription and nonprescription medicines, as well as dietary supplements and herbal remedies, can cause bloating and gas as side effects.
- A health condition, such as a bowel obstruction or Crohn's disease.
- Changes in hormone levels, such as during menstrual periods or pregnancy, which may slow digestion.
How can you prevent it?
You may be able to prevent some gas by changing your eating and drinking habits to limit some foods that produce more gas than others. You'll still have to eat healthy foods to get all the nutrients you need.
The amount of gas that different foods cause varies from person to person. Examples of gas-producing foods are:
- Vegetables such as artichokes, asparagus, broccoli, brussels sprouts, cabbage, cauliflower, cucumbers, green peppers, onions, radishes, and raw potatoes.
- Peas, lentils, and beans.
- Fruits such as apricots, bananas, melons, peaches, pears, prunes, and raw apples.
- Wheat and wheat bran.
- Eggs.
- Carbonated drinks, fruit drinks, beer, and red wine.
- Fried and fatty foods.
- Sugar and sugar substitutes.
- Milk and other dairy products, especially in people who have trouble digesting lactose, the main sugar found in milk.
- Packaged foods that contain lactose, such as breads, cereal, and salad dressing.
Dietary enzymes such as Beano may help to prevent gas.
Some people get relief from gas from products containing simethicone, a medicine that dissolves gas bubbles. Nonprescription medicines with simethicone include Gas-X and Mylicon.
Antacids, such as Maalox Anti-Gas and Mylanta Gas, can relieve bloating by making you burp. Be careful when you take over-the-counter antacid medicines. Many of these medicines have aspirin in them. Read the label to make sure that you are not taking more than the recommended dose. Too much aspirin can be harmful.
Sometimes gas is a symptom of a health problem that may need treatment.
Credits
Current as of: February 27, 2026
Author:
WebMD Ignite Staff
Clinical Review Board
All WebMD Ignite education is reviewed by a team that includes physicians, nurses, advanced practitioners, registered dieticians, and other healthcare professionals.