To compare the incidence of delirium in postoperative cardiac surgical patients treated with either cimetidine or ranitidine. Cardiac surgery patients were randomized to receive either cimetidine or ranitidine postoperatively. Each patient underwent three Mini-Mental Status Examinations (MMSE) and the medical record was reviewed for pertinent past medical history, laboratory data, and evidence of delirium on three occasions: one day preoperatively (before H-2 blocker was given), in the early postoperative period (while receiving the H-2 blocker); usually two days postoperatively on the day of hospital discharge (several days after the H2 blocker had been discontinued). Overall, both groups in the early postoperative period showed a significant decrease in the MMSE score (27.11 +/- 4.44 to 25.38 +/-2.87, mean +/- SD; t = 5.16, p < .0005), which resolved by the time of hospital discharge. There was no significant difference between cimetidine and ranitidine. Both age and preoperative MMSE score were strongly associated with the development of delirium. We found no significant difference between cimetidine's versus ranitidine's effect upon cognitive functioning in the postoperative cardiac surgical patient. This was true even when controlling for age and length of stay.