Cities want to attract businesses and talent, so their appeal as a desirable place to live matters.

What determines good quality of living in a city? You might want recreational opportunities, ample public services, good transportation, available housing and healthcare. Mercer's Quality of Living rankings includes these factors in their evaluation of nearly 500 destinations around the world, along with the economic environment, availability of consumer goods, the political and social environment, the natural environment, socio-cultural environment, education and personal safety.

Mercer, a global business consulting company, does the ranking every year.

It's interesting to note that in the personal safety category, none of the U.S. cities made the top 10, in fact, in the U.S., most locations have seen a decline in safety, the report says. Some of the least safe cities were in central Africa, Iraq, Syria and Haiti. Criteria used for the personal safety ranking include: internal stability, crime,law enforcement, limitations on personal freedom and media/censorship.

As for quality of living overall, the highest ranking U.S. city is San Francisco, at No. 34. None of Mercer's top five cities for international employees in North America were in the U.S., all are in Canada.

Based on Mercer's ranking, these are the cities with the best quality of living in the world: