Nelson Mandela, mourned by millions globally this week, is only rated as the 356th most important person in history by a new internet based programme which ranks the most important 2,000 people of all time.

The first black South African president did not make the historical top 50 which was topped by Jesus, followed by Napoleon at two, Prophet Mohammed at three and Shakespeare coming in fourth.

As reported by the Sunday Times, co-author of this programme, Steven Skiena, professor of computer science at Stony Brook University in New York, backed Mr Mandela’s low entry as he is only four slots ahead of Mustafa Kemal Ataturk, founder of modern Turkey:

“In the long term that is probably a fair ranking.

“Both men could be viewed as founders of their respective nations and therefore of similar significance in the long term.”

The software programme collates millions of opinions in a similar manner to Google’s ranking of web pages.

The innovative step is a “reputation decay algorithm” which attempts to chart how the significance of a person changes after 200 years.

This formula is the brainchild of Google engineer and computer scientist Charles Ward and aims to prevent less impacting personages such as Britney Spears being positioned too highly.

Ms Spears, who holds a current significance rating of 27th but after the decay algorithm is applied drops to a lowly 689th after the passage of 200 years, is taken into account in regards to her stardom.

Long-term fame is calculated by the programme by an equal measure of celebrity and gravitas.

Ward and his colleagues decided that it does not matter whether they are notable for contribution is to mankind or because of their stardom but simply that their fame has a long-lasting quality.

Baroness Thatcher is ranks above Mr Mandela at 271 with current UK Prime Minister, David Cameron languishing at 1,483.

The software has been attacked by historians such as Anthony Beevor.

“The idea that you can create an algorithm that is somehow going to give you a scientific approach to history is preposterous.”