Throughout the world and across various different cultures, it's often assumed atheists are untrustworthy and lack the same guiding principles as those who believe in a god of some kind.

In 2020, an international survey spanning six continents found 45 percent of people think it's necessary to believe in a god to be moral and have good values.

But a new study suggests there's little truth to that stereotype, however firmly it's believed (sometimes even by atheists themselves).

While moral values somewhat differ between those who are religious and those who are not, psychologist Tomas Ståhl has found both groups possess a moral compass.

"Disbelievers do have a moral compass," explains Ståhl, who works as a social psychologist at the University of Illinois, Chicago.

"However, it is calibrated somewhat differently than that of religious believers in some respects, but not in others."

Ståhl's research includes four online surveys and spans two countries: the United States, where religious belief is the norm, and Sweden, which is one of the most secular nations in the world.

The first two studies were focused on the personal histories, beliefs, values, and political orientations of 429 Americans, while the final two studies compare responses from 4,193 respondents in the US and Sweden.

In the end, both groups scored equally low on amoral tendencies when asked to agree or disagree with statements such as "I am willing to be unethical if I believe it will help me succeed."

What's more, nearly everyone surveyed in all four studies rated morals that protect the individual, such as fairness, liberty, and protection from oppression, in a similar and significant way. Religion aside, most people tend to agree with the statement that "Society works best when it lets individuals take responsibility for their own lives without telling them what to do."

Interestingly, religious people and atheists both considered rational thought an important value, although atheists were more likely to be skeptical, analytic thinkers.

Only when it came to morals that protect the group did religious people truly differ. Those who believe in a god, for instance, tend to rate loyalty to the group, respect for authority figures, and the sanctity of their actions much higher.

"In both the US and Sweden, people who do not believe in God have similarly strong moral concerns as religious believers about not harming vulnerable individuals, and about fairness," Ståhl says.

"However, religious disbelievers were less inclined to view values that promote group cohesion – such as ingroup loyalty, respect for authority, and sanctity – to be relevant for morality."

This makes sense as some people argue the function of religion is to create a highly cohesive community, and those who are more exposed to the perks of this community are more likely to adhere to values that serve the group.

It's hard to draw firm conclusions from correlations in this study, but Ståhl argues his findings suggest fear is another factor that drives people to religion. Religious people in both Sweden and the US seemed to think of the world as a more dangerous place, and this fear was associated with a higher rating for moral values that protect the group.

Atheists, however, are focused on the individual and are less likely to think an action is inherently right or wrong. Instead, they tend to engage in consequentialist moral reasoning, which means they are more likely to judge an action based on the harm that it brings about on a case-by-case basis.

In fact, this more relative view of morality may be why atheists have the reputation of being immoral. In a hypothetical situation, Ståhl told Live Science atheists are more likely to sacrifice one life for the greater good, and this could be seen as reprehensible to others.

"It is worth noting that moral character evaluations of people who make decisions based on consequentialist (vs. rule-based) principles are more negative, because consequentialists are perceived as less empathic," Ståhl notes in his paper.

"In the light of such findings it seems plausible that atheists' inclination to rely on consequentialist principles, along with their weak endorsement of the binding moral foundations, may to some degree have contributed to their reputation as lacking in moral character."

Other research suggests people distrust atheists because they worry that without divine punishment, a non-believer won't adhere to their ethical compass, if they have one at all.

The current surveys were unable to determine whether atheists or religious people actually behave in a way that lines up with their self-purported values, but the results help explain why atheists have garnered the reputation they do – deserved or not.

In the future, Ståhl hopes similar research will be done in non-western countries that are simultaneously less religious and more group-oriented to see whether or not these new findings hold up in other cultures.

The study was published in PLOS ONE.