Long life spans tend to run in families, a phenomenon that's often attributed to people's genes. But now, a large new study of data from the genealogy website Ancestry reveals that genetics may play less of a role in life span than previously thought.

The reason? Previous studies failed to take into account a quirk of human relationships: that people tend select romantic partners with similar traits to their own. The findings mean that previous studies may have substantially overestimated the heritability of life span, the researchers said.

The study was published in today (Nov. 6) in the journal Genetics. It was funded by Calico Life Sciences, a research and development company owned by Alphabet Inc. (Google's parent company) whose mission is to understand the biology of aging. [7 Ways the Mind and Body Change With Age]

"Assortative mating"

In a given population, people will vary in a number of ways; they'll have different heights, eye colors and, yes, life spans.

Heritability is a measure of how much of the variability in a given trait, such as life span, is explained by variability in people's genes, in contrast to environmental factors such as healthy eating or exercise. Previous studies have estimated that the heritability of life span is as high as 30 percent.

In the new study, the researchers analyzed information from more than 400 million people using publicly available family trees from Ancestry. Because the researchers needed to know the life span of these individuals, the study looked at only those who were born in the 1800s or early 1900s and were deceased. (Before sharing this data, Ancestry removed all identifiable information from the family trees.)

An initial analysis revealed that, when comparing the life spans of siblings and first cousins, the heritability of life span appears to be around 20 to 30 percent — similar to what's been found previous studies.

But the life spans of spouses also tended to be similar. This could be due to spouses sharing a similar environment, the study said. Because they live in the same household, they may share many nongenetic factors, from diet to sleep habits, that could influence life span.

But then the researchers noted something curious: They found that even siblings-in-law and first-cousins-in-law had correlated lifespans, despite not generally living in the same household or being blood relatives.

But if they didn't share a close family history or a similar environment, why did remote and non-blood relatives also have linked life spans? The large data set allowed researchers to examine the effect of what's called assortative mating, the phenomenon in which people tend to select spouses who are similar to themselves. If assortative mating was at play, it would mean that factors that are important for life span tend to be similar among spouses, Graham Ruby, lead author of the study and a principal investigator at Calico Life Sciences, said in a statement.

Indeed, the researchers found that this was the case, and when they accounted for assortative mating, the heritability of life span dropped to 7 percent.

However, the study is not saying that people select a mate based on their life span, as that would be impossible, Ruby said. "Generally, people get married before either one of them has died," Ruby said jokingly.

But other factors could be at play, including both genetic and nongenetic variables. For example, if wealth is tied to life span and wealthy people tend to marry other wealthy people, this could make life span appear to be more heritable than it really is, the researchers said. Or if height — a trait that is partly influenced by genetics — is linked to life span and tall people tend to marry other tall people, then this would also muddle the analysis of the heritability of life span.

However, the findings don't mean that there aren't genes for longevity. The study focused on the heritability of life span on a population level and did not look specifically at people's genomes. Previous studies have found a link between certain genes and a long life.

Originally published on Live Science.