OBJECTIVE: To determine factors that influence medical student selection of internal medicine residency programs by ethnicity and gender. DESIGN/SETTING: A cross-sectional mailed survey of graduating medical students applying to four residency programs in 1999. MEASUREMENTS: A five-point (5=most important) Likert scale was used to evaluate factors and included 14 items on location characteristics, 20 on program features, six on recruitment, three on future plans and three on advising. RESULTS: Of 2,820 surveys, 1,005 were completed (36%). The most important factors to applicants were house staff morale (mean +/- SD, 4.5 +/- 0.7), academic reputation (4.5 +/-0.8), and positive interview experience (4.1 +/- 1.0). Women rated gender diversity of faculty (3.3 vs. 2.3, p=0.0001) and house staff (3.3 vs. 2.5, p=0.0001), location of residency program near spouse (4.2 vs. 3.9, p=0.0001) or spouse's job (3.8 vs. 3.5, p=0.0002) and emphasis on primary care (2.9 vs. 2.4, p=0.0001) more highly than men. Minority applicants were more likely than whites to identify the following factors as more important: ethnic diversity of patients (3.8 vs. 3.4, p=0.008), house staff (3.3 vs. 2.4, p<0.0001) and faculty (3.1 vs. 2.3, p<0.0001); service to the medically indigent (3.8 vs. 3.3, p=0.004); feeling of being wanted (3.8 vs. 3.4, p=0.002); and an academic environment supportive of ethnic minorities (3.5 vs. 2.3, p<0.0001). CONCLUSIONS: Location and program factors are most important in influencing decisions to choose a residency program. However, women and minority applicants also place significant importance on family and diversity factors. Programs need to consider differential factors in recruitment of diverse students.