Six-time winner Federer registered a 6-4 6-3 victory to reach the last four of the season-ending tournament for the 15th time in 16 appearances.
O2 debutant Anderson was already safely through courtesy of his two previous round-robin wins, while so poor has the opposition been in Group Lleyton Hewitt that Federer came into the match knowing he only needed to win a maximum of six games to progress.
That was largely because after beating an out-of-sorts Federer in the first match, the form of Kei Nishikori fell so far off a cliff that he ended his campaign losing heavily to the previously winless Dominic Thiem.
Thiem's slim hopes of staying in the tournament disappeared when Federer saved three break points on his way to taking the first set, and he wrapped up victory in an hour and 16 minutes in his first meeting with Anderson since the 6ft 8in big-server beat him in the Wimbledon quarter-finals.
This might not quite constitute revenge, but if Federer goes on to beat Anderson in the final and win his 100th career singles title in the process, the pain of squandering a match point before losing 13-11 in the fifth at SW19 might be eased a little.
"I'm very happy, the first match with Kei was tough and I never got going, but with my back against the wall maybe it's easier for me to play," said Federer.
"Kevin's had a great year, but its been a fun group and I'm very happy to be in the semis.
"These round-robin formats are not straightforward, we're used to it being you lose, you leave, you don't hang around.
"Maybe it was difficult for Kevin having already qualified, whereas with Thiem winning it was maybe easier for me.
"But I'm happy I'm still alive and hope I can play a good match the day after tomorrow"
It was a different story for Japanese world number nine Nishikori, who looked poised to end the season on a high after beating Federer.
But in the next three sets he played Nishikori won just two games, trounced 6-0 6-1 by Anderson on Tuesday before Thiem won Thursday afternoon's opener 6-1.
The usually mild-mannered Nishikori smashed his racket on the ground in disgust but he did at least make a better fist of the second set, although he was powerless to prevent Thiem running out 6-1 6-4 winner.
"I felt fresh, but I just didn't feel the ball this week," said Nishikori.
"It could be the court or the ball. I don't know. But, yeah, I just didn't play well this week."
Meanwhile, Britain's Jamie Murray and Brazilian partner Bruno Soares completed a clean sweep of wins in their doubles group by beating Henri Kontinen and John Peers 3-6 7-6 (3) 10-3.