On August 13, in the 4 × 100-meter medley relay, Phelps ended his career with another gold medal, his 23rd at the Olympics and his 28th medal overall.