China’s National Audit Office announced on Sunday that it is conducting a comprehensive review of all local government debt, which has long been considered a potential time bomb that threatens for China’s economy. But how bad is the debt really?

An audit that took a sample of 36 local governments at the end of 2012 (15 provinces, their capital cities, the municipalities of Tianjin, Shanghai and Guangzhou, and one district from each municipal city) found that those authorities had taken on a total of 3.85 trillion yuan ($628 billion) in debt, up 12.9% from 2010. That works out to $17.4 billion each—just under the $18 billion in debt held by the US city of Detroit, which filed for bankruptcy earlier this month.

It’s not an arbitrary comparison: Detroit’s bankruptcy has been cited a wake-up call for Beijing to rein in local government debt before it’s too late. Of the 223 recently audited local government financing vehicles in China, some 80% had either made a loss or not enough profit to cover their interest payments.

Of course, Detroit versus Chinese local government isn’t exactly apples to apples: A shrinking population has left Detroit with only about 700,000 people within its borders—a drop in the bucket for major Chinese municipalities. Tianjin, for example, has a population of 13.55 million. Assuming it has an average $17.4 billion in debrt, that works out to $1,284 of debt per resident, compared to $25,714 in Detroit.

But there are also some striking parallels: Detroit was a modern American boomtown that drew in hundreds of thousands of migrants from the rural south to serve as cheap labor for a boom in industrial manufacturing, giving birth to a huge middle class that was prosperous for decades.

China’s cities are only part way through that cycle—millions of rural poor have migrated to the cities in search of work in the factories, but creating middle-class consumers has proven to be more difficult. In the absence of that transition, local governments have been unable to wean themselves off a relentless cycle of credit-driven growth, producing a mountain of debt. Jiangsu province, north of Shanghai, has been cited as one of the most vulnerable as its investments in shipbuilding and solar panels feel the bite of economic slowdown.

Detroit has thousands of abandoned homes and buildings; China has ghost malls. Now China’s audit office will find out just how similar their situations really are.