Attitude to psychiatry influences motivation for medical students to successfully achieve in studying psychiatry. With a new generation of students, it would be interesting to investigate how attitudes have changed. This study aimed to compare the attitude of fifth-year medical students toward psychiatry in recent and in the past 24 years. Two samples of fifth-year medical students at Chiang Mai University completed the 30-item attitude to psychiatry (ATP-30); 118 students completed it in 1996, whereas 242 medical students completed it in 2019. Rasch analysis was employed for examining the differences between the total score and individual item scores between the two groups. The total score of ATP in the 2019 group was significantly higher than that in the 1996 group. After misfitting individuals and biased items were removed, only 15 items were valid and useful for a comparison. Of 15 items, 11 were found highly significantly different between two groups (p < 0.001). Negatively worded items, e.g., no strong evidence indicating effectiveness, became easier to score items (increased positive attitude) whereas some positively worded items, e.g., I would like to be a psychiatrist, became more difficult (less positive attitude) comparing between 1996 and 2019. In a comparison between the two methods using the traditional t-test and Rasch analysis, only 5 of 30 items (16.7%) agreed with each other. The overall attitude to psychiatry was significantly higher at the present compared with that in the past. Most items did not differ between the two times. Further studies regarding improving the attitude scale using item response theory such as Rasch should be encouraged.