These are the least (and most) affordable housing markets in the country

Miami once again ranks as the No. 2 most expensive homeownership market in the country, according to a new index released by the website RealtyHop.

Miami held onto second place for least affordable housing markets out of the 100 most populous U.S. cities after kicking New York out of the No. 2 spot back in May.

According to RealtyHop, the average Miami household earns $33,999 and would need to use 87.2% of its total annual income to cover mortgage and tax costs. The South Florida city's average monthly mortgage payment after taxes is $1,397.66.

Los Angeles, where the median home price is $899,000 and the estimated monthly mortgage payment is $4,151.11, reclaimed the top spot for least affordable housing markets.