Over the last decade, the U.S. Department of Health and Human Services has been promoting the use of quality measures that tie government insurance reimbursements to hospitals' relative performances in patients care. Although the Hospital Readmission Reduction Program, established under the Affordable Care Act, witnessed great success of quality measures in reducing post-discharge unplanned readmissions and the associated expenses, the disparities in healthcare delivered to patients from different socioeconomic or racial groups remain unattended. As a first step to incentivize hospitals to reduce healthcare inequity, we extend the methodology underlying current quality measures to quantify disparities in unplanned readmissions attributable to hospitals between black and white patients and between low and high socioeconomic status patients. We propose the absolute rate difference as a more intuitive effect measure than odds ratio and derive its interval estimate using a bootstrap procedure. Alternative analyses based on Bayesian hierarchical models and propensity scores are also considered. Using recent national database for patients with three common medical conditions, we discovered that racial and socioeconomic disparities persist even after accounting for differences in patients' characteristics and that the statistically significant variations in racial and socioeconomic disparities across hospitals indicate room for some hospitals to improve their practices to achieve the long-standing goal of healthcare equity.