There are clear rules in transforming singular nouns to plural nouns. Below are the rules that involve words ending in y.
Nouns ending in y preceded by a vowel form their plurals by only adding-s. For example, we have the words: boy-boys key-keys day-days valley-valleys joy-joys
However, it a noun ending in y is preceded by a consonant, the y is changed to i and -es is added. For example, we have the words: baby-babies lady-ladies calamity-calamities ceremony-ceremonies butterfly-butterflies