To diagnose an intestinal tapeworm infection, your health care provider may do a stool sample analysis. This uses a sample of stool, or poop, to check for eggs or tapeworms. You may need to provide 2 or 3 stool samples.