The most profitable private companies in 2017

consumer, shop, shopping, money, dollar, economy, spending, FBN

Accounting, real estate and legal services were the three most profitable industries over the past 12 months, according to new research by financial information company Sageworks.

Businesses that offer accounting, tax preparation, bookkeeping or payroll services had the highest profits over the past year, with margins of 18.4%, said Sageworks, which based its conclusions on an analysis of pretax net profit margins for private businesses in the 12 months that ended June 30.

Following the accounting industry, real estate leasing companies enjoyed a 17.9% profit margin while legal service businesses registered a profit margin of 17.4%.

Meanwhile, the average private U.S. company registered profits at 8.9%.

Higher profits at service providers like accountants and lawyers are related to their industries' extensive education and certification requirements, says Libby Bierman, an analyst with Sageworks.

"Before firms can enter these lines of business they have to invest considerable time and money into degrees and training. It makes sense, then, that these industries can charge a premium for their specialized services," Bierman says.

Service firms also don't have large inventories that are expensive to manufacture and maintain, a burden that reduces profitability.

No. 4 on Sageworks' list was businesses that manage companies or enterprises, with a 16% profit margin. In fifth place were companies involved in real estate-related activities including property management, with a 14.9% profit margin.

The Associated Press contributed to this report.