Have you ever wondered how much you would need to earn to buy a home in some of the largest metropolitan areas in the U.S.?

This is a key question because affordability is a growing concern as the supply of housing tightens and prices rise, according to a recent report from HSH.com.

The report spelled out exactly what income is needed to afford an average home in the nation's top metropolitan areas.

According to the report, double-digit price increases in the median home costs were common in U.S. metro areas in 2017, at the same time that the supply of homes was dropping. In fact, the only decline in median home price last year among the 50 top metro areas studied a was a 0.22 percent percent drop in Hartford, Conn.

The ranking assumed a 20 percent down payment on home purchases and a 4.05 percent mortgage interest rates for all metro areas except for San Francisco, San Diego and San Jose, Calif., where the presumed rate was 4.20 percent.

Here’s HSH.com's rundown on the salary and mortgage interest rate you would need to afford a median-priced home in the nation's top 10 large metro areas, in ascending order of salary required:

10. Portland, Ore.

Salary needed: $75,710.27

Median home price: $380,400

Monthly mortgage payment: $1,766.57