Tom Hanks bears a shocking resemblance to children's television star Fred Rogers, who he plays in the upcoming film "A Beautiful Day in the Neighborhood." But the similarities are more than just good casting — the performers are actually related, according to a discovery made by Ancestry.com.

Hanks is sixth cousins with Rogers, and they share the same great-great-great-great-great grandfather, Johannes Mefford, a company representative told CBS News. The company utilized its database of over 20 billion online historical records to form Hanks' family tree, the representative said.

The star and his wife, fellow actor Rita Wilson, appeared to learn of the news for the first time while speaking with Access Hollywood at a New York City screening of the upcoming film Monday. "No. Impossible. No, you're pulling our leg," said a shocked Wilson.

After the outlet revealed the family tree, Hanks and Wilson came around to the news. "It all just comes together, you see," said Hanks.

MORE NATIONAL NEWS: