Being in the middle is notoriously tough. The middle child. Middle age. Middle films in trilogies (we're giving you a pass, "The Godfather, Part II"). And then perhaps the most challenged group of all: the middle class.

Because the American dream sure ain't cheap these days, or easy to achieve. Politicians may fight over middle-class voters like hyenas over a fresh kill, but all their hyperbolic campaign promises ("time to ignite America's middle-class miracle once again!") and hashtags don't seem to be making life much better for this defining chunk of the nation's population.

The Pew Research Center defines middle-class Americans as those households earning between $42,000 and $125,000 annually—although most hew closer to the $59,000 median. As a group, they face endless challenges: income stagnation, rising costs of living, ever-escalating debt loads.

And then there's perhaps the biggest pain point of all: record-high housing costs in many parts of the country. So much for the middle-class miracle.

But wait—there are still places where the middle class reigns supreme, at least when it comes to housing. And the data team at realtor.com® set out to find them. We figured out which metros have the highest share of homes on the market that are priced just right for that area's middle-income earners—and, at the other end of the spectrum, the markets that have the least housing available for this grand swatch of buyers, whether it's priced substantially above or below their needs.

Best cities for middle-class buyers realtor.com

"The bottom line here is the middle class is getting squeezed when it comes to homes,” says Robert Hughes, senior research fellow at the American Institute for Economic Research, a nonprofit that focuses on wage distribution research.

“These people don’t have steady, good-paying jobs, and they can’t get financing at that price—it can be very hard for them to buy a house," adds Peter Temin, an economics professor at the Massachusetts Institute of Technology and author of the 2017 book titled "The Vanishing Middle Class: Prejudice and Power in a Dual Economy."

"That spells trouble for them later in life: Owning a home is one way to build wealth," Temin says. "So they don't have a good way to save.They're kind of trapped.”

We identified the middle class in each of the nation's 100 largest metros by starting with the median household income for each area, looking at 40% below and 40% above that income. Then we determined what these potential buyers could afford to spend on a 30-year fixed-rate mortgage with a 20% down payment and a 5% mortgage interest rate.

In their ongoing quest to lock in the best home, we're assuming that those on the lower end of the income scale would pay at least 25% of their income, while those at the top of the scale would pay no more than 28%.

Now let’s channel our best Goldilocks and head off into the woods to find America's true middle-class meccas—places with homes that are not too swanky, not too dilapidated, but just right.

Best metros for the middle class

Downtown Provo, UT Photo by Javin Weaver/Wikipedia CC

Median household income*: $72,700

Middle-class home price range*: $211,700 to $553,100

Percentage of middle-class homes on the market*: 76%

The startup you founded with your tech buddies in Seattle or Silicon Valley might make it big and rake in the cash one day. But in the meantime, you're going to blow through quite a bit of cash on housing. That's why affordably priced Provo, a 45-minute drive from way-pricier Salt Lake City, has become a thriving tech hub. And all of that middle-class housing makes it an appealing destination for other companies looking to open up shop as well.

Ancestry.com is based there, as is Brigham Young University. Provo also has one of the highest percentages of computer programmers in the country.

Provo has lots of suburban, cookie-cutter homes, with more going up all over town, says Shayne McQuivey, a local real estate agent at Re/Max Equity. They tend to be priced between $250,000 to $400,000.

"They’re just going like hotcakes,” he says.

Vineyard is one of the hottest middle-class suburbs in the area. About 15 minutes outside of Provo and the banks of the Utah Lake, it's filled with family-friendly, three- and four-bedroom homes outfitted with two-car garages.

And it's not only in Vineyard where buyers can score quite a bit of space. More than 70% of the Provo-area homes listed on realtor.com boast 3,000 square feet or more of space—the highest rate in the country among the largest markets.

View of the state capitol from East Village, Des Moines, IA Photo by Adam Fagen/Flickr-CC

Median household income: $67,400

Middle-class home price range: $196,100 to $512,500

Percentage of middle-class homes on the market: 71.8%

When you think Iowa, cornfields or the Iowa caucuses may come to mind. But unlike a politician downing a corn dog at the county fair, there is nothing artificial about Des Moines' economy. The median household income here is higher than in Phoenix, Houston, and Atlanta. Among other things, it's the home to Meredith Corp., which, with its recent purchase of Time Inc., is now the nation's largest magazine publisher.

Not only does the state's capital have a large percentage of homes for the middle class, but the lower-priced abodes aren't half-bad either. For example, this two-story, 2,800-square-foot house is available for $180,000, which is a little below our middle-income range.

The region has a little bit of everything: one-story ranches built in the 1950s, two-story farmhouses from the 19th century, and modern suburban homes built over the past decade.

The metro also loves its cars, coming in second on realtor.com's ranking of the best places for car lovers. Almost half of the homes on the market in Des Moines have garages, a fairly high rate. And, as a bonus, the typical driver spends only about seven hours a year in congestion. New Yorkers spend about 89 hours.

Auditorium Shores, Austin, TX Photo by jdeeringdavis/Flickr/CC

Median household income: $74,300

Middle-class home price range: $216,100 to $564,800

Percentage of middle-class homes on the market: 69.9%

A steady rise in man bun sightings does not necessarily mean a neighborhood's real estate prices are on the way up, despite what you may have gleaned from hipster havens such as Portland, OR, or Brooklyn, NY. In fact, Austin's housing market is still very much dominated by the middle class.

The funky city, whose unofficial slogan is "Keep Austin Weird," is all about growth. The population in the capital of Texas has exploded to 2.1 million in 2017, from 1.2 million in 2000, according to U.S. Census data.

All of those folks need places to live, which is pushing the development and popularity of new neighborhoods into the suburbs outside of Austin, says Jason Bernknopf, a real estate agent at AustinRealEstate.com.

“Fifteen years ago, there was not much housing in the suburbs. Most were living in ... [the city]," he says. But "land values have gotten too expensive, so [buyers] have left the area for affordability.”

Buyers can find new homes, built in the past five years, in the burbs. Many of these single-family residences come with at least three bedrooms and measure about 2,500 square feet, he says. And these newer communities on the rise are creating parks and bringing in new restaurants and other entertainment venues to lure city residents.

Downtown Raleigh, NC iStock

Median household income: $70,700

Middle-class home price range: $205,800 to $537,700

Percentage of middle-class homes on the market: 69.7%

The engineering talent that nearby Duke University, the University of North Carolina at Chapel Hill, and North Carolina State University churn out helps to make Raleigh one of the biggest tech hubs on the East Coast. And those good STEM (science, technology, engineering, and math) jobs mean salaries are higher than in similarly sized cities in the area, including Charlotte, NC, and Charleston, SC.

But unlike Silicon Valley or Boston, middle-class folks aren't priced out of the housing market here. Raleigh has plenty of large, two-story homes. And given the region's explosion in growth, many of these cribs are newly built, multibedroom, suburban homes.

About 20 minutes from downtown, buyers can score this two-story, three-bedroom home priced at $380,000, which is well within the middle-class range. Built in 2013, the home comes with granite countertops, a kitchen island, and tiled backsplash. Good luck finding a home at that price in the big, West Coast tech hubs!

Downtown El Paso, TX iStock

Median household income: $47,000

Middle-class home price range: $136,900 to $357,700

Percentage of middle-class homes on the market: 69.2%

Among our top-ranked metros, El Paso residents have the lowest incomes. But the region, on the U.S.-Mexico border, more than makes up for it by having lots and lots of affordable homes, with a median list price of just $167,000.

Most of those abodes are single-story ranchers with about three bedrooms. They're often concentrated in middle-class neighborhoods like the Coronado school district on the west side and the Americas school district on the east side of town.

Zoning laws here are friendlier to developers, keeping land costs down, says Tom Fullerton, an economics professor at the University of Texas at El Paso. Similar-size homes are more expensive in nearby New Mexico, where laws are more strict, he says.

Nationally, "the bottom- and higher-income segments are growing, while the middle-class is shrinking. But that doesn’t apply to El Paso," he adds. That's thanks to the many local logistics, transportation, and warehouse jobs. "The middle class is still expanding in this region."

Rounding out the top 10 were Lakeland, FL, at sixth, followed by Boise, ID; Ogden, UT; San Antonio, TX; and Dallas, at 10th.

Now that we’ve built up your hopes, let’s look at the markets where middle-income earners get the shaft.

Worst metros for the middle class

Worst cities for middle-class buyers realtor.com

Median household income: $69,300

Middle-class home price range: $201,800 to $527,400

Percentage of middle-class homes on the market: 30.5%

Would-be middle-class homeowners face some devilishly high home prices in the City of Angels. To find a home in their budget, they're pushed farther and farther out of the city, and in some cases out of the metro entirely. And it's a big metro! Even your worst enemy doesn't deserve a two-hour commute into L.A.

The median list price here is $740,300. That’s up 5.9% from last year—and it's still rising.

“It is hard for a middle-class worker to buy near that price point,” says Mel Wilson, a broker and owner of Mel Wilson & Associates. ”People now spend 50% to 60% of their income on housing."

Most middle-class buyers are getting help from their parents or other family members to become homeowners. Or they're moving one to two hours outside the city. Some are going as far as San Bernardino and Riverside. Both places are more than an hour commute into the city.

But the biggest culprits, Wilson argues, are the strict building and zoning laws in both Los Angeles and California. They make it extremely expensive to build new homes, so the ones that do go up are often exorbitantly priced.

City skyline in Toledo, OH iStock

Median household income: $51,200

Middle-class home price range: $149,000 to $389,500

Percentage of middle-class homes on the market: 32.3%

Like many Rust Belt cities, Toledo has taken its share of body punches with the closings of factories and other businesses that supported the city. Just this year a Jeep Wrangler parts maker named Toledo Molding and Die announced it would close a plant in the area and lay off 120 workers. That's translated into the bulk of homes on the market going for well under what we've defined as a middle-class price point. The median home price in the metro is just $129,000.

That's good news for cash-strapped buyers whose dollars go far here. But there is a dearth of better housing that isn't quite at the low end of the luxury market. You'll find a lot of traditional-style homes in area built during the past century.

The region isn't all doom and gloom, however. There is still a large manufacturing sector with lots of auto parts businesses headquartered here, including spark plugs maker Autolite. It's also home to two large public universities: Bowling Green State University and the University of Toledo. Combined, these two schools have nearly 40,000 students.

Downtown district in San Diego, CA iStock

Median household income: $73,600

Middle-class home price range: $214,100 to $559,500

Percentage of middle-class homes on the market: 32.7%

Sky-high home prices and bidding wars aren’t just hallmarks of Los Angeles and San Francisco—they're omnipresent in California. And that includes San Diego, where home prices are steadily soaring. The median price in the coastal Southern California metro is $677,000. That's up 4.6% since March last year, according to realtor.com data.

"From a practical standpoint, a household making $75,000 will find it tough to find anything affordable,” says Michael Wolf, a local real estate agent at Ascent Real Estate. But two people each making the median household income might be able to pool their money together to become homeowners. “A couple both would have to make good income to afford an entry-level home.”

La Mesa, a community around 20 minutes from downtown, is a core middle-class neighborhood in San Diego, Wolf says. The housing market features all types of homes: from contemporary, craftsman-style to gated homes. It has good schools, short commutes, and good restaurants. But even a place like La Mesa is getting expensive, as the median list price is $578,000, according to realtor.com data.

People are "starting to get out into the peripheral, consolatory locations” where it's more affordable, Wolf says.

Downtown skyline in Bridgeport, CT iStock

Median household income: $90,100

Middle-class home price range: $262,200 to $685,100

Percentage of middle-class homes on the market: 33.3%

The Bridgeport metro is located in Fairfield County—an extremely wealthy suburban area outside of New York City.

In a housing market that is packed with mansions in towns such as Greenwich, Stamford, and Westport, it shouldn't be a surprise to learn this area isn't the best for middle-class households. You can find hedge fund managers and top executives from Manhattan's largest firms all over the place in Greenwich. The area has mansions ranging from the booming 1920s to megamansions built in the lead-up to the 2008 financial collapse.

This 4,000-square-foot mansion in Greenwich sitting right on the Greenwich Cove is listed for $5,250,000. And that's not even in the highest range for this market, where buyers can live off of golf courses or country clubs.

So maybe a housing market full of tennis courts isn't exactly where you'll find a large middle-class enclave.

Downtown skyline in Syracuse, NY iStock

Median household income: $61,600

Middle-class home price range: $179,200 to $468,400

Percentage of middle-class homes on the market: 33.3%

Manufacturing losses through the years have taken a bite out of Syracuse’s middle class. And while the place is still affordable, most homes fall below the middle-class range. Yet there are still lots of middle-class neighborhoods here. Just look at Liverpool, about 10 minutes north of downtown.

“Right now you can find homes there [Liverpool] right around the $125,000-to-$150,000 range, where middle-class people are comfortable buying,” says Amber Spain-Mosher, a real estate agent at Re/Max in Syracuse. "Anything less than that, and properties need a lot of work."

But those low-priced abodes may help lure back Syracuse University grads from more expensive metros.

“The cost of living is so fantastic,” Spain-Mosher says. So why not give the metro a second look?

Rounding out the bottom 10 places for middle-class homeowners were San Jose, CA, at sixth, followed by Akron, OH; Honolulu; Dayton, OH; and Buffalo, NY, at 10th.

* Data sources: realtor.com and Nielsen