According to this statistical model (done in 2014), the 10 best were: Jim Clark, Jackie Stewart, Ferndando Alonso, Michael Schumacher, Juan Fangio, James Hunt, Nico Rosberg, Sebestian Vettel, Alberto Ascari, and Niki Lauda were the ten best after accounting for the contribution of the car. The analysis uses comparisons with teammates as the main factor. Rosberg is there because he beat Schumacher and the model didn’t allow for Schumacher having declined massively in his comeback. Hamilton is not there because it was done before his recent dominance and he barely managed to beat Button and Rosberg, both of whom were much better than many people give them credit for. Still, very interesting that Senna and Prost didn’t make top ten. Senna dominated weak teammates, but struggled to beat Prost.
https://f1metrics.wordpress.com/2014/07/18/who-was-the-greatest-f1-driver/
Another methodology puts Senna and Prost in the top 10, but still with Clark number 1.
https://f1metrics.wordpress.com/2016/10/06/experts-versus-models-how-do-we-rank-drivers/