Mortgage resource HSH.com has crunched the numbers to find the yearly salary needed to afford the principal, interest, taxes, and insurance payments on a median-priced home in Houston, and it's one of the highest in the nation.

The country's 50 most populous metropolitan areas were analyzed, and Texas makes a three-city showing on the 25 most expensive list.

Houston is No. 22 overall and third priciest in Texas, with residents having to bring in $57,346.12 a year in order to afford a $235,600 median-priced home. Nationally, workers have to earn $56,159.89 to afford a home that'll cost them $255,600.

How did HSH.com arrive at the numbers? It used 2017 second-quarter data for median home prices from the National Association of Realtors, national mortgage rates derived from weekly surveys by Freddie Mac and the Mortgage Bankers Association of America (for 30-year fixed rate mortgages), and available property tax and homeowners insurance costs. It also used the standard 28 percent "front-end" debt ratios and a 20 percent down payment subtracted from the NAR’s median-home-price data to determine its figures.

A 10 percent jump in home prices between the first and second quarters of 2017 can also be felt nationwide, though Houston is actually faring a little better with its 5.9 percent increase.

No. 13 Austin and No. 18 Dallas join Houston among the most expensive metros, with workers requiring $69,952.75 and $61,039.97, respectively, in order to net a home. A 7.9 percent home-price increase in Dallas is a little easier to swallow than Austin's almost 9 percent.

California residents are surely feeling the pressure, with San Jose taking the title of most expensive and San Francisco, San Diego, and Los Angeles helping to fill out the top five. In San Jose, the required salary is nearly five times the national — $221,363.63 — because a home usually costs around $1.18 million.

If you want to make your money stretch, San Antonio is a good choice. The Alamo City makes the list of the 25 least expensive metros, though its home prices are rising faster than any other city in Texas. You should expect to earn at least $53,829.14 to afford a $222,600 home.

But it's Pittsburgh that'll let you earn the least: $35,329.29. Though if you're looking to buy there, you may want to do it soon — right now the median home price is $145,000, but that's already up nearly 21 percent from the first quarter of 2017.