For years, owning a home in Vancouver has been out of reach for many working families as the average price of a house surpassed the $500,000 mark.

Now, an international housing survey has ranked Vancouver the second-least affordable market in the world, replacing Sydney in that spot. Hong Kong remains the least affordable place to own a home.  

According to the annual Demographia International Housing Affordability survey, which looked at 325 housing markets around the world, Canada has some of the most "severely unaffordable" markets, including Vancouver, Toronto and Montreal.

Overall, however, Canada is still among the most affordable countries for homeowners. According to the survey, the U.S. has the most affordable housing markets, followed by Ireland and then Canada.

Four of the six most unaffordable Canadian cities are in British Columbia. In addition to Vancouver, Abbotsford, Kelowna and Victoria also made the list.

The authors of the latest report used an affordability measure known as a "median multiple," which is the median house price divided by the gross annual median household income.

Vancouver's median multiple is 10.6, with a median house price of $678,500 and a median income of $63,800.

Toronto was also severely unaffordable at 5.5, "a deterioration of 40 percent in housing affordability since 2004," according to the survey. The median house price in Toronto is $406,400, with a median household income of $73,600.

The Demographia survey also looked at markets in the United Kingdom, New Zealand, Hong Kong and Australia.

"Housing affordability generally improved over the past year in the surveyed nations, though the most unaffordable markets, Hong Kong and Vancouver, became even more unaffordable," the report says.

Windsor was the most affordable Canadian city overall, with a median house price of $149,900 and a median income of $67,900.

The most affordable major market in the world was Detroit, with a median house price of $66,500 and a median income of $48,700.