Federer booked his place with a straight sets win over American Steve Johnson, edging a tight contest that had no break of serves 7-6 (7/3) 7-6 (7/4).
Nadal had it much more comfortable as he beat his compatriot Fernando Verdasco 6-3 7-5, setting up a 36th meeting with his great rival, who he has beaten 23 times.
Despite leading the head-to-head comfortably, Nadal, who won his 50th match at Indian Wells, knows what to expect.
He said in his post-match press conference: “He has the talent to do very difficult things that look easy. He’s able to take the ball very early. Serve and first shot, he creates a lot of winners with that, the two first shots.”
Federer added: “That’s why I came here, to play against guys like Rafa. Now we have it. I’m going to be excited now, I’d better be excited now otherwise I came for the wrong reasons.
“I try to see it really as another opportunity to build upon something for the rest of the season.
“So regardless of Australia, winning or losing, I’m going to try to go out there and try to play free again. I think it’s really important.”