Accounting, tax preparation, bookkeeping and payroll services – crammed together in one category – comprised the most profitable industry in the United States for the 12 months ending June 30, according to a new report by financial information provider Sageworks.

Accounting firms’ net profit margin of 18.13% led real-estate rental companies and legal services, both at 17.4 percent, by 0.9%. Outpatient care centers had a net profit margin of 15.9 percent and real-estate sales offices had a margin of 14.8%. All five industries are more than double the private-company average of 7.3%.

This marked the third straight year accounting was ranked as the most profitable industry. In Sageworks’ 2015 report, accounting-related companies led with a net profit margin of 19.6 percent, followed by real-estate rental companies (lessors) at 16 percent and automotive equipment rental and leasing at 15.8 percent.

Sageworks analyst James Noe considers privately held companies such as these to be vital for the country’s overall economic health, noting that they drive the bulk of gross domestic product and job creation nationwide.

The bottom three industries in the latest report were: nonmetallic mineral mining and quarrying with a net profit margin of 11.2 percent, medical and diagnostic laboratories at 11.1 percent, and other schools and instruction at 10.5 percent. The latter includes instructional companies that are not academic or trade schools, Noe said. Examples would include exam preparation, driver’s education and language instruction.

Net profit margins were adjusted to omit taxes and included owner compensation in excess of their market-rate salaries. Such adjustments are “commonly made to private-company financials in order to provide a more accurate picture of the companies’ operational performance,” Sageworks states.

Reports on the private companies from data entered by their banks, credit unions, and CPAs, who are authorized users of Sageworks’ software.

“We aggregate anonymized financial statements in our database to present the data.” Noe said.