A total of 39,172 patients who underwent primary THA or TKA were identified. The incidence of C difficile colitis was 0.10% (95% confidence interval [CI] 0.07-0.13). Of the cases that developed C difficile colitis, 79% were diagnosed after discharge and 84% had not had a preceding infection diagnosed. Independent preoperative and procedural risk factors for the development of C difficile colitis were greater age (most notably ≥80 years old, relative risk [RR] 5.28, 95% CI 1.65-16.92, P = .008), dependent functional status (RR 4.05, 95% CI 1.44-11.36, P = .008), preoperative anemia (RR 2.52, 95% CI 1.28-4.97, P = .007), hypertension (RR 2.51, 95% CI 1.06-5.98, P = .037), and THA (vs TKA; RR 2.25, 95% CI 1.16-4.36, P = .017). Postoperative infectious risk factors were urinary tract infection (RR 10.66, 95% CI 3.77-30.12, P < .001), sepsis (RR 17.80, 95% CI 3.77-84.00, P < .001), and “any infection” (RR 6.60, 95% CI 2.66-16.34, P < .001).