This article presents a study on predicting student attendance to exams in a university setting. The study focused on the Concept of Algorithms, Data, and Programs course, a foundational course in systems bachelor. Two models were constructed: linear regression and polynomial regression of degree 3, aimed to predict the total number of attendees and the number of students who would pass the exam. We built a dataset that included information on student enrollment, previous exam attendance, grades, and other relevant factors. Students were classified into three groups: reduced exam, complete exam with prior attendance, and complete exam without prior attendance. The results showed that the models’ predictions were accurate enough, and that they could be used to ensure appropriate classroom occupancy without overcrowding or empty rooms. The models guided the allocation of students, optimizing space utilization while providing available seats for attending students. The study identified opportunities for improvement. One limitation was the assignment of attendance probabilities to achieve the overall predicted attendance. Future work could involve predicting attendance rates for each group individually. Additionally, implementing a classification model to categorise students into pass, fail, insufficient, and non-attendance groups would provide a more comprehensive understanding of student outcomes.