Before the Industrial Revolution in the United States, Canada and Europe, you might have ended up married to a fourth cousin. People didn’t travel far to find a spouse, and the closer you were to home, the more likely it was you’d marry within your family.

Then, in the late 19th century, something changed, and people stopped marrying their cousins.

It has been conventional wisdom that Europeans and North Americans married more outside their families as geographic dispersal ramped up between 1825 and 1875, with the advent of mass railroad travel. But over the same period, the genetic relatedness of many couples actually increased. It wasn’t until after 1875 that partners started to become less and less related.

This 50-year lag might indicate that shifts in social norms played a bigger role than geographic mobility in getting people to wed outside their bloodline. It’s also just one example of the insights that can be gleaned from the world’s largest, scientifically-vetted family tree, presented in a study published on Thursday in Science.

Compiling and validating 86 million public profiles from Geni.com, a genealogy-driven social media site, the authors generated 5 million family trees. The largest tree consisted of 13 million people, spanned an average of 11 generations and included both Sewall Wright, a founder of human population genetics, and the actor Kevin Bacon (the two are separated by 24 degrees, in case you were wondering).