PurposeMost prior studies investigating determinants of CEO compensation in nonprofit hospitals ignore how managerial ability affects compensation. This study aims to examine whether CEOs with greater ability to manage corporate resources efficiently receive more payment in nonprofit hospitals.Design/methodology/approachThis study employs a sample of 764 observations from 85 Pennsylvania nonprofit hospitals for the period 2010–2020.FindingsThis study finds a positive and statistically significant association between managerial ability and CEO compensation. The results are robust to alternative measures of managerial ability.Practical implicationsThe measure of managerial ability proposed in this study could be used by boards of directors to quantify, evaluate and benchmark CEO ability. The results are also relevant to policymakers, stakeholders and the public interested in understanding the determinants of CEO compensation in nonprofits.Originality/valueThis study is among the first to use a more precise measure of managerial ability, which captures the unobserved manager-specific aspects of CEO ability. In addition, this study contributes to the literature by providing evidence that CEO's ability to manage hospital resources efficiently plays an essential role in designing executive compensation contracts.