In a world of 6.6 billion people, it does seem hard to believe. The theory of six degrees of separation contends that, because we are all linked by chains of acquaintance, you are just six introductions away from any other person on the planet.

But yesterday researchers announced the theory was right - nearly. By studying billions of electronic messages, they worked out that any two strangers are, on average, distanced by precisely 6.6 degrees of separation. In other words, putting fractions to one side, you are linked by a string of seven or fewer acquaintances to Madonna, the Dalai Lama and the Queen. The news will come as no surprise to film buffs who for years have been playing the parlour game Six Degrees of Kevin Bacon, in which they link other actors to Bacon in six films or fewer.

Researchers at Microsoft studied records of 30 billion electronic conversations among 180 million people in various countries, according to the Washington Post. This was 'the first time a planetary-scale social network has been available,' they observed. The database covered all the Microsoft Messenger instant-messaging network in June 2006, equivalent to roughly half the world's instant-messaging traffic at that time.

Eric Horvitz and fellow researcher Jure Leskovec considered two people to be acquaintances if they had sent one another a message. They looked at the minimum chain lengths it would take to connect 180 billion different pairs of users in the database. They found that the average length was 6.6 hops, and that 78 per cent of the pairs could be connected in seven steps or fewer. But some were separated by as many as 29 steps.

The researchers wrote: 'Via the lens provided on the world by Messenger, we find that there are about "seven degrees of separation" among people.'

Horvitz told the Post: 'To me, it was pretty shocking. What we're seeing suggests there may be a social connectivity constant for humanity. People have had this suspicion that we are really close. But we are showing on a very large scale that this idea goes beyond folklore.'

A 'degree of separation' is a measure of social distance between people. You are one degree away from everyone you know, two degrees away from everyone they know, and so on. The concept was popularised by John Guare's 1990 play, Six Degrees of Separation, which was turned into a film starring Will Smith, Stockard Channing, Donald Sutherland and Ian McKellen. One of the characters says: 'I read somewhere that everybody on this planet is separated by only six other people. Six degrees of separation between us and everyone else on this planet. The President of the United States, a gondolier in Venice, just fill in the names. I find it extremely comforting that we're so close. I also find it like Chinese water torture, that we're so close because you have to find the right six people to make the right connection ... I am bound, you are bound, to everyone on this planet by a trail of six people.'

Then in 1994 students at Pennsylvania's Albright College invented the game Six Degrees of Kevin Bacon, in which the challenge was to connect every film actor to Bacon in six cast lists or fewer. Bacon thought the joke would die out, but when it didn't he launched a website, sixdegrees.org, bringing together people interested in helping good causes. He said: 'I thought it was definitely going to go the way of eight-track cassettes and pet rocks. But it's a concept that has sort of hung around in the zeitgeist.'

Attempts to prove the theory stretch back further and keep coming up with six or thereabouts. In a 1969 study, researchers Stanley Milgram and Jeffrey Travers asked 296 people in Nebraska and Boston to send a letter through acquaintances to a Boston stockbroker. Only 64 of the letters reached the stockbroker. Of those letter chains that were complete, the average number of degrees of separation was 6.2.

In 2003 researchers at Columbia University in New York experimented using the internet as the ultimate laboratory of the connected world. More than 24,000 volunteers tried to send an email via acquaintances to one of 18 target people in 13 countries, including a police officer in Australia, a vet in the Norwegian army and a professor at an Ivy League university in America. Only 384 of the chains were completed, using an average of four steps. But the researchers estimated the average length in all the chains was between five and seven steps. Facebook, the online social network, has a 'six degrees' application to test the theory through the connections of Facebook users. That may reduce a degree or two: Barack Obama already has well over a million Facebook friends.