In 2010, hospitals were owed $39.3 billion, or 5.8 percent of their total expenses, according to the survey.
The figures represent the sum of hospitals' charity care and its bad debt, in which patients or insurers failed to settle bills.
The AHA did not split its numbers to show how much uncompensated care hospitals provided out of charity.
Hospitals' bad debt was one motivation for President Obama's signature healthcare law, which mandates that every person carry insurance or face fines.
The AHA called its Annual Survey of Hospitals the "nation's most comprehensive source of hospital financial data."