Math and general anxiety significantly impact academic performance, especially among science students, yet their effects in Bangladeshi private universities remain underexplored. This study investigates how math anxiety and general anxiety influence the academic performance (CGPA) of science undergraduates in Bangladesh, considering gender and socio-demographic factors. A cross-sectional study was conducted using an online survey with a structured questionnaire. The sample comprised 430 undergraduate students from various private universities across Bangladesh. Participants were assessed for math anxiety and general anxiety using validated scales from previous research. Data were analyzed using descriptive statistics, factor analysis, Pearson correlations, and a decision tree model (CHAID algorithm). University students exhibited significant variations in general anxiety (GN) and math anxiety (MA) based on gender and academic background. Female students reported higher GN (60.5 %) and MA (53.8 %) levels, with gender and field of study significantly associated (p < 0.01). Engineering students had lower anxiety, while business students reported higher levels. Students with weak mathematics backgrounds showed elevated GN (58.6 %) and MA (65.7 %). Math anxiety was the strongest predictor of GN, with 89.3 % of students with low MA and GPA > 4.54 in SSC experiencing low GN. Strong correlations between SSC and HSC GPAs (r = 0.577) highlighted academic continuity. This study confirms that higher math and general anxiety levels are linked to lower academic performance among Bangladeshi science undergraduates, with gender and academic background significantly influencing anxiety severity. Targeted interventions, including stress management workshops, counseling, and adaptive teaching strategies, are recommended to reduce anxiety and enhance academic outcomes.