My 2 year old has stomach pain, a little vomiting which has subsided, diarrhea and gurgling stomach sounds. How wld I know if its stomach bug or worms?

Stool testing. If the problems resolve within a few days, they may be due to a stomach 'bug", or viral illness. Should the complaints persist, then have your doctor order a stool test to look for parasites. Factors that contribute to the decision to evaluate for worms include, where you live, recent travel, and pets in the home.