In this paper, we use a gravity approach to study the impact of distance on desired migratory flows of candidates to undergraduate courses in Portugal. We employ a large administrative database that includes the entire population of candidates to public HE institutions in Portugal from 2008 to 2019. We document, in line with the literature, that distance is a significant deterrent to mobility, with flows showing an average elasticity to distance between −2 and −1, a value that tends to decay as distance increases. We find that flows are particularly sensitive when distance is measured by travel time. We show, however, that the deterrence effect is not homogeneous. Among other results, we identify and measure important differences across fields of education. Finally, we illustrate how using different probability density functions can be of service in finding the most appropriate gravity model specification.