It is hard to predict how long can Federer stay on top in this year.
Djokovic has good chance to back No.1 in end this year. To do it, firstly he has to defence all points he got start now to US open. That is 3600 points. Then, he can go to Beijing Open and Shanghai Open to gain free point because he is injured and pulled out. The the last three tournaments Swiss Indoor, Paris Master, ATP World Final, he didn't do well. Federer has 3000 points to defence in these tournaments, and he has 560 points.
I will be very surprised to see Federer finish end of this year as World No.1 and tie Sampras record.