Conditions for LGBT people vary widely depending on where you are in the world, and for some countries even which part of the country you're in — like, say, here in the United States. And according to a new study focused specifically on gay men, it turns out gay men are happiest in countries where they have more legal rights. Go figure, right?

According to an online survey conducted by both the Amsterdam-based dating site Planet Romeo and the Johannes Gutenberg University of Mainz in Germany, how gay men fare in terms of legal rights has a huge impact on how they fare emotionally. The survey gathered responses from over 115,000 gay men from around the world and looked at a variety of factors, including how the respondents felt about the society's acceptance of gay people, how they felt about the way in which they personally were treated, and how satisfied they were with their own lives. The researchers then used this to create a ranking for which countries were the best for gay happiness.

As you might expect, in countries where gay rights are more of a thing, gay happiness is more of a thing. And in countries where gay people are oppressed and persecuted, gay men report being less happy. Huh. It's almost like knowing that your country doesn't see you as a fully equal human and worthy member of society has an impact on your emotional state.

For instance Russia, with all its anti-gay laws, doesn't do so well when it comes to the happiness of its male gay citizens. Neither, unsurprisingly, do any of the seven countries where you can be executed for being gay. The U.S., for our part, does a lot better, but we still only rank as number 26 on the list, though that does still put us on the "good" end of the spectrum. So hey, it's a start.

So what are the best countries in the world if you want to be a gay man and happy at the same time? Well, here are the top six.

6. Canada

AFP/AFP/Getty Images

5. Uruguay

PABLO PORCIUNCULA/AFP/Getty Images

4. Sweden

FREDRIK PERSSON/AFP/Getty Images

3. Denmark

AFP/AFP/Getty Images

2. Norway

AFP/AFP/Getty Images

1. Iceland

AFP/AFP/Getty Images

You can find more info about the global rankings here. And if anyone wants to start working up some numbers for the rest of the LGBT spectrum, that'd be great, too. I imagine they'd follow the same general pattern, but you never know...

Images: Getty (6)