Adobe Stock
Slide 1 of 12
While owning a median-priced home is more affordable than renting a three-bedroom property in more than half of the country, that gap is narrowing.

In an analysis of the top 447 U.S. counties, 240, or 54%, Attom Data Solutions found homeownership was more affordable than renting. A year ago, homeownership was more affordable in 66% of counties.

Unlike the national trend, in the nation's 14 most populated counties, and in 30 of 39 counties with a population at or above 1 million, renting is more affordable than buying a home.

"Although buying is still more affordable than renting in the majority of U.S. housing markets, that majority is shrinking as home price appreciation continues to outpace rental growth in most areas," said Daren Blomquist, vice president at Attom, in a press release.

"Renting has clearly become the lesser of two housing affordability evils in many major population centers, with renting more affordable than buying in 76% of counties that have a population of 1 million or more. And when broken down by population rather than number of markets, this data shows that the majority of the U.S. population,64%, live in markets that are more affordable to rent than to buy," he continued.

Median home prices rose faster than average fair-market rents in 263 of 447 analyzed counties, and average fair-market rents rose faster than average weekly wages in 266 of the 447 counties.

While renting may be cheaper than buying in some major markets, buying is still cheaper in just over half of U.S. markets.

From Pittsburgh to Cleveland, here's a look at the top 10 markets where buying is more affordable than renting.