The "Friends" stars are 11th cousins, researchers at the online genealogy website MyHeritage have found.
They discovered that Perry and Cox share distant relatives William Osbern Haskell III and Ellen Haskell, who were married and lived in England around 500 years ago, the company told CNN.
Ellen and her two sons emigrated from England to America in 1635. One son, Roger, is a direct ancestor of Courteney, and the second son, William, is a direct ancestor of Matthew, they said.
The connection is made through Cox's mother, Courteney Copeland, and Perry's father, John Bennett Perry.
Perry and Cox portrayed one of the most-loved couples in sitcom history. Their characters, Chandler Bing and Monica Geller, got together halfway through "Friends"' 10-year run, married in season seven and became parents in the show's final episode.
"My eyes! My eyes!" Phoebe Buffay screamed when she discovered they were in a relationship; a response that became one of the show's most famous scenes, and which appears even more apt given the actors' real-life connection.
"We went into this line very deeply, we checked every name. We found a lot of records that support it, and we have confidence that they are related," Roi Mandel, the head of research at MyHeritage, told CNN.
But while discovering the pair's link took a significant amount of research, it is not especially unusual.
"This is not such a surprise. It makes sense that when you go so many generations back, the chances of people being connected are higher," Mandel said.
To find the connection, the company used various databases containing billions of historical records, including birth and death certificates.
It also found that both actors are distantly related to the singer Lady Gaga.
The "Friends" cast have reunited for a one-off special program, set to air on HBO Max on Thursday. (HBO and CNN share a parent company, WarnerMedia.)
Cox told "Good Morning America" this week that the experience of being back on the show's old set "was so emotional that we just started crying."