In the second quarter of 2022, Canada's housing market saw the "worst deterioration" of affordability in 41 years, .

The report, published Tuesday by National Bank Financial Markets, looked at the housing markets in 10 metropolitan areas in Canada. National Bank economists gauged affordability by calculating the mortgage payment as a percentage of income (MPPI), which compares a mortgage payment on an average home to the median income.

"While home prices continued to rise in the second quarter, affordability mainly deteriorated on the back of rising mortgage interest rates," the report’s authors wrote.

Across the 10 urban areas, the report found the median home price was $810,985 in the second quarter of 2022. A typical mortgage payment for a home at that price would be $4,166, resulting in a MPPI rate of 63.9 per cent -- the highest since 1981, according to the report.

That represents an increase of 10.4 percentage points from the previous quarter and 19.1 percentage points from the previous year. Since 2000, the average MPPI rate had been 40.7 per cent.

Several urban areas included in the study had MPPI rates of over 90 per cent. The Vancouver area had the least affordable housing market, with an MPPI of 121.2 per cent for non-condo homes, which included detached houses, semi-detached houses and townhouses, and 51 per cent for condos, resulting in a combined MPPI of 96.9 per cent.

Victoria's affordability stats showed similar numbers. B.C.'s capital had a MPPI of 95.6 per cent, corresponding to 102.5 per cent for non-condos and 52.9 per cent for condos. In the Greater Toronto Area, the MPPI was 98.2 per cent for non-condos and 53.3 per cent for condos, resulting in a combined MPPI of 91 per cent.

With a combined MPPI rate of 66.6 per cent, the statistics in Hamilton closely mirrored the Canadian average. The Hamilton area had MPPI rates of 50.1 per cent for condos and 71.1 per cent for non-condos, according to the report.

Montreal and Canada’s National Capital Region were in the middle of the pack. In the Montreal area, the MPPI for a non-condo home was 50.1 per cent and 33.9 per cent for condos. Similarly in the Ottawa-Gatineau region, non-condo homes had an MPPI of 50.9 per cent, while the MPPI for condos was 28.6 per cent.

The Prairies and Quebec City had the most affordable housing markets, according to the analysis. MPPI rates for non-condo homes in Calgary, Edmonton, Winnipeg and Quebec City hovered between 30 and 37 per cent, while condos had MPPIs of around 15 to 19 per cent.

However, with the recent slowdown in the housing market, National Bank economists say there is some good news to come in terms of housing affordability as the bank forecasts a 10 per cent decline in home prices in the coming months.

"This development, combined with a stabilization of the benchmark five-year mortgage rate, should improve affordability before the year end," the report’s authors wrote.