The 37-year-old had not even played the tournament since 2015 before this year, but powered into his eighth French Open semi-final with a 7-6 (7/4), 4-6, 7-6 (7/5), 6-4 victory over Stan Wawrinka on Tuesday.
Nadal thrashed Kei Nishikori 6-1, 6-1, 6-3 to claim his 91st win at Roland Garros, against just two defeats.
But despite losing all five of his French Open meetings against Nadal, including in four finals, and trailing their head-to-head record on clay 13-2, Federer still holds hope that he can achieve another milestone in his illustrious career.
"Like against any player, there is always a chance. Otherwise nobody will be in the stadium to watch because everybody already knows the result in advance," said the 20-time Grand Slam champion.
"That's exactly what everybody believes by facing Rafa. They know it's going to be tough. But you just never know. He might have a problem. He might be sick. You never know.
"You might be playing great or for some reason he's struggling. Maybe there's incredible wind, rain, 10 rain delays. You just don't know. That's why you need to put yourself in that position."
Federer is also 23-15 behind overall against 33-year-old Nadal heading into their 39th clash, but has won their last five matches, including in the 2017 Australian Open final when he claimed his first Grand Slam title for five years.
The Swiss had taken a two-year break from clay altogether in an attempt to focus on Wimbledon, but returned to the red dirt last month, reaching the quarter-finals in Madrid and Rome.
He has built on that form in the French capital, losing just one set - the same as 11-time champion Nadal - en route to the last four.
He is now targeting only his second Roland Garros crown, after taking advantage of Nadal's shock loss to Robin Soderling to win the 2009 title.
"The complete dream would be to win the tournament," said Federer. "Other players won't agree. It will be difficult, but I believe it anyway.
"For me to get to Rafa is not simple. It took five matches here for me to win to get there.
"That's why I'm very happy to play Rafa, because if you want to achieve something on the clay, inevitably, at some stage, you will go through Rafa, because he's that strong and he will be there.
"I knew that when I signed up for the clay that hopefully that's gonna happen."
The beaten Wawrinka admitted he was unlikely to miss his close friend Federer's tilt at Nadal in three days' time.
"I'm a big fan of this sport," said Wawrinka, a three-time major title winner himself.
"So when you get the chance to have in the semi-final of French Open Roger against Rafa, you're gonna put the TV on and watch. I always did in the past."
Results from the 10th day of the French Open on Tuesday (x denotes seeding):
Roger Federer (SUI x3) bt Stan Wawrinka (SUI x24) 7-6 (7/4), 4-6, 7-6 (7/5), 6-4
Rafael Nadal (ESP x2) bt Kei Nishikori (JPN x7) 6-1, 6-1, 6-3
Johanna Konta (GBR x26) bt Sloane Stephens (USA x7) 6-1, 6-4
Markéta Vondroušová (CZE) bt Petra Martic (CRO x31) 7-6 (7/1), 7-5