BackgroundThe imbalanced supply of physicians in different specialties and the decreasing number of young doctors in China have made it important to understand specialty preference and influencing factors and to evaluate the role of different programs in specialty choice and career planning among Chinese medical students to help shape the social healthcare system and ensure adequate medical practitioners in each specialty.MethodA cross-sectional study comprising medical students from 5-year and 8-year program was conducted online. Demographics, specialty preferences and influencing factors, and career planning situations were collected and analysed by the chi-square test. Binary logistic regression analysis was performed in each program to identify the association between influencing factors and each specialty.ResultsA total of 128 students (57.03% 5-year, 42.97% 8-year) responded to our survey. More 8-year students had a doctor in their household than 5-year students (25.45% vs. 10.96%, p < 0.05). The most preferred specialty among 5-year students was surgery, followed by others and internal medicine, while that most preferred by 8-year students was surgery, followed by internal medicine, obstetrics/gynecology and anesthesiology. Compared with 5-year students, more 8-year students considered ‘personal competencies’ (66.67% vs. 40.85%, p < 0.05), ‘the reputation of the specialty’ (18.52% vs. 7.04%, p ≤ 0.05), ‘fewer doctor‒patient disputes’ (27.78% vs. 11.27%, p < 0.05) and ‘advice from family members’ (24.07% vs. 7.04%, p < 0.05) influential. Among 5-year students, ‘personal competencies’ was positively associated with preference for surgery and ‘work-life balance’ was negatively associated. Among 8-year students, ‘personal competencies’ and ‘work-life balance’ were positively associated with internal medicine, while ‘interests in the specialty’ and ‘broad career prospects’ were negatively related. Many students need further career guidance, and personalized tutoring was the most wanted method.ConclusionsThere was no difference between 5-year and 8-year students regarding specialty preference, but bias existed, possibly due to the influence of the real-world situation. Improving the working environment and welfare might be beneficial for developing a balanced distribution of the workforce among different medical departments. It is necessary for medical schools to develop programs accordingly to help them better plan their future careers.