Considering the ever-increasing population of the elderly, the nurses' and nursing students' attitudes toward the elderly and how to care for them are very important. The current study aimed to investigate the nurses' and nursing students' attitudes toward the elderly. In the current study, which was of a descriptive-analytical type, a total of 160 nurses and nursing students were selected based on purpose-based sampling and investigated. The data collection tool was a two-part questionnaire including demographic information and the Kogan scale of attitude towards the elderly. SPSS version 21 statistical software and Pearson correlation tests, one-way analysis of variance, and t-tests were used for analysis. In all cases, the significance level was defined as less than 0.05. The average score of the total attitude of the research units towards old age was 110.88 out of 204. 93.1% of the samples had a neutral attitude, 5% had a positive attitude, and 1.9% had a negative attitude. A statistically significant relationship was observed between age and attitude (p<0.05), which means that the higher the age of the participants, the more positive attitude they had towards the elderly. Higher-year students also had a more positive attitude (p<0.05). There was no statistically significant relationship between sex, history of education about old age, occupation, history of caring for the elderly in the family, working years of personnel, and place of study with attitude (p>0.05). The majority of nurses and nursing students have a neutral attitude toward the elderly. Therefore, attention should be paid to their education to improve their positive attitude.