In heavy infestations, it's possible to find worms after you cough or vomit, and the worms can come out of other body openings, such as your mouth or nostrils. If this happens to you, take the worm to your doctor to identify it and prescribe the proper treatment.

Stool tests

Mature female ascariasis worms in your intestine begin laying eggs. These eggs travel through your digestive system and eventually can be found in your stool.

To diagnose ascariasis, your doctor will examine your stool for the microscopic eggs and larvae. But eggs won't appear in stool until at least 40 days after you're infected. And if you're infected with only male worms, you won't have eggs.

Blood tests

Your blood can be tested for the presence of an increased number of a certain type of white blood cell, called eosinophils. Ascariasis can elevate your eosinophils, but so can other types of health problems.

Imaging tests

  • X-rays. If you're infested with worms, the mass of worms may be visible in an X-ray of your abdomen. In some cases, a chest X-ray can reveal the larvae in your lungs.
  • Ultrasound. An ultrasound may show worms in your pancreas or liver. This technology uses sound waves to create images of internal organs.
  • CT scans or MRIs. Both types of tests create detailed images of your internal structures, which can help your doctor detect worms that are blocking ducts in your liver or pancreas. CT scans combine X-ray images taken from many angles; MRI uses radio waves and a strong magnetic field.

More Information


Typically, only infections that cause symptoms need to be treated. In some cases, ascariasis will resolve on its own.


Anti-parasite medications are the first line of treatment against ascariasis. The most common are:

  • Albendazole (Albenza)
  • Ivermectin (Stromectol)
  • Mebendazole

These medications, taken for one to three days, kill the adult worms. Side effects include mild abdominal pain or diarrhea.


In cases of heavy infestation, surgery may be necessary to remove worms and repair damage they've caused. Intestinal obstruction or perforation, bile duct obstruction, and appendicitis are complications that may require surgery.

Preparing for your appointment

Your family doctor might refer you to a doctor specializing in disorders of the digestive system (gastroenterologist). You may need to consult a surgeon if the worms have blocked your intestines.

What you can do

Before your appointment, you may want to write down the answers to the following questions:

  • When did your symptoms begin?
  • Does anything make your symptoms better or worse?
  • Have you noticed worms in your stool or vomit?
  • Have you traveled to developing countries lately?
  • What medications and supplements are you taking?

What to expect from your doctor

During the physical exam, your doctor may press on certain areas of your abdomen to check for pain or tenderness. He or she may also want a sample of your stool for testing.

May 17, 2018
  1. Leder K, et al. Ascariasis. https://www.uptodate.com/contents/search. Accessed Feb. 22, 2015.
  2. Ascariasis infection (ascariasis). Centers for Disease Control and Prevention. https://www.cdc.gov/parasites/ascariasis/. Accessed Feb. 22, 2015.
  3. Ascariasis. Merck Manual Professional Version. https://www.merckmanuals.com/professional/infectious-diseases/nematodes-roundworms/ascariasis. Accessed Feb. 18, 2018.


Associated Procedures

News from Mayo Clinic