Rising prices and higher mortgage rates continue to affect affordability for buyers. A recent analysis by HSH.com, a mortgage marketplace, found that home buyers need a median salary increase of $5,300 to buy a house now, compared with this time last year.

In the Washington metro area, a salary of $96,144 is required to purchase the median-priced house at $443,100 with a 30-year fixed-rate mortgage at 4.66 percent and a 20 percent down payment. Buyers who make a 10 percent down payment would need a salary of $111,787 to afford that house.

That figure puts the D.C. region at the eighth most expensive metro area, behind San Jose, San Francisco, San Diego, Los Angeles, Boston, Seattle and New York. Rounding out the top 10 are Denver and Portland, Ore.

Using quarterly data for median home prices, mortgage data and information on property taxes and insurance, HSH comes up with the salary required to buy a median-priced house in the top 50 metropolitan areas. The analysis is based on a 28 percent ratio of housing costs to gross monthly income and with a 20 percent down payment as well as a separate calculation with a 10 percent down payment.

The least expensive cities are Pittsburgh; Cleveland and Columbus, Ohio; Oklahoma City; Louisville; Indianapolis; Memphis; Buffalo; Cincinnati; and St. Louis.

For the full analysis and lists of the most expensive and least expensive metro areas, visit https://www.hsh.com/finance/mortgage/salary-home-buying-25-cities.html.