What’s more important, a long life or a happy life?

Both, you say? Your optimism is touching, but the data says it’s not necessarily the case. A new, comprehensive study of nations around the globe from insurance marketplace Compare the Market found that happiness doesn’t even rank in the top 10 factors associated with a long life. And stuff like employment and clean air don’t matter much either.

Compare the Market pulled data from a variety of global sources like Credit Suisse, the World Health Organization, and Geoba.se, looking at everything from adult literacy rates to environmental cleanliness to education. It found which factors had the biggest impact on long life, and which didn’t matter much. Here are the factors that contribute most to life expectancy, as well as some other notable tidbits from the data.

1. Nutrition

Though you may be reading this while shoveling a freshly delivered order of pork nachos into your mouth, it’s probably no surprise that nutrition had the highest correlation to long life. Nordic countries whose diets consist mostly of coldwater fish and vegetables rated highest on the nutrition index, with Finland and Iceland taking the top two spots. Right behind them were Cyprus and Italy, two countries who subscribe wholeheartedly to the Mediterranean diet. And, yes, that includes bread and wine.

Nearly all of the top-rated countries for nutrition had life expectancies over 80, with Italians living 82 years on average, and the Finnish and Icelanders a smidge over 80. African countries dominated the bottom half of the survey, with every country in the bottom quartile coming from that continent. The United States ranked 37th, right between Hungary and seafood-heavy Portugal.

2. Environmental quality

The cleanest environment in the world? That’s Switzerland, a painfully obvious fact to anyone who’s ever cruised the country by rail. The Swiss were followed in environmental rankings by Sweden (81.76 years), Spain (81.83 years), and the UK. (80.88 years). Densely populated Europe dominated the category, and with the exceptions of Australia and Japan, all countries in the top 20 were European.

The low end of the spectrum didn’t show quite the same correlation, with spots like Bangladesh rating 115th but still boasting an average life expectancy over 72. Afghanistan had the worst-rated environment but still a life expectancy 10 years longer than next-to-last Central African Republic. The US was 34th, between Poland and Lithuania.

3. Access to information

If you never thought a free and open society was key to a long life, look no further than this survey where access to information was the third-most correlated factor to life expectancy. Once again, Scandinavia topped the category with Norway, Denmark, and the Netherlands offering the most access. With the exceptions of Estonia and Denmark, every country in the top 15 had a life expectancy over 80. And though America prides itself on giving its people access to knowledge, it actually ranked 29th, four spots behind Canada, and trailing behind Japan, Costa Rica, and nearly all of Europe.

There are a few surprises further down the list, as Saudi Arabia places smack in the middle of the pack at 76th. Mexico rated disappointingly low at 90th. And despite a life expectancy of over 82 years, Italy was one of the lowest countries in Europe at 42nd.

4. Wealth

The theory that rich people live longer is not far off, as countries with the most overall wealth per capita also tended to have the highest life expectancy. Iceland topped the list, no doubt capitalizing on charging unwitting tourists $12 a beer to the tune of $587,649 per person. The 20 wealthiest countries each had a life expectancy over 80 with one exception, the good ol’ US of A where we only live an average 79 years — though we can blame most of that on people doing ill-advised things with alligators in Florida.

Interestingly, only about half of the countries surveyed offered information for wealth per capita, but all of them had life expectancies over 75 years. That includes Syria, who, despite an average net worth of $1,122, still has a life expectancy of 76 years.

5. Adult literacy

Adult literacy rankings are led by countries from Eastern Europe and Central Asia, with Uzbekistan, Latvia, Estonia, Lithuania, and Azerbaijan rounding out the top five. The 20 most literate countries in the world are all from the former Soviet Union with one exception — Cuba.

Though one might think literacy plays a huge role in life expectancy, the Soviet bloc skews the correlations, as countries with poor nutrition and environment bring down highly literate nations’ life expectancy. Uzbekistan, for instance, boasts nearly a 100 percent literacy rate but has a life expectancy of just over 71. Lithuania is just over 74 years. The US has a literacy rate of around 86 percent.

6. Happiness

Anyone who’s ever had a miserable old uncle who somehow lived to 103 knows happiness does not equal longevity. Not to say anger makes you live longer, but the correlation between happiness and lifespan is minimal as only the Australians and very polite Canadians ranked in the top 12 for both. None of the 10 happiest countries in the world (led by Norway) ranked in the top 10 for life expectancy, and two countries — Costa Rica and Denmark — both dipped below 80 while still nearing the top of the happiness ranks.

The US, for all our concern over social media making us miserable, still placed a respectable 18th, between the UK and Luxembourg. Syria was the least-happy country in the world, which is fairly understandable.

7. GDP/capita

Don’t let your boss tell you productivity is the key to long life. Among the most financially productive countries in the world, only Singapore ranked in the top 10 for lifespan, with a GDP of $57,714 per person (8th), and a life expectancy of 85. City states seemed to dominate the productivity/longevity spectrum, with San Marino also rating highly with $49,664 per person (12th) and a life expectancy of 83. The US was 7th in GDP, at $59,531 per person.

8. Air pollution

The cleanest air in the world is in…Brunei? Yep. Though Hollywood celebs may have issues with the Sultan, this Southeast Asian country is tied with Kiribati, New Zealand, and the Solomon Islands with only five micrograms of median fine parts of particle matter per cubic liter of air. The South Pacific and Oceania owned the clean-air ratings, taking all spots in the top seven. Canada and Scandinavia rounded out most of the top 15. Interestingly, Liberia has the same air quality as Iceland at eight micrograms per cubic meter. That’s the same as the United States as well.

Clean air, though healthy, was not specifically correlated to long life at all, with Australia and Canada the only countries ranking highly for both. The dusty, dry Middle East boasts the dirtiest air in the world, with Qatar ranking dead last at 103 micrograms. The UAE and Kuwait were just above.

9. Employment

Kids living in your parents’ basement take note: You don’t need a job to live a long time. And isn’t your long-term survival way more important than silly stuff like “paying rent”? Being employed was almost negatively correlated with living a long life, as African countries like Rwanda (85 percent employment, 67 years), Madagascar (84.9 percent employment, 66 years), and Tanzania (81.5 percent, 65.5 years) topped the list of highest employment in the world.

Now, this may sound odd until you consider this figure reflects the total number of people working in a country, unlike US unemployment numbers that look only at those of working age who are looking for work. So countries where, for example, children and the elderly work full-time may end up with shorter life expectancies. And countries like the US, Germany, and Australia, where under 60 percent of all people are working, still have life expectancies nearly a decade longer.

10. Social factors

Compare the Market also examined a number of other societal factors and how they correlated to long life, though none showed enough significance to merit mentioning. Among them, the least-important factors were tolerance of immigrants, availability of affordable housing, and political rights. A bit of a blow to anyone who supports Amnesty International, but at least it seems living in an oppressive, intolerant regime means you’ll be around longer to enjoy it?

Other factors included tolerance to the LGBTQ+ community, where the Netherlands was first and Senegal last; gender parity in secondary enrollment, where African countries sandwiched the list with Lesotho and South Africa atop the list, and Chad and Somalia at the bottom; and years of tertiary schooling, led by South Korea, Russia, and the United States, with Mozambique and Malawi last.