The mating of fungi depends on pheromones that mediate communication between two mating types. Most species use short peptides as pheromones, which are either unmodified (e.g., α-factor in Saccharomyces cerevisiae) or C-terminally farnesylated (e.g., a-factor in S. cerevisiae). Peptide pheromones have been found by genetics or biochemistry in small number of fungi, but their short sequences and modest conservation make it impossible to detect homologous sequences in most species. To overcome this problem, we used a four-step computational pipeline to identify candidate a-factor genes in sequenced genomes of the Saccharomycotina, the fungal clade that contains most of the yeasts: we require that candidate genes have a C-terminal prenylation motif, are fewer than 100 amino acids long, contain a proteolytic processing motif upstream of the potential mature pheromone sequence, and that closely related species contain highly conserved homologs of the potential mature pheromone sequence. Additional manual curation exploits the observation that many species carry more than one a-factor gene, encoding identical or nearly identical pheromones. From 332 fungal genomes, we identified strong candidate pheromone genes in 238 genomes, covering 13 clades that are separated from each other by at least 100 million years, the time required for evolution to remove detectable sequence homology. For one small clade, the Yarrowia, we demonstrated that our algorithm found the a-factor genes: deleting all four related genes in the a-mating type of Yarrowia lipolytica prevents mating.