Total joint arthroplasty (TJA) is successful in improving health-related quality of life. However, outcomes vary in the literature due to modifiable and non-modifiable factors. Modifiable factors consist of body mass index (BMI), nutrition, and tobacco use. Non-modifiable risk factors include age, race, sex, and socioeconomic status. Prior literature has focused on racial disparities in terms of the utilization of lower extremity arthroplasty. The purpose of this study is to determine the effect of race and sex on the in-hospital complication rate, length of stay, and charges associated with primary TJA. This retrospective cohort utilized complex survey data from the National Inpatient Sample (NIS) between 2016 and 2019. The use of the International Classification of Disease-10 Procedure Codes (ICD-10 PCS) for right hip, left hip, right knee, and left knee TJA yielded a preliminary total of 2,660,280 patients. The exclusion criteria were bilateral arthroplasty and concomitant unilateral hip and knee arthritis. Major complications were defined as acute myocardial infarction, cardiac arrest, pulmonary embolism, adult respiratory distress syndrome, stroke, shock, and septicemia. Odds ratio (OR) and beta coefficients were adjusted for age, sex, primary payer, hospital region, hospital teaching status, and year. Total charges were adjusted for inflation using the Consumer Price Index data reported by the US Bureau of Labor Statistics. A total of 2,589,510 patients met our inclusion criteria; 87.6%, 5.9%, 4.8%, 1.4%, and 0.3% of people were 'White', 'Black', 'Hispanic', 'Asian, or Pacific Islander', and 'Native American', as defined by the National (Nationwide) Inpatient Sample (NIS) Variable 'RACE'. Black individuals experienced a significantly greater major complication rate compared to White individuals (0.87% vs. 0.74%, OR 1.25, p-value = 0.0004). Black and Hispanic individuals experienced a significantly greater minor complication rate compared to White individuals (6.39% vs. 4.12%, odds ratio (OR) 1.61, p-value < 0.0001; 4.68% vs. 4.12%, OR 1.17, p-value < 0.0001). Black, Hispanic, Asian or Pacific Islander, and Native American individuals stayed, on average, 0.33, 0.19, 0.19, and 0.25 days longer than White individuals (2.78, 2.54, 2.55, 2.56 vs. 2.37 days, p<0.0001). None of these statistically significant differences exceeded the established minimal clinically important difference of two days. Black, Hispanic, and Asian or Pacific Islander patients were charged $5,751, $18,656, and $12,119 more than White patients ($72,122, $85,027, $78,490, and $59,297 vs. $66,371, p ≤ 0.0165). Native American patients were charged $7,074 less than White patients ($59,297 vs. $66,371, p < 0.0001). Black and Hispanic TJA patients may have higher complication rates than White TJA patients. The differences in length of stay between race groups may not affect outcomes. Hispanic patients received significantly more charges than White patients, and Native American patients received significantly fewer charges than White patients after controlling for non-modifiable risk factors. Addressing the charge disparities may reduce the total national cost burden associated with TJA. The present study highlights the need for further studies on healthcare outcomes related to race and sex.