Federer came into the match after his scheduled quarter-final opponent Nick Kyrgios pulled out because of illness, and he was imperious from the start. He won the first set in 21 minutes before needing a tiebreaker in the second to close out the 21-seeded Sock and improve to 3-0 against the American. And he started off pretty well hanging in against Wawrinka who needed consecutive third set tiebreakers just to get to the weekend.
With Federer winning the Australian Open and Wawrinka claiming last September's U.S. Open, Sunday's final will bring together the two most recent grand slam champions.
Nishikori had not dropped a set in the tournament until losing the first against Sock.
The Spaniard managed to keep his cool when facing a break point in the sixth game to draw level, but his powers of recovery failed him during his next service game.
In other matches, third seed Stan Wawrinka overcame Yoshihito Nishioka 3-6, 6-3, 7-6 (4), Austria's Dominic Thiem defeated Frenchman Gael Monfils 6-3, 6-2, and Japan's Kei Nishikori beat Donald Young 6-2 6-4.
The Indian Wells Masters final has all the ingredients for a classic encounter, and it is not easy to pick a favourite.
Intruder breaches White House grounds, arrested near residence entrance
According to a Secret Service report, Tran was carrying a backpack that was screened and found to be free of unsafe materials. A man will reappear in court on Monday after scaling the fence and entering the grounds with a backpack late on Friday night.
"I want to wish Roger the best of luck for the rest of the tournament and thank everyone for their support so far here at the BNP Paribas Open. It was hard to break and return well off Jack's heavy serve", Federer said.
"To be back on court feeling normal again is so nice, you feel just happy and fresh and I think it translates also to my game".
Roger Federer, Grigor Dimitrov and Tommy Haas, the Backhand Boys, sing Hard to say I'm Sorry by Chicago.
The Swiss star has spent a record of 302 weeks at the top of the ATP rankings but he is now in 10th spot after missing the latter half of a year ago due to injury. Ultimately he won in straight sets, a 6-1 thrashing of a first, and then 7-6 (4) in the second. The two most recently met in the 2017 Australian Open in the semifinals, with Federer winning in five sets.
"Unfortunately I am unable to play due to sickness", Kyrgios said on Twitter. Sock got a sense of what it takes to be in the match against a great player, not merely on the court.
"Overall I played a good match", Federer said. But Wawrinka's mental toughness can never be underestimated, as both Djokovic and Nadal have found out in grand slam finals.