TORONTO -- Three Canadian cities are among the world's top five most livable cities.

Vancouver, Toronto and Calgary made The Economist magazine's 2012 list released earlier this week.

The survey ranks 140 cities based on a number of factors, including health care, stability, culture and environment, education and infrastructure -- with a score of up to 100.

Vancouver was the highest-ranked Canadian city, coming in third with an overall score of 97.3; Toronto came in fourth at 97.2, and Calgary tied for fifth place with Adelaide, Australia, at 96.6.

Melbourne, Australia topped the list with a score of 97.5, followed by Vienna, which scored 97.4.

It is the second year in a row that Melbourne, dubbed the cultural capital of Australia, has been declared the world's best place to live.

The cities were measured acceptable, tolerable, uncomfortable, undesirable or intolerable under each of the categories.

The magazine says the rankings show that mid-sized cities in wealthy countries with low populations tend to score the highest year after year.

The survey's authors say they only looked at places where people would want to live or visit.

They also noted that existing conflict or the possibility of one brought down the scores of many cities and pointed to the Arab Spring, the civil war in Libya and economic unrest in Greece as examples.

According to the survey, Dhaka, Bangladesh is the world's least livable city, coming in last with a score of 38.7.

Top 10 most livable cities:

1. Melbourne, Australia

2. Vienna, Austria

3. Vancouver

4. Toronto

5. (tie) Calgary and Adelaide, Australia

7. Sydney, Australia

8. Helsinki, Finland

9. Perth, Australia

10. Auckland, New Zealand