Add a strip of kombu (dried kelp), a pinch of baking soda, or a few sprigs of fresh epazote to the pot while beans cook, and always discard the soaking water. The detail most people get wrong: the soaking water is where much of the gas-causing sugars end up, so pouring it down the drain and cooking the beans in fresh water does more than anything you can add.
Beans cause gas mainly because they carry oligosaccharides, sugars the human gut cannot digest on its own. Gut bacteria ferment them instead, and that fermentation produces gas. The fixes below either pull those sugars out of the beans, soften them so they break down more completely, or help your body handle them.
What Actually Works in the Pot
These are the additions with a real effect, in rough order of usefulness:
Kombu
A 3-4 inch (8-10 cm) strip of dried kelp, added to the soaking water or the cooking water, is the classic fix. Kombu contains enzymes that help break down the oligosaccharides, and it also softens the beans so they cook more evenly. Remove the strip before serving, and chop it fine if you want to eat it, since it is the same seaweed used in Japanese broth. About one strip per 1 cup (200 g) dried beans is plenty.
Baking soda
A small pinch, about 1/4 teaspoon per 1 cup (200 g) dried beans, raises the water's pH and softens bean skins so they cook through more completely. Add it to the soaking water or the first 30 minutes of cooking. Do not use more than a pinch, and do not add it to the final soup: too much makes beans mushy and gives a soapy taste. Skip it entirely if your beans are already old and soft-cooking.
Epazote
This herb is the traditional addition to black beans and pinto beans in Mexican cooking, used specifically for this purpose. Add 1-2 fresh sprigs or about 1 teaspoon dried epazote during the last 30 minutes of cooking, then pull it out. The flavor is strong and a little medicinal, so start small. Dried epazote is easier to find than fresh in most US grocery stores.
Ginger, cumin and fennel
These do not remove the gas-causing sugars, but they are traditional carminative seasonings, meaning they are believed to help gas pass more comfortably rather than build up. Add about 1 tablespoon grated fresh ginger, 1 teaspoon ground cumin, or 1/2 teaspoon fennel seed per pot of soup. They also happen to taste great in almost any bean soup, so there is little downside.
How Should You Soak the Beans First?
Soaking removes a meaningful share of the oligosaccharides, but only if you throw the water out. For 1 cup (200 g) dried beans, cover with 3-4 cups (720-960 ml) cold water and let them sit 8-12 hours, or overnight. Drain, rinse, and start the soup with fresh water.
Short on time? Use the quick soak: cover the beans with 3-4 cups (720-960 ml) water, bring to a boil, boil hard for 2-3 minutes, then remove from heat and let sit, covered, for 1 hour. Drain and rinse just as thoroughly. Both methods work; neither one lets you skip the draining.
Does Cooking Longer Help?
Yes. Undercooked beans are harder to digest and cause more gas than fully tender ones. After soaking, simmer beans gently in fresh water for 1-2 hours for most varieties, until they crush easily between your fingers or against the roof of your mouth with no chalkiness. Old beans stored a year or more can take an extra 30-60 minutes. Keep the water at a bare simmer, not a rolling boil, which splits the skins. Add salt toward the end of cooking or in the soup itself; a heavy hand of salt early on can slow softening.
What About Enzyme Drops or Tablets?
Over-the-counter enzyme supplements containing alpha-galactosidase exist specifically for beans, and they are taken with the first bite of the meal rather than added to the pot. If you want to try them, follow the package directions, since dosing varies by product. This is a personal-choice item, not medical advice; if you have ongoing digestive symptoms, talk to your doctor.
Do Canned Beans Need the Same Treatment?
Canned beans are already fully cooked, so they cause less trouble than home-cooked underdone beans, but the liquid in the can carries some of the dissolved sugars. Pour the beans into a strainer and rinse them under running water for 20-30 seconds until the liquid runs clear, then add them to your soup for the last 15-20 minutes of simmering, just to heat through and pick up flavor. Kombu and baking soda are not needed here, but the ginger, cumin and epazote additions still apply.
How Much Bean Soup Is Too Much at Once?
If you rarely eat beans, a full bowl of thick bean soup in one sitting is a lot of fiber and oligosaccharides for an unaccustomed gut. Start with a smaller portion, about 3/4 cup (180 ml) of beans, and eat beans a few times a week so your gut bacteria adjust over a couple of weeks. Most people tolerate beans much better after that adjustment period, and the same soup that caused trouble the first week may be comfortable the third. Drinking water with the meal helps fiber move through as well.
Storing the Soup Safely
Cool leftover bean soup and refrigerate it within 2 hours; if the kitchen is above 90°F (32°C), get it into the fridge within 1 hour. It keeps about 3-4 days refrigerated in a covered container, or about 2-3 months in the freezer. Reheat on the stove or in the microwave until steaming hot throughout, to 165°F (74°C) for leftovers, and never reheat frozen soup in a slow cooker; thaw it in the fridge overnight first. If the soup contains ham, sausage or bacon, the same 165°F (74°C) reheating rule applies.