BACKGROUND: Total knee arthroplasty (TKA) creates a relatively large degree of nociception, making it a good setting to study variation in pain intensity and pain alleviation. The purpose of this study is to investigate factors associated with a second prescription of opioid medications within 30 days of primary TKA. METHODS: Using an insurance database, we studied 1372 people over a 6-year period with no mental health comorbidities including substance misuse and no comorbid pain illness at the time of TKA. Factors associated with a second prescription of opioid medication within 30 days of TKA were sought among patient demographics and the overall prescription morphine milligram equivalents. Patient and prescription-related risk factors were evaluated utilizing logistic relative risk regression. We reserved a year of data, 222 people, to evaluate the performance of the derived model. RESULTS: More than half the patients filled a second prescription for opioids within 30 days of TKA. Factors associated with a second prescription of opioid medication within 30 days of TKA included age (P < .01), current smoker (P = .01), and the total morphine milligram equivalents of the initial prescription (P < .01). Applied to the 222 people we reserved for validation, the model was 81% sensitive and 14% specific for a second prescription within 30 days, with a positive predictive value of 74%, and a negative predictive value of 20%. CONCLUSION: People that are given more opioids tend to request more opioids, but our model had limited diagnostic performance characteristics indicating that we are not accounting for the key factors associated with a second opioid prescription. Future studies might address undiagnosed patient social and mental health opportunities, factors known to associate with pain intensity and satisfaction with pain alleviation. LEVEL OF EVIDENCE: Diagnostic Level III.