The website looked at housing affordability, cost of living, real estate taxes, foreclosure and violent-crime rates, and 14 other measures to determine their list. Affordability was weighted the most heavily out of the 19 total data points, and the affordability ranking is included with each city in the list below, along with the quality of life ranking WalletHub gave each city, both out of 300.
RELATED: The best cities for recent grads to start their careers in
In some areas of the country, it may even make more sense to rent a home or apartment, instead of buying.
"Before you consider buying, calculate the financial returns on buying vs. renting in your area under a variety of assumptions," Andra Ghent, associate professor at the University of Wisconsin School of Business, told WalletHub.
"It's not always a better financial decision to own than to rent."