2012 Roger Federer tennis season
Roger Federer's 2012 tennis season officially began on 2 January with the start of the 2012 ATP World Tour. Federer began the year with a semifinals finish at the Australian Open after a four-set loss to archrival Rafael Nadal. He recovered from his loss with three consecutive titles at the ABN AMRO World Tennis Tournament, the Dubai Duty Free Tennis Championships, and the BNP Paribas Open. He won his fourth title at the Mutua Madrid Open on blue clay, becoming the only person to win a title on blue clay in ATP history. By doing so, he regained the #2 ranking from Rafael Nadal At the French Open, Federer played four tough matches before he was ousted by Djokovic in the semifinals.

The highlight of Federer's season came at the 2012 Wimbledon Championships, where he made a dramatic comeback at two sets down in the third round Julien Benneteau and carried momentum from his win to win a seventh Wimbledon title over native British favorite Andy Murray, in the process tying Pete Sampras's record of Wimbledon titles and clinching his record-setting seventeenth Grand Slam. His win at Wimbledon also saw him return to the World No. 1 ranking, and saw him breaking Sampras's record of weeks at World No. 1. Federer went on to win his first Olympic singles medal at the 2012 London Olympics, winning silver.

Federer then won his third Masters 1000 title of the season and his twenty-first overall at the Western & Southern Open. He was upset in the quarterfinals of the US Open by Tomáš Berdych. Federer finished his season at the ATP World Tour Finals, where he lost to Djokovic in a tight final. Federer ended his season with six calendar titles, a Grand Slam title, 3 Masters 1000 titles and an Olympic silver medal. Federer also represented Switzerland in the Davis Cup, and helped Switzerland to advance to the 2013 Davis Cup World Group.

The 2012 season was a return to form for Federer. He had his most match wins (71) since 2006, and his highest winning percentage (86%) and number of titles won (6) since 2007. The two most significant accomplishments of his season included winning a record seventeenth Grand Slam title (his first since the 2010 Australian Open) and returning to World No. 1.

Year summary

Early hard court season and Australian Open

Qatar Open

Federer began his ATP World Tour season at the Qatar Open, where he was defending his title. After straight-set victories over 2011 finalist Nikolay Davydenko and qualifier Grega Žemlja, Federer won a hard-fought, error-prone match over eighth-seeded Andreas Seppi. Federer was scheduled to play Jo-Wilfried Tsonga in a rematch of the previous year's semifinal, but was forced to withdraw due to a back spasm problem. This marked only the second time in Federer's career (after the 2008 Paris Masters) that he withdrew from a tournament because of injury.

Australian Open
Federer next traveled to Melbourne for the first Grand Slam of the season, the Australian Open. The Swiss advanced through the first four rounds without the loss of a set, starting his campaign by defeating qualifier Alexander Kudryavtsev, receiving a walkover into the third round when Andreas Beck withdrew with a lower back injury prior to their second round match, and beating Ivo Karlović to improve to a 10–1 head-to-head record against the Croat. Federer then faced Australian teenager Bernard Tomic and downed him in less than two hours to extend his record streak of Grand Slam quarterfinals consecutive appearances to 31. In the quarterfinals, Federer faced world no. 11 Juan Martín del Potro in his 1000th career match. It was their first meeting in a major tournament since Del Potro defeated Federer in five sets in the 2009 US Open men's final. As the tight match slowly progressed, Federer took control and flew by del Potro in straight sets. With his win, Federer becomes the first player at age 30 and over to reach the Australian Open semifinals since Andre Agassi, and extends his match winning streak (started in September 2011) to 24 consecutive victories. Federer played world no. 2 and archrival Rafael Nadal in the semifinals. He opened up the match by winning the first set, but ultimately lost momentum and dropped the next three sets after a failed attempt to get back in the match by taking the third set, committing 63 unforced errors. Federer's loss to Nadal saw his winning streak of 24 consecutive matches end and his record against Nadal slip to 9–18.

Rotterdam Open
Federer went to the ABN AMRO World Tennis Tournament in Rotterdam for the first time since he won in 2005. He faced Frenchman Nicolas Mahut in the first round and defeated him in straight sets. He then received a walkover against Mikhail Youzhny, and then defeated Jarkko Nieminen in the quarterfinals in two tight sets. In the semifinals, Federer dropped his opening set to an aggressive Nikolay Davydenko, but rallied to win the match in three sets. He beat Juan Martín del Potro in the final to clinch his second title in Rotterdam.

Dubai Tennis Championships
Federer next played in the Dubai Tennis Championships. He played Frenchman Michaël Llodra in the first round and defeated him in straight sets after a tight second set went to a tiebreak. He then faced Feliciano López and, after a slow start, defeated him in straight sets. He next played Mikhail Youzhny and flew to a straight-sets victory after dropping only fourteen points on serve. In the semifinals, he defeated Juan Martín del Potro in two tight tiebreaks. He beat Andy Murray in the final to clinch his fifth title in Dubai, his second consecutive title, and his second title of the year. He also finished the tournament without dropping a set.

Indian Wells Masters

Immediately following his win at Dubai, Federer began his trip to the United States with an appearance at the BNP Paribas Showdown, playing an exhibition match against Andy Roddick. After two very tight sets, Federer was defeated by Roddick in the second-set tiebreak.

Federer next participated in the Indian Wells Masters in Indian Wells, California. Federer had come down with flu-like symptoms prior to his opening match due to a virus that had spread around the players at the beginning of the tournament. After receiving a bye into the second round, he faced American qualifier Denis Kudla, and dispatched him in straight sets. He next faced young up-and-coming Canadian Milos Raonic. Raonic grabbed a tight first set after winning the set tiebreaker, but Federer came back strong with two break points in the second set to level the match. Federer found a break point late in the third set and held to secure a close three-set win over Raonic. Still recovering from his illness, Federer played Brazilian Thomaz Bellucci, who had received a walkover from the third round, the day after his match with Raonic. Bellucci took advantage of a shaky Federer to win the first set, but Federer found his rhythm and fought back to win the next two sets and the match with two crucial break points, one of which was also match point. Federer then played Juan Martín del Potro for the fourth time in the season in the quarterfinals. After winning three break points throughout the match, Federer defeated del Potro in 69 minutes, earning his 250th career Masters 1000 win. He then faced archrival Rafael Nadal, whom he had last played in his loss in the Australian Open semifinals. Rain delays kept the two rivals off the court for a few hours, but when they began playing, Federer got off to a fast start, securing two break points to win the set with ease. He then capitalized on two more break points to give himself a big lead. After fending off a late comeback by Nadal and waiting out a short rain delay after drawing match point, Federer sealed the match with an ace, recording his tenth career win over Nadal. In the final, Federer met American John Isner, who had beaten him in their last meeting in the Davis Cup, and defeated him in straight sets, clinching a record-tying 19th Masters 1000 title.

Miami Masters
Federer next played at the Miami Masters. Federer opened in the second round against wildcard American Ryan Harrison after taking a bye in the first round. Federer controlled much of the match and avoided a late comeback by Harrison to win in straight sets after a second set tiebreak. He next played perennial rival Andy Roddick in the third round. Federer dropped the first set tiebreak, but came back strong with three break points in the second set. The third set saw Roddick save four break points in the second game and pull momentum from Federer, who gave up a break in the next game. Federer's serve faltered, and Roddick held his next four service games to win the match and defeat Federer for only the third time in his career, the first time since he last defeated Federer at the 2008 Miami Masters. This loss ended Federer's 16-match winning streak.

Clay court season and French Open

Madrid Open

Federer started off his clay court season with the Madrid Open. He received a bye to the second round, where he faced Milos Raonic. After dropping the first set, Federer saved seven break points in the next two sets to hold off Raonic and win the match in the third-set tiebreak. Federer then played Frenchman Richard Gasquet in the third round, and flew to a win in less than an hour, winning in straight sets. In the quarterfinals, Federer defeated Spaniard David Ferrer in straight sets, losing only six points on his serve, and extended his undefeated record against Ferrer. He defeated Janko Tipsarević in the semifinals in straight sets in just over an hour, and also extended an undefeated record against him. In clinching a spot in the final, Federer broke Ivan Lendl's record for the most combined Championship Masters Series finals, which includes his finals appearances at Masters 1000 events, and stands alone at 32 finals reached. In his 104th career final, he defeated Tomáš Berdych in three sets after dropping the first set. With his win, he regained the world no. 2 ranking from Spaniard Rafael Nadal. He also won his third Madrid Masters title and tied Nadal's record of 20 ATP World Tour Masters 1000 titles.

Italian Open
Federer next played at the Italian Open in Rome. He received a bye into the second round where he met and comfortably beat Carlos Berlocq of Argentina in straight sets. In the third round, he played 2001 champion Juan Carlos Ferrero and defeated him in three sets after Ferrero had won the second set by converting a break. Federer then faced hometown favorite Andreas Seppi in the quarterfinals, but defeated him by a comfortable margin, dropping only three games en route to a straight sets win. Federer next lost to first-seeded Novak Djokovic in the semifinal in straight sets, after failing to gain enough momentum to overcome Djokovic in the second-set tiebreak. As Nadal ultimately won the tournament, Federer dropped to world No. 3 rank.

French Open

Federer concluded his clay court season with the French Open in Paris, his 50th career major championship. He played German Tobias Kamke in the first round, and won in straight sets. With his win, Federer recorded his 50th match win at the French Open and tied Jimmy Connors' record for most career Grand Slam match wins at 233 wins. He next played Adrian Ungur of Belgium, and defeated him in four sets after dropping a third-set tiebreak on a backhand error. With this win, Federer broke Connors' record for the most career Grand Slam match wins, earning his 234th win. He next played against Frenchman Nicolas Mahut, who took the second set from Federer before Federer rallied to win the match in four sets. Federer then faced David Goffin, who made his Grand Slam debut as a lucky loser, the seventh to reach the fourth round at a Grand Slam. After dropping the first set because of unforced errors, Federer fought back and won the next three sets to reach his thirty-second consecutive Grand Slam quarterfinal. He next faced Juan Martín del Potro for the fifth time in the season. After del Potro broke Federer in the first set and won a set tiebreak to take a two set lead, Federer capitalized on a waning del Potro to win the next three sets and take the match in three hours and fourteen minutes. Federer advanced to his thirty-first Grand Slam semifinal with his seventh career win from two sets down and his third at the French Open. He next played first-seeded Novak Djokovic. In a match with constant breaks of serve, Federer lost in straight sets because of inconsistent play and copious errors, which included failing to convert on an early second-set lead.

Grass court season, Wimbledon, and the Olympics

Halle Open
Federer began his 2012 grass court season at the Halle Open in Halle, where he was a five-time champion and was the second seed. He received a bye in the first round, and defeated Florian Mayer in the second round, firing 11 aces to kick-start his grass court season with a straight sets win. Federer then played Canadian Milos Raonic in the quarterfinals, and, after losing a first set tiebreak, won in a third set tiebreak to secure three consecutive wins against Raonic. In the semifinals, he cruised past Mikhail Youzhny, dropping only five games en route to a win in one hour. However, Federer succumbed in the final to an inspired Tommy Haas in straight sets due to untimely errors.

Wimbledon

Federer finished his grass court season at the Wimbledon Championships, where he was the third seed and a six-time champion. He was bidding to equal Pete Sampras' record of seven Wimbledon titles won. Federer faced Spaniard Albert Ramos in the first round, and swept past him in less than an hour and a half, dropping only three games en route to his straight sets victory. He next played Italian Fabio Fognini, and dispatched him in similar fashion, winning in straight sets after losing only six games. The match was attended by the Prince of Wales and the Duchess of Cornwall (Charles and Camilla), both of whom met Federer following his win. In the third round, Federer faced Frenchman Julien Benneteau, whom he had lost to in their last encounter at the 2009 Paris Masters. He found himself down two sets to love after Benneteau's brilliant play won a break point in the first set and a tiebreak in the second set. However, Federer steeled himself and won the third set in less than half an hour. He then held off a comeback by Benneteau in a fourth-set tiebreak to level the match at two sets all. Federer broke Benneteau in the fifth set and held his lead to close the match out in three and a half hours. Federer's win over Benneteau marked the second time in the season and the eighth time in Federer's career that he came back from two sets down to win the match. Federer played Belgian Xavier Malisse in the fourth round, and recorded his 850th match win over four sets. Federer was down a break in the first set but broke Malisse back to force a tiebreak, which he won handily. After dropping only one game en route to winning the second set. Federer found his serve broken in the third set, which allowed Malisse to take a set off of Federer. Federer then broke Malisse in the middle of the fourth set to secure the lead, which he held to win the match in just over two hours. He faced Mikhail Youzhny, whom he has an undefeated record against, in the quarterfinals. In a match attended by The Duke and Duchess of Cambridge, Rod Laver, and Andre Agassi and his wife Steffi Graf, Federer steamrollered over Youzhny in just over one and a half hours, dropping only five games in his victory.  He played Novak Djokovic in the semifinal for the second consecutive Grand Slam, and managed to hold a break in the middle of the first set to jump out to a one set lead. Djokovic struck back with a break in the opening game of the second set, and held the lead to even out the game. In the third set, after Federer and Djokovic traded mistakes and missed opportunities, Federer found two set points, and converted his second to take a two sets to one lead. Federer made a strong start to the fourth set, winning the first three games and serving with great accuracy. He ultimately clinched the match in one of his service games, winning in two hours and twenty minutes. In his record eighth final appearance at the All-England Club, Federer won in four sets against hometown favorite Andy Murray, securing his seventh Wimbledon title and tying William Renshaw's and Pete Sampras' record of most Wimbledon titles won. Federer fought back from a one set love deficit, created by Murray when he closed up the set after breaking Federer's serve late in the set. Federer and Murray both held serve in the second set until Federer converted a set point in the final game of the set by breaking Murray's serve. After the players started the third set, play was suspended after a rain delay forced the Centre Court roof to be closed. After play resumed, Federer dominated play, winning a crucial break point in a game that stretched out for 20 minutes and saw 26 points played. Federer held the break to win the set and take the lead. The fourth set also saw Federer outserve Murray and win the only break point of the set to eventually win the match after three hours and fourteen minutes. Federer was the oldest finalist since Jimmy Connors in 1984 and the oldest winner since Arthur Ashe in 1975.  With his win, Federer also extended his record of most Grand Slams won to seventeen and regained the World No. 1 ranking, which he last held two years ago. Federer's return to World No. 1 also sees him tying, and ultimately surpassing, Pete Sampras' career record of 286 weeks as World No. 1.

Summer Olympics

Federer next played at the 2012 Summer Olympics, representing Switzerland in the men's singles and doubles tennis tournaments.

In the singles tournament, Federer first played Colombian Alejandro Falla, who took him to five sets at the 2010 Wimbledon Championships. Federer took the first set with ease, but lost a few match points and his serve late in the second set, allowing Falla to make a comeback and level the match at one set all. Federer regained control over the match, however, and closed out the third set to advance to the second round. Federer then played Frenchman Julien Benneteau, who had also taken him to five sets at the 2012 Wimbledon Championships just over a month ago. Contrary to their previous matchup, Federer faced no challenge from Benneteau, and flew past him to a straight-sets win in less than an hour. Federer next played Uzbek Denis Istomin in the third round, and clinched a tight first set after a short rain delay. He then took command in the second set and defeated Istomin. In the quarterfinals, Federer faced American John Isner, and secured the first set after a break of Isner's serve allowed him to serve for the set. Federer then battled with Isner to reach a tiebreak in the second-set, which ended when a return of Isner's serve clipped the top of the net and dribbled over to win the match. In the semifinals, Federer faced Juan Martín del Potro for the sixth time this season. He found himself in a one-set deficit after del Potro broke him in the middle of the first set and held to win the set. Federer, however, fought back in the second set, and after losing two opportunities to serve for the set, won the tiebreak with an ace on his second set point. Federer and del Potro then began a third set which saw del Potro creating a one-game lead and Federer matching it in his service games. Federer managed to break del Potro after twenty games, but was unable to convert the break, and del Potro broke back to continue the pattern. Eventually, Federer engineered another break at seventeen games all, and held serve to win the match on his second match point. The match, which stretched over four hours and twenty-six minutes, broke the record for the longest best-of-three-sets system match in the Open Era, surpassing the 4 hours and 3 minutes in Rafael Nadal’s victory over Novak Djokovic in the 2009 Madrid Masters.

Federer, who secured his first Olympic medal and Switzerland's first medal at the 2012 Summer Olympics with his semifinal win, played Briton Andy Murray in the final. Federer was unable to find a way to control the match, and saw his serve broken five times en route to a loss in straight sets, which resulted in earning him a silver medal. The match was a nightmarish match for Federer, where he won just seven games and scored a minuscule ten points on his own second serve. It was Federer's worst ever loss on grass, and overall second worst in a best of five sets match, next only to 2008 French Open final to Rafael Nadal. Federer’s finals finish, along with World No. 2 Novak Djokovic's semifinals finish, guaranteed that he would retain his World No. 1 ranking.

In the doubles tournament, Federer teamed up with Stanislas Wawrinka to defend their gold medal from the 2008 Summer Olympics. They first faced the Japanese duo of Kei Nishikori and Go Soeda, and dropped the first set tiebreak to them. However, Federer and Wawrinka rallied to win the next two sets and the match, successfully beginning their medal defense. The pair next played Jonathan Erlich and Andy Ram of Israel, and grabbed a one-set lead after winning the first set in less than half an hour. However, they were edged by Erlich and Ram in the second-set tiebreak, and fared poorly in the third set, giving up a break of serve which ultimately lost them the match.

US Open Series and US Open
Federer was scheduled to open this season's US Open Series by participating in the Rogers Cup in Toronto, but he withdrew from the tournament, citing a need for rest.

Cincinnati Masters
Federer opened his US Open Series at the Western & Southern Open in Cincinnati, where he finished in the quarterfinals last year. Federer first faced Alex Bogomolov, Jr. of Russia, and found little trouble in his first match, dropping only five games en route to a win in one hour. In the third round Federer faced Australian Bernard Tomic, defeating the 19-year-old while only dropping six games. Federer next faced American Mardy Fish in a rematch of the 2010 Cincinnati final. His quarterfinal against Fish was a high quality match with Federer closing it out in a second-set tiebreaker. His semifinal match was an all Swiss affair as he faced friend and doubles partner Stan Wawrinka. Wawrinka pressed Federer to a tiebreaker but ultimately succumbed to the world number 1 in straight sets. With his victory over Wawrinka, Federer secured the number ranking going into the US Open. He faced world number 2 Novak Djokovic in the final, and started the match strong, winning six straight games to open with a one-set lead in 20 minutes. He then played a tight second set with Djokovic, and won the set and the match in a tiebreaker. With his win, Federer won his record fifth title at Cincinnati and did so without losing a serve or dropping a set for the entire tournament.

US Open
Federer next played at the US Open in Flushing Meadows, where he finished in the semifinals last year. Federer faced American Donald Young in the first round and defeated him in straight sets in just over an hour and a half. He next faced German Björn Phau, and faced little resistance, breaking Phau five times en route to a straight-sets victory in exactly an hour and a half. Federer then played Fernando Verdasco of Spain, and won again in straight sets, winning in just over two hours. He was scheduled to play American Mardy Fish in the fourth round, but Fish withdrew, citing health concerns. Federer played Tomáš Berdych in the quarterfinal, and dropped the first two sets before regaining some momentum and winning the third set. However, Berdych forced a break of Federer's serve, and served out the match, handing Federer his first loss in eight matches. Federer's loss also ended his eight consecutive semifinal appearances at the US Open since 2004.

Asian Swing

Shanghai Masters
Federer's first post-US Open tournament was the Shanghai Masters. Federer received a bye into the second round, where he played Lu Yen-hsun and won the match in straight sets after securing one break point in each set. In the third round, Federer faced off against compatriot Stanislas Wawrinka. He dropped the first set to Wawrinka, but won a crucial second-set tiebreak and finished the match by winning six straight games in the third set. Federer's win over Wawrinka guaranteed him the world No. 1 ranking for a 300th week. Federer's next match in the quarterfinals, against Marin Čilić, saw him taking control of the match from the start, winning in straight sets in just over eighty minutes. Federer next played Andy Murray in the semifinals, but a few anomalies in his service gave breaks of serve to Murray in the first and second sets, resulting in a straight sets loss.

European Indoor Season

Swiss Indoors
Federer's next tournament was the 2012 Swiss Indoors, where he was seeded first and was a two-time defending champion. He played Benjamin Becker in the first round, and won in straight sets after overcoming Becker in a tight first set. He then faced Thomaz Bellucci in the second round, and won the first set before dropping a tight second set tiebreak. He then fought off a comeback by Bellucci, and won the match with a break of Bellucci's serve in just over two hours. Federer played Benoît Paire of France in the quarterfinals, and swept past him in straight sets, dropping only one point on serve en route to a win in less than an hour. In a tougher semifinal, Federer dispatched Paul-Henri Mathieu in straight sets, advancing to his ninth Basel final and equalling John McEnroe's 875 career match wins. Federer played Juan Martín del Potro in the final, and found himself one set down after del Potro broke his serve in the middle of the first set. Federer fought back in the second set, saving a break point late in the set to force a tiebreak, which he won. However, he was not able to keep his seven-match win streak against del Potro, dropping the match in a third-set tiebreak after failing to convert break points earlier in the set.

Paris Masters
Federer was scheduled to play at the BNP Paribas Masters, where he was the defending champion, but elected to withdraw, citing a need to rest ahead of the World Tour Finals. Federer's withdrawal, coupled with his loss in the final of the Swiss Indoors, led to the loss of his World No. 1 year-end ranking to Novak Djokovic.

ATP World Tour Finals

Federer next played at his eleventh ATP World Tour Finals, where he was the two-time defending champion. He was drawn into Group B, which included David Ferrer of Spain, Juan Martín del Potro of Argentina, and Janko Tipsarević of Serbia. He first faced Tipsarević, and dropped only eight points on serve en route to defeating him in straight sets in an hour and nine minutes. With his win over Tipsarević, Federer recorded his fortieth ATP World Tour Finals win, surpassing Ivan Lendl's record of ATP World Tour Finals win. Federer then played Ferrer, and beat him in a tight second-set tiebreak after Federer clinched the first set on a break of Ferrer's serve. Federer's win marked his fourteenth consecutive win over Ferrer and also qualified him for the semifinals. Federer played del Potro to wrap up the round robin, and found himself one set down after del Potro clinched a first-set tiebreak. Federer broke del Potro early in the second set, and held the lead to level the match at one set all. However, del Potro responded by breaking him early in the third set, and Federer's unforced errors ultimately cost him the game and the match. Federer's loss meant that his streak of 12 matches won at the ATP World Tour Finals was broken. Even with the loss, Federer finished first in the group, and advanced to the semifinals, where he faced Andy Murray, who he had last played at the Shanghai Rolex Masters. Murray started out strong, breaking Federer in the first game of the set, but Federer recovered by breaking Murray later in the set. The first set eventually went to a tiebreak, and Federer found himself with two set points, converting the second to take a one-set lead. Federer then flew through the second set, breaking Murray twice en route to winning the match in just over an hour and a half. With his win, Federer advanced to his eighth final, where he played Novak Djokovic. Federer held an early lead in the first set, but Djokovic managed to level the set and ended up pulling out to a one-set lead after winning a very tight first-set tiebreak. In the second set, Djokovic was able to convert a decisive break point on Federer's serve late in the set and he subsequently served out the match to win his second end of season championship. The loss denied Federer a chance to tie Ivan Lendl's record of three consecutive ATP World Tour Finals titles. Federer's loss also cost him a chance at tying John McEnroe's record of 77 career titles won.

Davis Cup 
Federer returned to Switzerland to represent his country for their first-round Davis Cup meeting with the United States. He played his first rubber at Fribourg against John Isner after Mardy Fish had beaten his compatriot Stanislas Wawrinka in the first rubber. After taking the first set, Federer struggled to capitalize on break points and lost the next three sets to Isner, giving the Americans a 2–0 advantage. He next played with Wawrinka in the doubles rubber against top doubles player Mike Bryan and Fish. Federer and Wawrinka won a tight first set, but were run over by Bryan and Fish in the next three sets, losing the rubber and the match-up. The Americans advanced to the quarterfinals, while Switzerland was relegated to the World Group play-offs. Federer was scheduled to play Mardy Fish in the first of the reverse singles rubbers, but Federer and Fish were taken off the schedule, as the Americans had already won the match-up.

Federer represented Switzerland in the World Group play-offs against the Netherlands in Amsterdam. Federer played Thiemo de Bakker in his first singles rubber, and he won the match in straight sets, giving Switzerland its first point. After compatriot Stanislas Wawrinka secured a four-set victory over Robin Haase in the second singles rubber, Federer and Wawrinka teamed up to play the doubles rubber against Haase and Jean-Julien Rojer. Because of strong play by Haase and Rojer, Federer and Wawrinka found themselves in a two-set to love deficit, but they fought to win the third set. However, Haase and Rojer continued to break the Swiss pair's serves and won an upset in four sets, preventing Switzerland from clinching the match-up on the second day of play. Federer then played Haase in the first of the reverse singles rubbers, and found little trouble in winning the match in straight sets, fending off various opportunities for Haase to break his serve. Federer's win clinched the match-up, which meant that Switzerland would play in the World Group in 2013.

All matches

Singles matches

Doubles matches

Tournament schedule

Singles schedule
Federer's 2012 singles tournament schedule was as follows:

Doubles schedule

Yearly records

Head-to-head matchups
Roger Federer had a  match win–loss record for the 2012 season. His record against players who were part of the ATP rankings Top Ten at the time of their meetings stands at . The following list is ordered by number of wins:

 Juan Martín del Potro 6–2
 Milos Raonic 3–0
 Andy Murray 3–2
 Mikhail Youzhny 3–0
 Thomaz Bellucci 2–0
 Julien Benneteau 2–0
 Nikolay Davydenko 2–0
 David Ferrer 2–0
 Nicolas Mahut 2–0
 Andreas Seppi 2–0
 Janko Tipsarević 2–0
 Bernard Tomic 2–0
 Stanislas Wawrinka 2–0
 John Isner 2–1
 Novak Djokovic 2–3
 Thiemo de Bakker 1–0
 Benjamin Becker 1–0
 Carlos Berlocq 1–0
 Alex Bogomolov, Jr. 1–0
 Marin Čilić 1–0
 Alejandro Falla 1–0
 Juan Carlos Ferrero 1–0
 Mardy Fish 1–0
 Fabio Fognini 1–0
 Richard Gasquet 1–0
 David Goffin 1–0
 Robin Haase 1–0
 Ryan Harrison 1–0
 Denis Istomin 1–0
 Tobias Kamke 1–0
 Ivo Karlović 1–0
 Denis Kudla 1–0
 Alexander Kudryavtsev 1–0
 Michaël Llodra 1–0
 Feliciano López 1–0
 Yen-Hsun Lu 1–0
 Xavier Malisse 1–0
 Paul-Henri Mathieu 1–0
 Florian Mayer 1–0
 Jarkko Nieminen 1–0
 Benoît Paire 1–0
 Björn Phau 1–0
 Albert Ramos 1–0
 Adrian Ungur 1–0
 Fernando Verdasco 1–0
 Donald Young 1–0
 Grega Žemlja 1–0
 Tomáš Berdych 1–1
 Rafael Nadal 1–1
 Tommy Haas 0–1
 Andy Roddick 0–1

Finals

Singles: 10 (6–4)

Earnings

 Figures in United States dollars (USD) unless noted.

Awards
Stefan Edberg Sportsmanship Award
Record eighth award in career (second consecutive)
ATPWorldTour.com Fans' Favourite
Record tenth consecutive award in career

See also
2012 Rafael Nadal tennis season
2012 Novak Djokovic tennis season
2012 Andy Murray tennis season

References

External links
 
 ATP tour profile

2012 Roger Federer tennis season
Roger Federer tennis season
Medalists at the 2012 Summer Olympics
Tennis players at the 2012 Summer Olympics
2012 in Swiss tennis
2012 in Swiss sport