Although an adverse influence of hyperoxemia during cardiopulmonary bypass is well documented, there is a wide range of oxygen settings during cardiopulmonary bypass, based mostly on trial and error. The aim of this study was to determine the optimal inspired oxygen fraction during cardiopulmonary bypass. Ninety patients undergoing isolated coronary artery bypass operations were randomly allocated to one of 3 groups of 30 each. In group 1, cardiopulmonary bypass was started with an inspired oxygen fraction of 0.40, increased to 0.60 during rewarming. These settings were 0.40 and 0.50 in group 2, and 0.35 and 0.45 in group 3. Samples for blood gas analysis were collected at defined time periods during the operation. PaO(2) was significantly higher in groups 1 and 2 compared to group 3. All patients in group 1 and 88% of patients in group 2 suffered at least one episode of hyperoxemia during cardiopulmonary bypass, compared to 30% of patients in group 3. The differences were significant, and we concluded that to avoid hyperoxemia, inspired oxygen fraction should be kept at 0.35 during cardiopulmonary bypass and increased to 0.45 during rewarming.