Many babies are aggressive feeders who gulp their formula, which increases the intake of air. If you notice your infant doing this, try feeding her in a quiet environment, help slow her pace by interrupting frequently, and be sure to burp her often. Also check the opening of the nipple. If it's too big, your baby will be flooded with formula and tend to take in air. If the nipple is too small, too much air can also be ingested, since a baby needs to suck harder to get the formula.
Lactose intolerance can also cause gas, but is extremely rare in infants.
This condition is almost always associated with diarrheal stools described as foamy because they are mixed with gas. My son is 20 months old and has frequent diarrhea and very soft stools. My newborn spits up frequently. He's on an iron supplement. I have a tendency to be anemic and wonder if this can be a genetic problem.