Though many U.S. cities are plagued by high housing prices and relatively stagnant wages, others are flourishing: jobs are plentiful, salaries are rising and business is booming.

To determine which thriving cities are also affordable housing markets, CNBC Make It looked at personal finance site MagnifyMoney's list of America's biggest "boomtowns" to see which U.S. cities offer job opportunities, prosperous businesses and an abundance of places to live.

We then compared that list to the National Association of Realtors' Metropolitan Median Area Prices and Affordability and Housing Affordability index from the third quarter of 2018. The index assumes a 4.7 percent mortgage rate for all areas and a monthly principal and interest payment limited to 25 percent of a resident's income. Note that this does not include homeowner's insurance and property taxes, which vary from market to market.