Think Benedict Cumberbatch couldn’t be any more perfect for the role of Sherlock Holmes?

Well, his casting could be even more elementary than you thought – genealogy detectives have discovered that he is distantly related to the author who created the iconic character more than a century ago.

Benedict, 40, and the late Sir Arthur Conan Doyle, who died in 1930, were 16th cousins, twice removed, according to the website Ancestry.com.

SherlockBenedict in the new series of Sherlock (BBC)

The site’s researchers love both the series and historical puzzles, said spokesman Dallin Hatch, but haven’t told the actor of the connection.

Doyle and Benedict’s common ancestor was John of Gaunt, the duke of Lancaster and the fourth son of King Edward III of England, who lived in the 14th Century. John of Gaunt was Doyle’s 15th great-grandfather and Benedict’s 17th great-grandfather.

Sir Arthur Conan DoyleSir Arthur Conan Doyle created Sherlock Holmes (PA)

Lisa Elzey, family historian at Ancestry, said: “Making family history connections is similar to piecing together a mysterious puzzle, one that the great Sherlock Holmes himself would be intrigued to solve.”

Sherlock and sidekick John Watson, played in the BBC series by Martin Freeman, came to life in a novel written in 1890, and were featured in dozens more detective stories.