He was ranked # 1 in the world from April 2006 to January 2007 , and had the second highest Elo rating of all time ( 2813 ) . He was ranked # 1 in the world from April 2006 to January 2007 , during which his Elo rating was 2813 , which had been surpassed only by Garry Kasparov , and subsequently by Magnus Carlsen and Anand .