The United Nations General Assembly has just released its second annual World Happiness Report, measuring happiness and well-being in countries around the world to help guide public policy.

Denmark topped the list of the happiest nations, ousting last year's winner, Iceland. Denmark was followed by Norway, Switzerland, the Netherlands, and Sweden.

The United States ranked 17th, behind Mexico, though that was an improvement from last year's 23rd place finish.

The World Happiness Report ranks countries based on six key factors that contribute to well-being, including GDP per capita, healthy life expectancy, someone to count on, perceived freedom to make life choices, freedom from corruption, and generosity.

And in case you were wondering why any of this maters, it turns out happiness helps people live longer, have more productive lives, earn higher wages, and be better citizens in general, according to the report.

Here are the 25 happiest countries from the study below. Each color represents one of the six key factors (key at the bottom):

World Happiness Report 2013

And here are the 10 least happy countries, with Togo ranking as the least happy: