Sexual dysfunction is a prevalent issue among individuals diagnosed with colorectal cancer (CRC), significantly impacting their quality of life. However, limited research has explored the factors associated with sexual dysfunction in CRC patients in Iran. This cross-sectional study aimed to identify the demographic factors that may contribute to sexual dysfunction in this population. A cross-sectional study involving CRC patients was conducted from April 1, 2022, to May 1, 2022, in Tabriz, Iran. Ethical approvals were obtained, and convenience sampling was employed at outpatient chemotherapy centers in five Tabriz hospitals. Validated questionnaires, including participants characteristics form, the Female Sexual Function Index (FSFI) for females and International Index of Erectile Function (IIEF) for males, were utilized. Data were analyzed using IBM SPSS Statistics version 24, employing descriptive statistics and stepwise linear regression to assess association between mentioned factors and sexual function. Among 256 participants, 50.4% were males, 49.6% were females, and 80.5% were married. The predominant age range was 50–60 years. The study findings revealed a high prevalence of sexual dysfunction among both female (Mean ± SD: 10.91 ± 8.67, Min–Max: 3.20–33.00) and male (Mean ± SD: 27.64 ± 16.28, Min–Max: 11–62) CRC patients. Factors such as the presence of a colostomy for FSFI (P < 0.001), type of treatment received for both FSFI and IIEF (P < 0.001), type of housing for both FSFI and IIEF (P < 0.001), occupation for FSFI (P < 0.001), presence of other diseases for FSFI (P = 0.047), and time since the last chemotherapy session for FSFI (P = 0.018), Education for IIEF (P = 0.026), and Age for IIEF (P = 0.002) were identified as significant factors of sexual dysfunction. These demographic factors demonstrated varying effects on sexual function, underscoring the complexity of this issue. The results underscore the significance of addressing sexual health concerns in CRC patients and highlight the necessity for tailored interventions to enhance their overall well-being. Healthcare providers should recognize the influence of demographic factors on sexual function and contemplate integrating sexual health assessments and interventions into the care of CRC patients. Further research is needed to comprehend better the underlying mechanisms and devise effective strategies for managing sexual dysfunction in this population.