The act of working with algorithms using algorithmic thinking is described as a systematic description of how to use a specific approach to solve a problem. The ability to think logically in mathematics by solving problems and using algorithms are significant learning expectations. Being able to create a programme, algorithmic thinking does such algorithms in programming. The study investigated students' perception of mathematics and their performance in programming. The research approach for the study was a quantitative research design. The study population involved all tertiary students who study programming and mathematics at their respective universities. A questionnaire was sent to participants through Google forms. The data analysis was descriptive statistics and SPSS was used for data analysis. The study found that students who do not see mathematics learning as relevant to programming had the highest factor to the reasons why mathematics students have difficulty in programming. The study revealed that students' perception of mathematics affects their interest in programming and that their inability to excel in mathematics affects their performance in programming.