An annual ranking of the best cities in the world for university students has placed Vancouver in its top 20.

The 2019 QS Best Student Cities list has Vancouver at number 16, up one spot from where it ranked in 2018, but down from its 2016 and 2017 ranks - number 13 and number 10, respectively.

The city rankings are based on a variety of factors, including the number of universities that are included in the QS Top Universities ranking, the views of students who live in the city, the affordability of the city, and the city's desirability.

Vancouver has just two universities -- the University of British Columbia and Simon Fraser University -- that are ranked on the QS list, significantly fewer than some of the other cities in the top 20.

Where the city performs best is on the desirability metric.

"Even in the center of Vancouver the great outdoors is never far away – beaches, forest and stunning mountains are all within easy reach," the list says in its entry for Vancouver. "For those who prefer cultural pursuits, Vancouver also offers an array of brilliant nightlife, theatres and music – everything you’d expect from one of Canada’s most loved cities."

While Vancouver makes the top 20 worldwide, it's not even in the top two in Canada.

Montreal, which was ranked number one on the 2017 edition of the list, is the highest-rated Canadian city, reaching number six on this year's list.

Also eclipsing Vancouver on the 2019 list is Toronto, which is ranked 11th.

The top ten cities on the list are, in order: London, Tokyo, Melbourne, Munich, Berlin, Montreal, Paris, Zurich, Sydney, and Seoul. The highest-ranked American city on the list is Boston, which comes in at number 12.