Interesting list. All the longest serving captains bar one; behind Ganguly with 49 Tests, Gavaskar and Azharrudin with 47 each is...
http://content-usa.cricinfo.com/india/content/player/32222.html
ok so that shock out of the way, let's get out the abacus
Ranked by Test wins (ties broken by percentage)
Sourav Ganguly 21
Mohammad Azharuddin 14
Sunil Gavaskar 9
Rahul Dravid 8
Bishen Singh Bedi 6
Ajit Wadekar 4
Kapil Dev 4
Sachin Tendulkar 4
Dilip Vengsarkar 2
MS Dhoni -
Knowing that Ganguly, Azharuddin and Gavaskar each captained a similar number of matches, Dada owns the test crown so hard there's no reason to delve deeper. His win percentage is over 40 and his tenure was longer than any other. Some captains can claim to have lost less; and to be fair, winning a series 1-0 is technically better than losing 2-3; but Ganguly still didn't lose too many.
Ranked by ODI wins
Mohammad Azharuddin 89
Sourav Ganguly 76
Rahul Dravid 42
Kapil Dev 40
Sachin Tendulkar 23
Sunil Gavaskar 14
Dilip Vengsarkar 8
Bishen Singh Bedi 1
MS Dhoni 1
Ajit Wadekar 0
It's a slightly different arrangement, with the previous front-runners cycling and a few players with quite a few wins showing up. The top four are also four of the five (the fifth being stand-in captain Ajay Jadeja) to have won more than they lost for India.
Ranked by ODI win percentage
Kapil Dev 54.05%
Rahul Dravid 53.16%
Sourav Ganguly 51.70%
Mohammad Azharuddin 51.15%
It's ever so tight, but Kapil Dev, in addition to that World Cup win, was also India's most reliable ODI captain. Many would say there were foibles to Ganguly's ODI planning, slow over-rates being very notable, but he did nevertheless maintain a tidy career. The numbers say he was arguably the most successful, but given the right players anyone with common sense can get good results; the 'best' captain for your own criteria might be another story.