While you may struggle to buy a house in these cities, Vancouver and Toronto finished at the top of a list of the most “livable cities” in a new global survey comparing 40 cities.

Vancouver, Toronto and Calgary were third, fourth and fifth, respectively, in the 2016 “livability ranking” report released by the Economist Intelligence Unit (EIU). Melbourne finished in the No. 1 spot, while Vienna took the silver medal.

The EIU, a research group and part of the well-known magazine, ranked 140 cities around the world based on factors like stability, healthcare, culture and environment, education and infrastructure. The rankings also looked at indicators such as crime, civil unrest, access to education and good quality housing.

READ MORE: Toronto ranked best place to live in the world by The Economist

The report said that the cities that scored highest ”tend to be mid-sized cities with a relatively low population density.”

Story continues below advertisement

“Six of the top 10 scoring cities are in Australia and Canada, which have, respectively, population densities of 3.1 and 3.9 people per square kilometre.”

However, the report didn’t mention two of the big issues in Canada, the increasingly unaffordable real-estate in Vancouver and Toronto, and the impact of low oil prices which have contributed to high-unemployment in Alberta.

While Toronto and Vancouver both have strong labour markets, Calgary’s unemployment rate in July was 8.6 per cent, well above the national average of 6.9 per cent, according Statistics Canada

READ MORE: In July, B.C. was Canada’s bright spot for jobs

Joseph Lake, the director of global forecasting at the EIU, told Global News says this survey is less about the price of lifestyle and more about the lifestyle that is achievable in the cities surveyed.

“If you can afford to live in Vancouver or Toronto than that’s a much better lifestyle than living in [Harare, Zimbabwe] or other places at the bottom of this index,” said Lake. Tweet This

“A lot of the time the high-cost of living comes with the territory. When you have the high-quality infrastructure, the access to very good education systems, when have all of the cultural amenities on your doorstep and wide spread affordable healthcare, these are all things we take into account.”

Story continues below advertisement

The EIU’s ranked counties based on “acceptable” to “intolerable” and were given a score between 1 and 100. Melbourne topped the list, with a score of 97.5, as the world’s most livable city for the sixth year in a row.

Vancouver scored 97.3 finishing just ahead of Toronto, who scored 97.2. Calgary tied with Adelaide, Australia for fifth place with a score of 96.6. Montreal finished just outside the top ten in twelfth place.

5 most livable:

Melbourne, Australia

Vienna, Austria

Vancouver, Canada

Toronto, Canada

Tie- Calgary, Canada and Adelaide, Australia

5 least livable:

Kyiv, Ukraine

Douala, Cameroon

Harare, Zimbabwe

Karachi, Pakistan

Algiers, Algeria

Lake notes that while homes in Vancouver and Toronto would be out of reach for many people, these mid-size cities are still relatively affordable compared to larger ones like Paris, London, New York, and Tokyo which “tend to be victims of their own success.”

“New York, London, Paris and Tokyo are all prestigious hubs with a wealth of recreational activity, but all suffer from higher levels of crime, congestion and public transport problems than are deemed comfortable,” the report says.

READ MORE: Is the Metro Vancouver real estate market in free fall?

Ian Lee, associate professor at the Sprott School of Business at Carleton University, said while Canada and Australia are generally considered safe countries he wouldn’t place Toronto or Vancouver at the top of the index.

Story continues below advertisement

“I wouldn’t consider Toronto to be the most livable city in Canada,” Lee said. “Toronto is so congested, it’s so expensive, and it’s so difficult to move around in.” Tweet This

Lee said he considers cities like Montreal, Halifax or Victoria to be much more livable and suggested that low density is a very important variable when looking at Canada’s livability.

“It means you can spread out and means you’re not living cheek by jowl,” Lee said.

READ MORE: ‘Troubling trend’ as Toronto real estate market sees record sales for July

And while Calgary is seeing high-unemployment right now, it doesn’t mean it isn’t livable.

“Right now because of the collapse of oil prices Calgary is in a lot of pain,” he said. “But that doesn’t mean everyone is killing each other in Calgary…. Unemployment to me isn’t about livability, to me it’s about how safe are the cities.”

The report notes that while some cities saw an increase in crime in “top tier cities” they don’t always tell the whole story.

“After a record low number of murders in 2013, Vancouver saw its murder rate increase in 2014, but 2013 and 2014 were still the years with the lowest national murder rates in Canada since 1966,” the report said.

Story continues below advertisement

Threat of terrorism shakes up rankings

Instability and fears over terrorism have made life more challenging in many of the world’s leading cities over the past year, according to the EIU.

Ongoing civil wars led to increased security concerns in Damascus, Syria and Kyiv, Ukraine, which resulted in a decline of 26 and 25 percentage points respectively in the rankings.

“The most striking change this year has been the fall in a lot of cities that have been affected by terrorism,” Lake said. Tweet This

“Sydney, for example, has fallen by four places and it’s moved out of the top ten most livable cities. This is owing to a heightened perceived threat of terrorism.

Other cities in Western Europe, like Paris and Brussels, experienced a sharp decline in livability following the “violent acts of terrorism.”