Here’s one more dubious distinction for San Jose and San Francisco: The two metro areas are the runaway national leaders in the amount of household income needed to buy a house.

According to a study from the HSH.com mortgage information website, a $216,181 household salary is required to buy a median-priced house in the San Jose metro area, while $171,330 is needed to buy a typical home in the San Francisco metro. That’s assuming a 20 percent down payment on a 30-year fixed loan.

Drawing on third-quarter data, HSH looked at the nation’s 50 most populous metropolitan areas. In the San Jose metro, the median housing price was $1,165,000. With 20 percent down, that leaves a $5,044 monthly mortgage payment. In the San Francisco metro — which includes Contra Costa County, as well as Oakland and all of Alameda County — the median stood at $900,000 and the typical mortgage payment was $3,997.

The report blames the affordability crisis on the nation’s constricted home supply, which forces prices up and slows sales growth. “There are few signs that the situation will get better quickly or soon,” the report says.

While the Bay Area’s numbers may sound outlandish, the region is an increasingly outlandish place when it comes to housing and earnings.

In April, the U.S. Department of Housing and Urban Development released its 2017 income limits, saying that a family of four can earn as much as $105,350 in San Francisco and San Mateo County and still be considered “low income” — and thereby eligible for affordable and subsidized housing programs. In Santa Clara County, the upper limit of “low income” for a family of four was set at $84,750, while $80,400 was the upper limit in Alameda and Contra Costa counties.

A wide gap separates the San Jose and San Francisco metros from other expensive markets. In Los Angeles, the household income needed to buy a median-priced house is $115,068, according to HSH, while the necessary income is $99,151 in the New York City area, $97,465 in the Boston area, $93,418 in the Seattle area and $84,503 in the Washington, D.C. area.

For more Bay Area housing affordability, home sales and other real estate news

follow us on Flipboard.

“Affordability pressures are frustratingly occurring in places where jobs are plentiful and incomes are rising,” said Lawrence Yun, chief economist for the National Association of Realtors. “Without a significant boost in new and existing inventory to alleviate price growth, job creation could slow in high-cost areas in upcoming years if residents begin exiling to more affordable parts of the country.”

Yun said as much last month when he addressed the annual convention of the Santa Clara County Association of Realtors: “The smartest people in America are all here in San Jose,” he said, but he warned that that may not always be the case. More and more, he predicted, tech companies “will flee” the area and go to more affordable regions of the country.

According to HSH, some of those areas include Atlanta, where a $55,390 household income will buy a median-priced home of $204,300, or Austin, a growing tech center where $67,440 will get a house. Closer to the Bay Area, $50,728 will get a house in Las Vegas and $71,344 will still get a house in Sacramento, a long commuter-ride away from the core of Silicon Valley.