The purpose of this prospective clinical trial was to investigate the analgesic efficacy of three oral medication groups on postoperative endodontic pain in male and female dental patients, with an emphasis on analgesic differences between the sexes. Forty-three patients were administered ibuprofen 600 mg, placebo, or pentazocine 50 mg/0.5 mg naloxone in a randomized, double-blinded manner. Beginning immediately after endodontic treatment, patients took the assigned medication every 6 hours for 24 hours and recorded their degree of discomfort on a 100-mm visual analog scale. Statistical analysis of the data showed that ibuprofen 600 mg provided statistically significantly greater analgesia than placebo at 6 and 12 hours (P = 0.0014 and 0.0024), and pentazocine/naloxone provided statistically significantly greater analgesia than placebo at 12 hours (P = 0.0084). Sex-dependent differences were noted within the pentazocine/naloxone group, which showed significantly greater analgesia in females compared with males (P = 0.007).