Abstract Background Inflammatory Bowel Disease (IBD) has a negative impact on quality of life (QOL), and sexuality is one of its major determinants. The impact of disease characteristics on sexuality and intimacy is one of the main concerns of IBD patients. Despite the obvious relevance of this problem, knowledge of the extent and the determinants of sexual dysfunction in persons with IBD is limited. The main goal of the study was to determine the correlation of quality of life (QOL) and it’s components in patients with IBD, and to investigate the impact of disease duration on QOL components. Methods In this cross-sectional study patients fulfilled anonymous validated questionnaire on their sexual function. In International Index of Erectile Function (IIEF) for males, five domains were evaluated through questions on erectile function, orgasmic function, sexual desire, intercourse satisfaction and overall satisfaction. In women were six domains assessed, desire, arousal, lubrication, orgasmic function, satisfaction and pain. For both scores, higher scores indicated a better function. Patients also fulfilled IBDQ-32, a validated questionnaire for assessing quality of life in IBD patients that consists of four main components (social, emotional, systemic and bowel function). Results In this study we have enrolled 202 patients who fulfilled the questionnaire (133 CD, 69 UC). Among them 122 were men and 80 women. Average age of included patients was 39.2 ± 11.02. Prevalence of SD in women was 70% (n = 60) and 18% (n = 22) in males. Female patients with sexual dysfunction had lower emotional and social QOL (p = 0.035 and p = 0.03, respectively). Total male IIEF sexual function score correlated significantly with all of the components of IBDQ; emotional (rho=0.36, p < 0.001) systemic (rho=0.24, p = 0.006), social (rho=0.28, p = 0.002), bowel (rho=0.27, p = 0.002) and with total IBDQ (rho=0.36, p < 0.001). Regarding erectile function score, there was also correlation with all of the components of IBDQ. Total female sexual function FSFI score correlated significantly only with systemic component of IBDQ (rho=0.25, p = 0.02). Interestingly, in male patients disease duration correlate negatively with emotional and social component of IBDQ (rho = −0.21, p = 0.02 and rho=-023, p = 0.01, respectively), which was not the case in female patients. Conclusion The results show correlation of sexual function score with components of QOL, which were more correlated in male patients. Our results suggest that longer disease duration might have positive impact on emotional and social life in male patients, which could be connected with achieving disease control and accepting the disease. It is important to provide proper psychological support, medical treatment and educational information.