Due to the high prevalence of gastrointestinal nematodes in sheep, the growing anthelmintic resistance, and the development of organic farming systems, sustainable alternatives are being sought. One such method is phytotherapy. This study aimed to evaluate the in vitro ovicidal and larvicidal activity of extracts of tansy (Tanacetum vulgare L.) growing in Latvia on gastrointestinal nematodes (Trichostrongylidae) in sheep. The leaves and flowers of the tansy were extracted separately in 70%, 50%, and 30% ethanol and acetone. Six concentrations were prepared from each extract 500 mg/mL, 200 mg/mL, 100 mg/mL, 50 mg/mL, 20 mg/mL, and 10 mg/mL. In vitro egg hatching test and micro-agar larval development test were performed. Extracts of tansy have strong larvicidal activity. The highest percentage of larvae inhibition for most of the extracts was 100%, but for egg inhibition, it was 95.8% for the 200 mg/mL concentration of 50% acetone and 93.3% for the 500 mg/mL concentration of 50% ethanol leaf extracts. All tansy extracts had ovicidal and larvicidal activity against Trichostrongylidae in sheep.