Medical students often have preferences regarding the order of their clinical rotations, but assigning rotations fairly and efficiently can be challenging. To achieve a solution that optimizes assignments (i.e., maximizes student satisfaction), the authors present a novel application of the Hungarian algorithm, designed at the University of Texas Southwestern Medical Center (UTSW), to assign student schedules. Possible schedules were divided into distinct pathway options with k total number of seats. Each of n students submitted a ranked list of their top 5 pathway choices. An n × k matrix was formed, where the location (i, j) represented the cost associated with student i being placed in seat j. Progressively higher costs were assigned to students receiving less desired pathways. The Hungarian algorithm was then used to find the assignments that minimize total cost. The authors compared the performance of the Hungarian algorithm against 2 alternative algorithms (i.e., the rank and lottery algorithms). To evaluate the 3 algorithms, 4 simulations were conducted with different popularity weights for different pathways and were run across 1,000 trials. The algorithms were also compared using 3 years of UTSW student preference data for the classes of 2019, 2020, and 2021. In all 4 computer simulations, the Hungarian algorithm resulted in more students receiving 1 of their top 3 choices and fewer students receiving none of their preferences. Similarly, for UTSW student preference data, the Hungarian algorithm resulted in more students receiving 1 of their top 3 preferences and fewer students receiving none of their ranked preferences. This approach may be broadly applied to scheduling challenges in undergraduate and graduate medical education. Furthermore, by manipulating cost values, additional constraints can be enforced (e.g., requiring certain seats to be filled, attempting to avoid schedules that begin with a student's desired specialty). Copyright © 2020 by the Association of American Medical Colleges.