Housing affordability in Canada hit the worst level in 27 years in the second quarter of this year, according to a Royal Bank of Canada report.

RBC Economics said in a report Friday that its housing affordability measure for Canada deteriorated for the eighth straight quarter. The Toronto area was the hardest hit, where RBC says affordability declined the most compared to the previous year and hit the worst level ever measured in the city.

The Ontario government's actions in April to cool down the housing market, including a foreign buyer's tax, did not have an immediate impact on provincial housing prices in the second quarter, RBC said.

“Clearly, home ownership remains out of reach for many would-be buyers in the area,” RBC Economics said in the report. “The good news is that some relief is on the way. Recent downward pressure on prices is poised to lower ownership costs in the period ahead. The bad news, unfortunately, is that rising interest rates will take some of that relief away.”

Still, the least-affordable place to purchase a home remains the Vancouver area, where affordability worsened after two straight quarters of improvement but remains better than a year ago. Outside of British Columbia and Ontario, affordability remains mostly stable, RBC said.

RBC's housing affordability measure shows the proportion of median pre-tax household income required to service the costs of owning the average home - factoring in both condos and single-family detached homes -including mortgage payments, property taxes and utilities.

The Vancouver area was the least affordable in the latest quarter ended June 30, 2017 at 80.7 per cent, down 2.4 per cent year-on-year. The Toronto area was second-highest at 75.4 per cent, marking an increase of 12.7 per cent. Victoria came in third at 58.6 per cent, with a year-on-year increase of 7.3 per cent. Across Canada, RBC's housing affordability measure hit 46.7 per cent in the latest quarter, a level not seen since the end of 1990 and an increase of 3.7 per cent from a year earlier.

Many Prairie markets got some relief, with year-on-year decreases in Regina and Saskatoon to 28.7 per cent and 32.1 per cent, respectively, RBC said. Affordability deteriorated marginally in most of Quebec and the Atlantic region. In Quebec City, RBC's metric improved slightly to 34 per cent. In the Montreal area, it worsened by 0.8 points to 41.5 per cent. In Saint John and Halifax, RBC's affordability measure worsened to 24.5 per cent and 32.1 per cent, respectively, while it improved slightly to 27.7 in St. John's.

Affordability in Edmonton worsened slightly year-on-year to hit 30.3 per cent. In Calgary, however, affordability deteriorated by 1.5 per cent year-on-year to 39.2 per cent.

Rising interest rates will further weigh on Canadians' ability to afford a home, RBC said. After rate hikes in June and September, RBC's economists expect the Bank of Canada to raise its overnight rate one more time before year-end and three times in 2018 for a total increase of 100 basis points.

RBC Economics estimates that, everything else remaining constant, a 100 basis point increase in mortgage rates would worsen RBC's national housing affordability measure by roughly 3.5 percentage points. Canada's most expensive housing markets would be hit harder, RBC adds, noting Vancouver would see an almost 7 per cent increase.

“This would occur at a time when housing affordability is already stretched in some of Canada's largest markets,” RBC Economics said in the report. “While high sensitivity to a rise in interest rates highlights material vulnerability, the reality is bound to be less threatening as other factors such as income gains will mitigate at least of part of the impact.”