Background: The published articles discussing the effect of coronary artery bypass graft surgery (CABG) on sexual function are few and based on subjective data (questionnaires) rather than objective data (e.g. penile duplex) in the evaluation of sexual function. Furthermore, there are no studies that have been conducted till now discussing the effect of the new off pump coronary artery bypass graft (OPCABG) surgery on the sexual function. Objectives: Our work aims at evaluation of the impact of CABG on sexual function, assessment of probable prognostic factors that may predict the future sexual function in patients undergoing CABG and comparison between the conventional CABG and the new OPCABG as regards the impact of each on the sexual function. Methods: One hundred CABG patients completed our study. Before surgery, all patients were subjected to full history taking including the IIEF-5 score, general and local examination and cardiac assessment based on the European System for Cardiac Operative Risk Evaluation(EuroSCORE). Patients with normal IIEF-5 score (> 21) were not subjected to further investigations. Patients with erectile dysfunction (ED) according to the IIEF-5 score(≤ 21) were subjected to pharmaco-penile duplex ultrasound and serum prolactin and testosterone levels when indicated. At the time of surgery patients were classified into two matched groups; Group I: Patients who underwent the conventional CABG (50 patients) and Group II: Patients who underwent the OPCABG (50 patients). Six months after surgery, the patients were subjected again to the same procedures for follow up of the postoperative erectile function outcome. Results: Eighty percent of patients candidate for CABG complained of ED. After surgery, mean IIEF-5 scores of patients showed a slight increase that did not reach a significant value. Penile duplex results showed no significant change after surgery. After surgery, 36%, 30%,and 34% of patients reported improvement, decline, and no change in their IIEF-5 scores respectively. The factors which predict the postoperative erectile function outcome were: 1)Preoperative IIEF-5 score: 70% of patients with normal preoperative IIEF-5 score preserved their sexual function postoperatively, while 68.4% of patients with severe ED preoperatively reported no improvement after surgery. 2)Cardiovascular risk factors (RF): 42% of patients with two or more RF reported postoperative IIEF-5 score decline compared to 7.1% of patients with no RF(p<0.001). 3) Preoperative penile duplex results: 100%, 49.1%, and 11.7% of patients with normal duplex, arteriogenic ED, and venocclusive dysfunction respectively reported improvement of their IIEF-5 scores after surgery (p<0.001). 4)The onset of ED: 58.7% of patients who reported ED after the onset of myocardial infarction reported postoperative erectile function improvement compared to 34.8% of patients who reported the onset of ED before the occurrence of MI (p<0.05). 5)The Euro score: 46.4% of low risk patients reported postoperative erectile function improvement compared to 21.4% of medium risk patients (p<0.01). 6).Operative factors OPCABG patients reported significantly higher Mean ± SD IIEF-5 score after surgery compared to conventional CABG patients (15.88 ± 6.67 versus 12.48 ±7.19, p< 0.05). Moreover, 46% of OP CABG patients reported postoperative improvement of their IIEF-5 score compared to only 26% of the conventional CABG patients (p< 0.05). Conclusion: The impact of CABG on the sexual function is variable. It depends on many preoperative and operative factors. These factors might be useful and should be considered to predict the postoperative sexual function.