Adequate knowledge in pharmacology is crucial in many professions but a non-negligible proportion of students fail the exams and knowledge of underlying factors is largely lacking. This study was performed to evaluate to what extent various factors are related to student performance in pharmacology-related courses in higher education, linking administrative data to attendance at non-mandatory teaching sessions and questionnaire replies. A total of 596 students (median age: 22 years; 70% female) were included from eight courses which are part of either the medical, pharmacy, dentistry, nursing, or biomedical analyst degree programs at the Sahlgrenska Academy, Gothenburg, Sweden. In all, 380 (64%) students passed the regular program-and coursespecific exam. Multivariate logistic regression analysis revealed that a high participation rate in non-mandatory teaching sessions, as well as a perceived great interest in pharmacology, was associated with students' passing of the exam; adjusted odds ratio (95% confidence interval): 1.30 (1.19 to 1.42; per 10 percentage unit increase in attendance) and 3.38 (1.86 to 6.12), respectively. Working for wages during the course weeks and pre-university grades used in the program application were significant factors in subgroups of students, negatively and positively associated with the exam results, respectively. Age, having Swedish as a second language, and time spent studying were only associated with the exam result in the univariate analyses. To conclude, both students and teachers can contribute significantly to successful education within pharmacology, students by participating in the teaching sessions and teachers by encouraging students to find the subject interesting.