Greed might not be so good if you hope to make money and pass on your genes. According to new research published in the Journal of Personality and Social Psychology, selfish people tend to have fewer offspring and lower incomes than their less selfish counterparts.

“In research on human cooperation and its evolution it is often taken for granted that selfishness pays,” said study author Kimmo Eriksson of Stockholm University.

“When I realized — in my hotel room at a conference about social dilemmas in Zurich in 2013 — that this could be tested using existing large publicly available datasets, I was so excited I couldn’t sleep that night.”

The researchers analyzed data from the General Social Survey, the European Social Survey, U.K. Household Longitudinal Study and the Panel Study of Income Dynamics. Combined, the four studies included information from nearly 60,000 individuals.

People who engaged in behaviors like offering one’s seat on a public transportation, donating to charity and spending time volunteering were considered more prosocial, while those who didn’t were considered more selfish.

The researchers found that prosocial people tended to have higher fertility rates and higher incomes than selfish people. However, the least selfish people did not tend to have the highest income levels. The largest incomes were found among moderately prosocial people.

A survey of 400 adults conducted via Amazon’s Mechanical Turk found that people believed that prosocial individuals had better relationships and well-being. But people also believed that selfish individuals had better physical health and higher incomes.

“There are two main findings. First, unselfish people have the greatest number of children. Second, moderately unselfish people have the highest incomes. We know from questionnaires that most people will have the correct intuition about the first finding, but incorrectly believe that selfish people have the highest incomes,” Eriksson told PsyPost.

“We obtained our results both in European and American data, and both in cross-sectional and longitudinal analyses (i.e., those who were more generous at one point in time tended to have a higher increase in income and number of children in the years after). Thus, the findings seem quite robust,” Eriksson added.

“The question that still needs to be addressed is why selfishness is bad for fertility and income. Unselfishness helps you to build stronger social relations, and it seems plausible that this accounts for better outcomes in other respects. However, this hypothesis cannot be tested in our data.”

The study, “Generosity pays: Selfish people have fewer children and earn less money“, was authored by Kimmo Eriksson, Irina Vartanova, Pontus Strimling, and Brent Simpson.