Can America's stressed-out, fought-over, cash-strapped middle class still afford to buy homes?

That's the megamillion-dollar question these days. Because while the economy is strong and wages are rising, these gains are being left in the dust by runaway home prices. Combined with creeping mortgage rates, it's enough to make any average-income worker wonder: Will my paycheck ever catch up?

Before you throw up your hands and despair that your so-so salary has placed a fragile glass ceiling on your hopes of buying a home, take heart! The thrifty realtor.com® data team crunched the data to figure out just how much home regular Joes can actually afford to buy—and where they can find a plethora of sweet, comfortably priced abodes.

So where did we locate the greatest share of these real estate unicorns? Hint: It wasn't Manhattan or the San Francisco Bay Area.

"Generally, these aren't found in high-growth areas of the country ... [places] where we haven’t seen commensurate wage and salary growth," says Sean Snaith, an economics professor at the University of Central Florida. "You won’t find cities in California on this list."

Instead, for middle-class affordability, "you need to look toward areas where housing prices have not seen the same appreciation," he says.

But buckle up: We found a few surprise markets along the way.

To zero in on these hidden mainstream meccas, we started with the definition of a "middle-income" family from the latest U.S. Census Bureau data: a median household gross income of $61,372 per year. (For simplicity, we rounded that down to $60,000).

Then we did the math: We calculated that homeowners should spend no more than 28% of annual income on housing—which on 60 grand amounts to annual housing costs of $16,800. We assumed that these homeowners could get a 30-year mortgage with a 5% down payment and a 5% fixed-interest rate, plus 0.5% in private mortgage insurance (required on down payments below 20%). So we determined that a family earning $60,000 a year could comfortably buy a home priced up to $257,400, max.

Finally, we looked at realtor.com listings for September to find the greatest share of available housing there is at or below $257,400 in the nation's 50 largest metropolitan areas (limiting the rankings to two metros per state).*

We found tons of great homes, in nice neighborhoods, that middle-class earners can afford to buy—without becoming "house poor." No inheritance, lottery payouts, Ponzi schemes, or fantasy-level raises required!

Cities where a $60K salary can buy a home Claire Widman

Median list price: $179,100

Share of affordable homes: 64.3%

Home in Brighton Heights in Pittsburgh realtor.com

These days, Pittsburgh has shaken off its image of a Rust Belt city in decline and reinvented itself as a bustling tech hub. Aided by the University of Pittsburgh and Carnegie Mellon University, it has attracted major tech and health care companies to the region. Look no further than Über, which has an office here focused on designing autonomous, self-driving vehicles.

Despite all the changes, home prices have stayed low here. Many houses built in the early 20th century during the city's heyday were neglected during the city's years of population loss. But now, these places are getting investor attention. Take Brighton Heights, for example: The neighborhood has Craftsman-style homes built in the 1920s and 1930s lining its streets, as well as young buyers and investors flocking here to snag and remodel homes priced under $125,000.

"Communities that were once the nicer neighborhoods in Pittsburgh in the '60s and '70s are now seeing a resurgence," says Bobby West, a real estate agent at Coldwell Banker in Pittsburgh. "It is a shock to come to Pittsburgh and find that."

Median list price: $177,500

Share of affordable homes: 63.1%

Home in Rochester realtor.com

New York City remains one of the most brutally competitive markets on the planet. But not upstate in Rochester, where home buyers encounter a dynamic mix of inventory and affordability. The median down payment in Monroe County (aka Rochester) is just 5%, compared with 27.8% in Manhattan.

The road to those low prices wasn't pretty, though. During the '80s and '90s, the city lost loads of manufacturing jobs, many of them at former photographic film titan Eastman Kodak, long the crown jewel of corporate Rochester.

But now home buyers can snag beautiful homes only a short walk or bike away from the city's downtown nightlife. This three-story Victorian would be well over $500,000 in many American cities, but in Rochester it's only $275,000—and that's on the high side! There are even a surprising number of four-bedroom homes priced at just $50,000.

Median list price: $185,100

Share of affordable homes: 61.8%

Four-bedroom home listed for $139,000 in Buffalo. realtor.com

For decades, Buffalo was the poster child for manufacturing decline as plants went under and workers fled for greener pastures. But a flurry of downtown investment by the city and the University of Buffalo has helped line the streets with new restaurants, and corporate parks with startups. Meanwhile, outdoor enthusiasts love that you can now kayak down the Buffalo River, a once-befouled industrial waterway that has recently been restored.

“If you came to Buffalo 15 years ago, just about everyone hated it. Locals would tell you to get out as soon as you can,” says Vincent Rondinelli, principal broker at Rondinelli Real Estate in Buffalo. "It’s not like that anymore. The people who live here love it."

And they love the home prices, too, which are still a bargain compared with other markets—but probably not for long.

"We have investors coming in from out of state as far away as California," Rondinelli says. "They’re buying old, cheaper homes as investment properties. They’re gutting them and reselling them, and that's driving up prices quite a bit."

Bonus: Even the long-downtrodden Buffalo Bills are finally winning these days! (Sorry, just kidding.)

Median list price: $209,500

Share of affordable homes: 61.7%

Brick house in St. Louis realtor.com

In the early part of the 20th century, St. Louis was an industrial giant and among the nation's largest cities, but decades of job loss and a dwindling population turned some neighborhoods into veritable ghost towns. But that old narrative doesn't hold as much anymore. Case in point: In September, over-capacity crowds flocked to Anheuser-Busch Brewery's first ever Love Beer Fest to imbibe not just Budweiser, but over 100 beers from brands across the country. Beer snobs are a clear sign that a city is on the up!

This city is full of beautiful historic homes from an era when one-of-a-kind craftsmanship was the rule rather than the exception. Parts of St. Louis like Lafayette Square and Benton Park are places where buyers can find charming brick bungalows built in the early 1930s.

Plus, like many Midwestern cities, St. Louis has seen a revitalization in its downtown, with cranes popping up and a flurry of remodeling of the area's gorgeous historic houses. These gigantic brick homes are selling at bargain-basement prices compared with other parts of the country.

Median list price: $179,500

Share of affordable homes: 61.7%

Sub-$100K home in Cleveland realtor.com

Home prices in Cleveland have been suppressed for years, after mass closings of manufacturing plants and an ensuing exodus of longtime residents. But in recent years the city has invested in its downtown, and that revival—paired with still-low prices—is bringing home buyers back.

“Generally, it’s younger people who are moving back home now because of the affordability,” says CJ Trivisonno, owner of the Trivisonno Real Estate Team in Cleveland. "They’ll graduate from college and move to a big city like New York or Chicago, then boomerang back to the Midwest to start a family. In Cleveland they can buy a great house with a yard.”

Getting all those younger home buyers to come back didn't happen over night. The city, not long ago dubbed by Ohioans as the "mistake on the lake," needed a stem-to-stern makeover first. IBM's decision to open an office here sure helped, and that was soon followed by a swath of condos, as well as trendy bars along East Fourth Street.

One caveat: If you prefer brand-new construction, know that new condos in Cleveland's downtown can easily exceed $600,000. Yet if you dig old houses, Cleveland has many two-story homes with front porches priced under $100,000 that were built between the 1920s and '50s, during the city’s boom years.

Median list price: $219,200

Share of affordable homes: 55.7%

Four-bedroom brick home in Shelby County listed for $279K. realtor.com

When compared with America's largest cities, home prices in this famous Deep South city seem like a bargain. Like many urban areas, Birmingham has neighborhoods that have decayed after decades of urban flight that started in the '70s. But that just made it ground zero for where the middle class can now easily afford a mortgage.

Homes in the city built during Birmingham's boom years in the 1950s are where some of the lowest prices can be found. Just $75,000 for a three-bedroom home? Now that's a bargain worth checking out!

And getting those lower prices doesn't mean you'll sacrifice fun things to do. The city is packed with parks and museums; motorcycle lovers will get a kick out of this city's underground biker scene, including the Barber Vintage Motorsports Museum, which has hundreds of awesome vintage motorcycles on display.

Just know that not all areas boast the same deals. Shelby County in metro Birmingham has both the highest median home price ($260,000) and the lowest unemployment rate (3.1%) in the state. But even that price point is still affordable for many middle-income families.

Median list price: $214,000

Share of affordable homes: 53.5%

Memphis Davel5957/iStock

Located along the banks of America’s biggest river, the Mississippi, Memphis is seeing a big movement in its real estate market. The reason: A sizable inventory of homes priced under $100,000 are luring investors into the city.

“Some neighborhoods have been completely taken over by investment properties,” says Joe Spake, a broker at InCity Realty in Memphis. "They’re buying older homes for $60,000 to $70,000 and completely turning them around for profit.”

Generally, these neighborhoods are located in the Midtown area—the center of the city’s art scene and the host of the annual Cooper-Young Arts Festival, which draws around 100,000 visitors.

The region is also making great use of abandoned buildings to help spur growth. For example, the Crosstown Concourse is a massive art deco–style building that used to house a Sears warehouse and, in recent years, was turned into apartments, shops, and restaurants.

Median list price: $235,100

Share of affordable homes: 53.4%

Home in Moore realtor.com

Unlike many of the most affordable housing markets for middle-income earners, the population in OKC has long been growing, up 11% since 2010. Rebounding natural gas and oil sectors are fueling this growth—and developers are taking advantage of this by going on building sprees, erecting new subdivisions left and right.

This is in part possible because Oklahoma City is massive, and all that room to grow and lower building costs are helping to keep home prices within reach for middle-class families.

Sprawling neighborhoods like Moore feature tons of recently built three-bedroom homes priced around $225,000. Despite being devastated by tornadoes over the past two decades, Moore has watched its population climb from 41,000 in 2000 to over 60,000 in 2016. Why? Some say it's due to its stellar school districts, making this area particularly family-friendly.

Median list price: $240,000

Share of affordable homes: 49.2%

Condos in Over-the-Rhine realtor.com

Every morning, scores of besuited Cincinnatians commute to work at Fortune 100 companies headquartered in the city, including Procter & Gamble, Kroger, and Macy's. The blue chip companies that this city is known for keep wages up, but without the runaway prices that often come with newer tech firms or startups. As a result, Cincinnati's modest (but steady) economic growth means modest home price growth in line with people's salaries.

Once America's sixth-biggest city, Cincinnati is also full of one-of-a-kind neighborhoods like Over-the-Rhine, a historic neighborhood near downtown that has its streets lined with three-story brick buildings that were built 150 years ago by German immigrants. It's an area seeing a big resurgence, as investors rehab the century-old multifamily homes into condos.

Just keep in mind that for true real estate deals, you'll need to head to the suburbs just outside the city, like Anderson Township, a go-to for folks looking for three-bedroom homes priced under $225,000.

Median list price: $232,500

Share of affordable homes: 47.4%

Converted condos in Detroit. realtor.com

After years of losing residents, Detroit was finally forced to file for bankruptcy in 2013. But even then, the city was starting to set the groundwork for a grand revival.

“Detroit is growing. The downtown is on fire," says Thomas Nanes, a real estate agent at Community Choice Realty Detroit. Not literally, folks! "When you go there, you ask yourself if you’re still in Detroit, because it has changed so much. People are pushing baby carriages, people are riding bikes. A few years back, you wouldn’t have seen this. There just would have been people begging for food."

Near the city center, condos are being built in converted industrial buildings and selling for around $200,000. Even better deals can be found farther out in neighborhoods where many homes sell for under $75,000. But buyers are still wary of these cheap cribs. Often renovators will get their tools or newly installed furnace stolen while trying to rehab these homes, Nanes says.

Nonetheless, “things are really beginning to change here," he says. "We have beautiful homes that you have to put some work into."

* A metropolitan statistical area is a designation that includes the urban core of a city and surrounding smaller towns and cities.

Allison Underhill contributed to this report.