To diagnose ascariasis, your doctor will assess your symptoms and conduct tests. In severe infestations, worms may be expelled through coughing or vomiting, and can even emerge from other body openings like the mouth or nostrils. If you experience this, it is crucial to bring the expelled worm to your doctor for identification and to receive appropriate treatment.

  • Stool exam: Mature female ascariasis worms residing in your intestines lay eggs, which pass through your digestive system and can eventually be detected in your stool. To diagnose ascariasis, your doctor will examine your stool for the presence of microscopic eggs and larvae. However, it typically takes at least 40 days after infection for the eggs to become visible in the stool. It’s important to note that if you are infected with only male worms, eggs will not be present in your stool.
  • Blood test: Blood tests can detect elevated levels of eosinophils, a specific type of white blood cell. Increased eosinophils may indicate the presence of ascariasis, but other health conditions can also cause this elevation.
  • Imaging tests:
    • X-rays: If you are infested with worms, an X-ray of the abdomen can reveal the presence of a mass of worms. In some cases, a chest X-ray can also show the larvae in the lungs.
    • Ultrasound: An ultrasound examination can be used to visualize worms in the pancreas or liver. This imaging technique utilizes sound waves to create images of internal organs.
    • Computed tomography (CT) scans or magnetic resonance imaging (MRI): Both CT and MRI can provide detailed images of internal structures, aiding in the detection of worms that may obstruct ducts in the liver or pancreas. CT scans involve a series of X-ray images taken from different angles, while MRI uses radio waves and a strong magnetic field to generate images.



The primary treatment for ascariasis infection involves the use of medication, specifically anthelminthic drugs. Your healthcare provider will prescribe one of the following medications, all of which are effective in eliminating parasitic worms:

  • Mebendazole
  • Albendazole
  • Pyrantel pamoate

Medications administered over a duration of one to three days effectively eliminate adult worms and may lead to mild abdominal discomfort or diarrhea as potential side effects. It is worth noting that pyrantel pamoate is safe for pregnant women to take.


In severe cases, surgical intervention might be necessary to eliminate the worms and address any associated damage they have caused. Complications such as intestinal blockages, perforations, bile duct obstructions, or appendicitis may require surgery or an endoscopic procedure for worm removal.