Dunbar first appears in the historical record in 1474 as a new student or "determinant" of the Faculty of Arts at the University of St Andrews. Since the customary age for entering a Scottish university at this time was fourteen, a birth-date of 1459 or 1460 has been assumed. At St Andrews, he obtained a bachelor's degree in 1477 and a master's degree in 1479. Details from his later life suggest that he was ordained as a priest at some point, but the date is unknown.