That is a question of definition. As aoluain already pointed out, it depends on what. The most titles, the most Grand Slams, the longest time at number 1 and so on. I find it difficult to give an answer to that. Every generation has its favourite player.
According to this list, Djokovic has been number 1 for the longest time.
https://www.ultimatetennisstatistics.com/record?recordId=WeeksAtATPNo1
But it does not mean to me that he is my number one.
Boris Becker, for example, was number 1 for only 12 weeks, but he still left his mark on an entire generation. That is why he would be higher ranked in my personal list than, for example, Pete Sampras.
It is always a popular talk to determine the GOAT but as you say, how do you define it? For me, there is no doubt that Federer is the greatest of all time; his natural raw talent, his technique, overall game, ... are too me unmatched even if other people has won more titles or grand slams.
Its hard to disagree with you but how are you basing this? Talent has to show results which
would put many others ahead of him IMO.
Here is another - Player who spent the longest at #1. Navak Djokovic with 373 weeks.
https://en.m.wikipedia.org/wiki/List_of_ATP_number_1_ranked_singles_tennis_players
Anyone following the tournament at Sofia Bulgaria?
Sonego is in attendance, I wonder how he will fair out after his recent win?