Pulmonary embolism (PE) is a cause of death after total hip and knee arthroplasty (THA, TKA). We characterised the patient population suffering from in-hospital PE and identified perioperative risk factors associated with PE using nationally representative data. Data from the National Hospital Discharge Survey between 1990 and 2004 on patients who underwent primary or revision THA/TKA in the United States were analysed. Multivariate regression analysis was performed to determine if perioperative factors were associated with increased risk of in-hospital PE. An estimated 6,901,324 procedures were identified. The incidence of in-hospital PE was 0.36%. Factors associated with an increased risk for the diagnosis of PE included: revision THA, female gender, dementia, obesity, renal and cerebrovascular disease. An increased association with PE was found among patients with diagnosis of Adult Respiratory Distress Syndrome (ARDS), psychosis (confusion), and peripheral thrombotic events. Our findings may be useful in stratifying the individual patient's risk of PE after surgery.