Housing in Canada remains affordable — unless you want a single family detached home in Toronto or Vancouver, according to the RBC housing affordability measure.

There's been a marked erosion of affordability in Vancouver and Toronto, where housing is approaching the "dangerously unaffordable" level, according to Royal Bank economists. That situation is likely to continue as long as the demand for single family homes outstrips the supply.

Affordability levels are improving or stable in every other market, according to the RBC housing affordability measure, which has been expanded to look at 14 Canadian urban markets.

"In most markets the price increases are modest. You're not seeing those double-digit gains like you're seeing in Toronto and Vancouver. With modest gains in prices, as long as incomes keep growing, you'll see that affordability improve," said RBC chief economist Craig Wright.

"It has never been so unaffordable to own a single detached home in the Vancouver area," the report said.

RBC estimates that for a household with a 25-year mortgage and average income, it will take 109 per cent of their disposable cash to afford the full cost of owning a single, detached home, including mortgage, utilities and taxes.

Most can't afford Vancouver

In other words, it's out of reach for most people.

In Toronto, low interest rates and a good job market have combined to keep demand high, and affordability is "moving closer to risky levels." It takes 71.4 per cent of the average household income to afford the cost of a single family home in Toronto.

Condos do remain affordable in those cities. Their cost is also rising, though not so quickly as detached homes, the report found.

The risk is that a sharp correction could leave young homeowners with a hefty mortgage for a home that is no longer worth it, or that they may be unable to afford the payments.

"Whenever you get to these high values in housing, you're vulnerable to shock. The shock one worries about most in housing is, interest rates to some degree, but more important is employment," Wright said in an interview with CBC's The Exchange.

Earlier this month, the federal government introduced measures meant to cool the housing market, but skeptics say it may not make much difference. The CMHC now requires a 10 per cent down payment on the portion of any mortgage it insures over $500,000. The five per cent rule remains for the portion up to $500,000.

How affordable is it?

The cost of carrying a home in other cities as a percentage of disposable income:

Victoria, 52.3 per cent.

Calgary, 38.3 per cent.

Edmonton, 33.7 per cent.

Saskatoon, 35.2 per cent.

Regina, 29.8 per cent.

Winnipeg, 31.6 per cent.

Ottawa, 36.5 per cent.

Montreal, 42.8 per cent.

Quebec City, 34.1 per cent.

Saint John, 28.8 per cent.

Halifax, 31 per cent.

St. John's, 29.5 per cent.

RBC noted the impact of low oil prices in Calgary and St. John's. Calgary's housing prices kept their value until the last quarter of 2015, the report said, but downward price pressure is intensifying, and that will mean improved affordability in the year ahead.

In St. John's, affordability has been improving throughout 2015 and "the shine has come off" the housing market.