Michel Phelps is insisting that he won't change his mind about retiring after the Rio Olympics.

The great American swimmer made that abundantly clear on Friday after winning the 27th Olympic medal of his career, a three-way dead-heat silver in the men's 100 metres butterfly.

"No," he said as the question was still leaving the journalist's lips, a succession of further 'no's following in close succession.

"Done. (South African co-silver medallist) Chad (Le Clos) asked me in the award area and the Dwyers were chanting 'four more years'.

"They did the same thing in London. The 800 free relay guys said four more years ... No. I am not going four more years.

"And I'm standing by that.

"I've been able to do everything I've ever put my mind to in this sport. And 24 years in the sport. I'm happy with how things finished."

Phelps said in 2012 he was retiring but he came back for one last hurrah after feeling he wanted to bow out on his own terms.

That meant winning back the men's 200m butterfly title that Le Clos took from him four years ago, and he declared 'mission achieved' on that last Wednesday.

He has won four golds and a silver in Rio so far, taking his tally to 22 golds, and is not finished completely yet even if Friday was his last individual race. The 4x100 medley relay on Saturday will be his final farewell.

After that, Phelps will hang up his cap - not the one he ripped in half before the 4x200 freestyle relay - and spend more time with his loved ones.

"Being able to close the door on this sport how I want to, that's why I'm happy now,.

"I'm ready to retire. I'm happy about it. I'm in a better state of mind this time than I was four years ago. And yeah. I'm ready to spend some time with (baby son) Boomer and (fiancee) Nicole."

With team mate Anthony Ervin winning the 50 freestyle gold on Friday at the age of 35, 16 years after he first won it, there will always be those who wonder if the 31-year-old Phelps might do another tumble turn and turn up in Tokyo in 2020.

"I will be in Tokyo. But I won't be competing in Tokyo.