The age of Cory, Shawn and Topanga's age has changed randomly at different times. During the first season episode "Class Pre-Reunion", Mr. Feeny assigns the class what it would be like as the class of 2000 at their 20 year reunion. During season 4, Cory and Topanga both celebrate turning 16 which should make them sophomores. This episode shows the three entering their senior year making them the class of 1998.
In the beginning when Shawn and Cory are about to enter Senior Hall in their fantasy, Shawn says "We've waited 3 years to enter this door" - but they started high school from 7th grade, meaning they waited five years to enter senior year since starting high school.