Lots of comments here from people who KNOW NOTHING about swimming and yet insist they have a valid opinion. I don't know who the "greatest athlete in history" is, but the disrespect to Phelps and his accomplishments are incredibly ignorant.
1. "Swimming is a niche sport" - compared to what? American football is basically only played in the US, surely that's more niche than swimming? How many word-class competitive runners are there in the world, surely swimming is roughly on that level?
2. "There are too many events in swimming, Phelps had more chances to win." - this argument is often repeated and always wrong. Phelps was competing against specialists in each event who only had that one event to swim, and he STILL won. Middle distance, he won. Sprints, he won. Medleys, he won. Strokes, he won. His only constraint in winning was the scheduling of meets, he literally could swim every event. Phelps was world class in every single event he put his mind to, INCLUDING the 100 free (watch him lead off the Beijing 2008 4x100 if you doubt). It's extremely unlikely anyone will ever replicate Phelps' comprehensive mastery.
3. No Lochte was not better. Phelps beat him in basically every head to head competition they had, and Lochte is likely the second greatest male swimmer of all time. No Ledecky is not better, Ledecky is really only world beating in middle and long distance free.
4. "Swimming is easy" - get in a pool, my friend. Talk is cheap. Let's see you get through a 10k session with even a high school team, you woudn't even finish the warm up. I swam through college, ran xc and I have raced bikes since the early 90s. Swimming is f$%^ing brutal. It's a bit unique in that you add oxygen deprivation to maximum exhertion: you can't just breathe whenever you want. Coming off the wall and doing an underwater on the last turn of a 200 back is essentially drowning yourself, incredible pain. To reach a world class level in swimming, you have to 100% dedicate yourself to a swim/eat/sleep lifestyle for years. I have tremendous respect for world class runners and cyclists as I know what that takes (and I'm not even in the same galaxy). Likewise, I have tremendous respect for world class swimmers.
5. "Spitz did it before Phelps" - please. Spitz was swimming in a different era, when the level of competition was far lower. Spitz basically only dominated in Munich, Phelps was great for several cycles. Phelps was far more versatile and won in a much broader range of events. Spitz was great for his time, but he's not comparable to Phelps.