The 41-year-old winner of 20 Grand Slam titles has been out of action since a quarter-final loss at Wimbledon in 2021 before undergoing another bout of knee surgery.
Below are key dates in his career:
1998
Ranked 702, makes ATP debut in Gstaad, loses to Argentina’s Lucas Arnold Ker in straight sets.
2000
Reaches first ATP final in Marseille where he loses to compatriot Marc Rosset and also in his native Basel where Thomas Enqvist wins in five sets.
2001
Wins first ATP title in Milan but the highlight of the year is defeating Pete Sampras in five sets in the fourth round of Wimbledon on Centre Court. The win ends Sampras’ 31-match winning streak at the All England Club.
2002
Wins first Masters’ title in Hamburg and later in Vienna where he dedicates victory to his first coach Peter Carter, who died in a car accident two months earlier.
2003
Wins first Grand Slam crown at Wimbledon where he beats Andy Roddick in the semi-finals and Mark Philippoussis in the final. Ends the year with 78 match wins.
2004
Opens the year with the Australian Open title and ascends to the top ranking for the first time on February 2.
Loses to Rafael Nadal in Miami in the pair’s first meeting.
Defends Wimbledon title with victory over Roddick and claims maiden US Open by beating Lleyton Hewitt.
2005
Finishes number one for a second straight year with 11 titles, including two Grand Slams at Wimbledon and US Open.
First player since Don Budge in 1937-38 to win Wimbledon and US Open in back-to-back years.
2006
Finishes world number one for third straight year highlighted by an ATP-best 12 titles, including three Grand Slam crowns at Australia, Wimbledon and New York. Wins four more Masters.
Also the first player to reach all four Grand Slam finals in a year since Rod Laver in 1969.
At Monte Carlo, meets Novak Djokovic for the first time and wins the round of 64 clash.
2007
Ends the season as number one for a fourth straight year winning eight titles and three Grand Slams at the Australian Open, Wimbledon and US Open.
Defeats Nadal in Hamburg final for the first time on clay to break his rival’s 81-match winning streak on clay.
But at Roland Garros, loses in four sets for the second straight year to Nadal.
2008
Wins the fifth straight US Open but each of his runner-up showings come against Nadal at Monte Carlo, Hamburg, Roland Garros and Wimbledon in an epic final which went to 9-7 in the final set.
Wins Olympic doubles gold medal in Beijing with Stan Wawrinka.
2009
Federer wins Roland Garros for the first time and becomes the sixth man to win all four Grand Slam titles in his career. Then goes on to claim a 15th Grand Slam title at Wimbledon, where he collects his sixth crown.
Prior to claycourt season, he marries Mirka Vavrinec in his hometown of Basel.
At US Open, where he is a five-time champion, becomes the first player to surpass $50 million in prize money but loses the final to Juan Martin del Potro.
2010
Wins 16th major at Australian Open. In June, drops to number two in rankings having been number one for 285 weeks. At Wimbledon, the title defence ends in the quarter-finals at hands of Tomas Berdych.
2011
Loses to Djokovic in semi-finals in Australia, then beats the Serb in Roland Garros semis, ending Djokovic’s 43-match win streak.
Beaten by Jo-Wilfried Tsonga in Wimbledon quarter-finals and loses again to Djokovic in US Open semi-finals having held two match points.
2012
Breaks Pete Sampras’ record of 286 weeks at number one just after defeating Andy Murray for a seventh Wimbledon title.
2013
Only one title, on the grass at Halle and ends the year at six in the world.
Made semis at Australian Open, last-eight at Roland Garros before suffering an embarrassing second-round loss at Wimbledon to world 116 Sergiy Stakhovsky.
Fourth-round loss at US Open is the earliest exit in New York in 10 years.
2014
Wins first Davis Cup title for Switzerland with 3-1 victory over France in final.
Loses to Nadal in the Australian Open semis. At Roland Garros, loses to Ernests Gulbis in last-16 and is beaten by Djokovic in the five-set Wimbledon final.
2015
Wins six titles but loses five finals all to Djokovic at Indian Wells, Rome, Wimbledon, US Open and World Tour Finals.
His win in Brisbane final was his 1,000th career victory.
2016
Fails to win a title for the first time since 2000 and the season is compromised by left knee surgery in February which limits him to just seven tournaments.
2017
Wins 18th and 19th Grand Slam titles at the Australian Open and Wimbledon.
In Melbourne, becomes the second oldest Grand Slam champion at 35 behind Ken Rosewall at the 1971 and 1972 Australian Open.
2018
Becomes oldest world number one in the 45-year history of rankings at age 36 in February.
Extends Grand Slam title collection to 20 with victory over Marin Cilic in Australian Open final.
Loses in Wimbledon quarter-finals to Kevin Anderson despite holding a match point.
2019
Loses epic five-set Wimbledon final to Djokovic despite holding two championship points.
Just three minutes short of five hours, it’s the longest final in the tournament’s history and decided in a final set tiebreak.
2020
Reaches 15th Australian Open semi-final where he loses to Djokovic in their 50th meeting having saved seven match points to defeat Tennys Sandgren in last-eight.
Shuts down season in midst of the Covid-19 pandemic where he undergoes two knee surgeries.
2021
Withdraws from French Open after the third round and suffers shock quarter-final exit at Wimbledon to Poland’s Hubert Hurkacz.
Withdraws from Tokyo Olympics.
2022
Announces he will retire after the Laver Cup.