Eighteen gold medals later, Michael Phelps retired from competitive swimming on Saturday after one last race. The American team won gold in the men’s 400-meter medley relay for Phelps’s final Olympic event, and the crowd rose in a standing ovation. “I couldn’t ask to finish on a better note,” Phelps said. “I have done everything I wanted to do. I am very happy.” He was presented with a lifetime-achievement award to add to his collection of a record-breaking 22 total medals, with four golds from the London 2012 Games, not to mention a personal Tweet from Barack Obama.