The purpose of this study was to use pharmacogenetics to determine the frequency of genetic variants in our total knee arthroplasty (TKA) patients that could affect postoperative pain medications. Pharmacogenetic testing evaluates patient DNA to determine if a drug is expected to have a normal clinical effect, heightened effect, or no effect at all on the patient. It also predicts whether patients are likely to experience side effects from medicine. We further sought to determine if changing the multimodal programme based on these results would improve pain control or reduce side effects. In this pilot study, buccal samples were collected from 31 primary TKA patients. Pharmacogenetics testing examined genetic variants in genes OPRM1, CYP1A2, CYP2B6, CYP2C19, CYP3A4, CYP2C9, and CYP2D6. These genes affect the pharmacodynamics and pharmacokinetics of non-steroidal anti-inflammatory drugs and opioids. We examined the frequency of genetic variants to any of the medications we prescribed including celecoxib, hydrocodone, and tramadol. Patients were randomized to one of two groups: the control group received the standard postoperative pain regimen, and the study group received a customized regimen based on the pharmacogenetic results. For the first ten postoperative days, patients recorded pain scores, medication, and side effects. Genetic variants involving one or more medications in the multimodal pain protocol occurred in 13 of the 31 patients (42%). In total, eight patients (26%) had variants affecting more than one of the medications. For the 25 patients who recorded pain and medication logs, the mean pain levels and morphine equivalents (MEQs) consumed in the first ten days were higher in the control group than in the custom-guided group (p = 0.019 for pain and p = 0.655 for MEQ). Overall, 42% of patients had a variant involving one of the pain medications prescribed in our perioperative pain program for TKA. Ongoing research will help determine if using these data to modify a patient's medication will improve outcomes. Cite this article: Bone Joint J 2020;102-B(6 Supple A):73-78.