The ranking is one of the most comprehensive of its kind and is carried out annually to help multinational companies and other employers to compensate employees fairly when placing them on international assignments, according to Mercer.
Looking at 450 cities across the world, Mercer takes into account the following metrics to judge which cities made the list for the best quality of life - which therefore shows what it feels are the best and worst:
Political and social environment (political stability, crime, law enforcement)
Natural environment (climate, record of natural disasters)
The cities with the best quality of life are, broadly speaking, large conurbations in the Western world, with a handful in east Asia and Australia. But where are the major cities with the worst quality in world?
Business Insider decided to take a look at the bottom of Mercer's ranking, which features a large number of cities in Africa and the Middle East, where war, disease and poor infrastructure have lowered the quality of life significantly.
23. Addis Ababa, Ethiopia — The capital city is going through a building boom but many of its citizens are suffering from extreme poverty.
22. Harare, Zimbabwe — Zimbabwe is in the midst of unprecedented upheaval following the retirement of long-time leader Robert Mugabe, and Harare remains a highly volatile city.
21. Ashgabat, Turkmenistan — Blighted by chronic water shortages, Ashgabat is an exceptionally hard place to live at times.
20. Lagos, Nigeria — Africa's largest city, Lagos has huge gulfs between its rich and poor, with many Nigerians wealthy from the oil industry living right next to those stricken by poverty.
19. Abuja, Nigeria — Nigeria's capital faces similar problems to Lagos, and suffers from high crime rates from inter-communal violence.
18. Dushanbe, Tajikistan — Dushanbe has become mildly more liveable in the last year, according to Mercer, but the city still has major problems with both poverty and energy shortages.
17. Ouagadougou, Burkina Faso — Safety is a major problem in the West African capital, with terrorist attacks a constant threat. Just last month 16 people were killed and 80 wounded in an attack on the city.
16. Dhaka, Bangladesh — One of the most populous cities on the planet, Bangladesh's capital is incredibly poor and suffers from frequent environmental issues, including widespread flooding.
15. Antananarivo, Madagascar — Madagascar may be famous for its natural beauty and abundant species of flora and fauna, but it's capital city is a slightly different story. Crime is rife and political instability is a major issue.
14. Tripoli, Libya — Following the collapse of the Gaddafi regime in 2011, Libya's capital has been highly unstable, and was carved up by two rival warlords in 2015. It is also a major hub for refugees trying to enter Europe.
13. Niamey, Niger — Governmental corruption and local poverty are rampant in Niger's capital, which is a major stronghold for Islamist terrorism in the region.
12. Bamako, Mali — Bordering Niger, Bamako is another African city plagued with societal issues. It has grown rapidly in recent years, which has exacerbated issues like poverty in the city.
11. Nouakchott, Mauritania — Mauritania's capital, Nouakchott, is one of the only major cities located in the Sahara desert.
10. Conakry, Guinea — Situated on the Atlantic Ocean, Conakry is home to more than 1.6 million people, and growing.
9. Kinshasa, Democratic Republic of Congo — Located on the Congo River, Kinshasa has a turbulent history, and has huge issues with infrastructure. Widespread blackouts are common in the city of more than 11 million people.
8. Brazzaville, Congo — On the other side of the river to Kinshasa, Brazzaville faces many similar issues. In recent years, government corruption has triggered huge protests in the city.
7. Damascus, Syria — After nearly a decade of civil war, it is unsurprising that the quality of life in Syria's capital is low. The threat of military strikes looms large at all times.
6. N'Djamena, Chad — The city in one of the world's poorest countries has suffered at the hands of militant Islamist group Boko Haram. Just this week the group killed three Chadian soldiers.
5. Khartoum, Sudan — Sudan's capital is a hotbed for ISIS recruitment in North Africa, and also suffers major infrastructure issues. This month there has been a major fuel shortage in the city.
4. Port Au Prince, Haiti — Eight years on from the earthquake that tore Haiti apart, the country's capital is yet to recover, much of the city is plagued by deadly gang violence, and poverty is widespread.
3. Sana'a, Yemen — Like Damascus, Yemen's capital is ravaged by a brutal civil war. A recent outbreak of cholera has compounded Yemen's problems, with more than one million people impacted by the disease.
2. Bangui, Central African Republic — Since becoming independent from France in 1960, the CAR has been highly unstable. Violent sectarian clashes erupt regularly in the area.
1. Baghdad, Iraq — Baghdad remains the major city with the worst quality of life globally. It has suffered severe infrastructural damage from several wars and continual on the ground violence. It continues to face threats from ISIS.