<b>Objectives:</b> Enhanced Recovery after Surgery and post-discharge prescribing guidelines significantly reduce opioid administration yet are limited by a lack of individualization, including genetic and metabolic factors. Pharmacogenomic (PGx) testing measures genetic polymorphisms in drug-metabolizing enzymes, transporters, receptors, and drug targets, explaining inter-individual variation in drug efficacy and toxicity. This prospective study aimed to compare perioperative opioid use in women by the status of <i>CYP2D6,</i> a PGx mutation relevant to opioid metabolism. <b>Methods:</b> Patients with gynecologic pathology (96% malignant) undergoing laparotomy at a single institution were prospectively recruited and provided a one-time buccal scraping for the CLIA/CAP approved RightMed<sup>TM</sup> PGx gene panel before surgery. Postoperative opioid usage and pain scores were evaluated via chart review, and a phone survey was planned for 21-35 days after discharge. Five pharmacogenes, including <i>CYP2D6</i>, were genotyped for all participants, and opioid metabolizing activity was defined by <i>CYP2D6</i> genotyping. Patient and procedural factors were compared by <i>CYP2D6</i> metabolizer status using Fisher's exact and Kruskal-Wallis tests. <b>Results:</b> The 96 enrolled patients were classified as ultra-rapid (3, 3%), normal (58, 60%), intermediate (27, 28%), and poor (8, 8%) opioid metabolizers. Over two-thirds (69%) of patients underwent complex cytoreductive surgery, and there was no difference in surgical complexity across <i>CYP2D6</i> categories (p=0.61). One-fifth of patients (20%) underwent a colon resection. Administration of nonopioid medications in the first 24 hours (p=1.00) or second 24 hours (p=1.00) after leaving the postoperative anesthesia care unit (PACU) or last 24 hours (p=0.47) of hospitalization were also not different across <i>CYP2D6</i> categories. There were significant differences between groups in consumed morphine milligram equivalents (MME) during the first 24 hours after exiting the PACU. Ultrarapid metabolizers had the highest median MME (75, IQR: 45-88) compared to the other three groups (median 22.5-47.5, p=0.03). The median pain scores also differed in the last 24 hours of hospitalization (p=0.04), with ultrarapid having higher median pain scores (4.9, IQR: 4.3-5.5) compared to the other three groups (median 2.3-2.9). There was no difference in length of stay (p=0.50), MME prescribed at discharge (p=0.23), or patient satisfaction with pain control (p=0.89) between groups. <b>Conclusions:</b> Genetically determined metabolism plays a role in opioid requirements after surgery. In this cohort of patients undergoing laparotomy, a positive association existed between increased <i>CYP2D6</i> activity and both in-hospital opioid requirements and higher pain scores. These results provide important information to help tailor opioid prescriptions to avoid overprescribing while adequately addressing postoperative pain.