Preoperative opioid use strongly correlates with greater postoperative opioid use and complications following total joint arthroplasty (TJA). However, there is a lack of information regarding the effect of opioid consumption during the hospital stay and within the operating room on postoperative opioid use. We retrospectively reviewed 369 consecutive patients undergoing primary TJA at an academic center over a 9-month period. Ninety-day preoperative and postoperative opioid prescriptions were obtained from the state's drug monitoring database. In-hospital opioid consumption data was obtained from the preoperative unit, operating room, postanesthesia care unit (PACU), and hospital floor. Multivariate analysis was utilized to compare patients' total in-hospital opioid consumption with their preoperative and postoperative use, along with opioid use throughout the hospitalization. Total in-hospital opioid consumption was independently associated with postoperative opioid use (rs= 0.17, P= .0010). Opioids consumed on the hospital floor correlated with opioid use in the preoperative unit (rs= 0.11, P= .0338) and PACU (rs= 0.15, P= .0032). Increased preoperative opioid consumption was the greatest risk factor for excessive postoperative use (rs= 0.44, P < .0001). A greater proportion of patients <65 years of age were high posthospital opioid consumers (P= .0146) and significantly more TKA patients were in the higher use groups (P= .0006). In-hospital opioid use is independently associated with preoperative and postoperative consumption. Preoperative opioid use remains the greatest risk factor for increased opioid consumption after TJA. Multimodal approaches to decrease reliance on opioids for pain control during hospitalization may offer hope to further decrease postoperative usage. III.