The Legend of Michael Phelps

After 16 years, five Olympics and six world championships, Michael Phelps' career has finally drawn to a close. Or so he insists. But to put his jaw-dropping accomplishments into perspective, you have to dig a bit deeper. Phelps was born with a gift and worked tirelessly to maximize its potential.

"I want to be able to look back and say, 'I've done everything I can, and I was successful,'" Phelps told ESPN before the Olympics. "I don't want to look back and say I should have done this or that."

He is without question the greatest swimmer who ever lived, and arguably the greatest athlete of our generation, as well. The latter might be up for debate. What isn't in question is the utter dominance with which he performed. From a teenage boy to a grown father, it didn't matter. Here's a look at just some of the staggering numbers Phelps leaves behind.

The Phelps medal haul

Phelps leaves the pool with a record 23 gold medals in 30 Olympic races. Here is a breakdown of what he won and when:

Michael Phelps won races ... by a lot

Phelps (and others) hinted throughout the week that the 2016 Olympics might be the end of his competitive swimming career, and he made it official after his final race here Saturday night. Either way, Phelps leaves Rio as the most decorated Summer Olympics athlete in history. And while a few of his races over the years have been close (that 0.01 edge in the 100 butterfly in Beijing, anyone?), Phelps' average margin of error has been impressive.

* As of Aug. 11

Waterlogged

All of those races and victories come with a lot of training and time in the pool. *-According to a breakdown by North Baltimore Aquatic Club high-performance director Keenan Robinson, Phelps has logged more miles than you'd travel on a one-way flight from Rio to Sydney, Australia.

If Phelps were a country ...

The swimmer has so much hardware, he outranks most countries in swimming gold medals alone: United States (247), Australia (60), East Germany (38), Hungary (28) and Phelps (23). But here is where his 23 golds overall stack up against the world.

* Phelps is tied for 37th overall with South Africa.

One final thought ...

For the first time in his life, the Olympic experience wasn't all about winning?-- it was the process of getting there. Which is why those close to Phelps are optimistic that the next chapter of his life will be far brighter than it might have once looked.

Additional reporting by ESPN Stats & Information.