Roger Federer said he believes in miracles after saving seven match points to beat Tennys Sandgren and he will surely need his biggest one yet if he is to win a 50th career meeting with Novak Djokovic in the Australian Open semi-finals.

Their head-to-head record shows a narrow advantage for Djokovic at 26-23 but there can have been few of their clashes where the odds appear so clearly in the Serbian’s favour.

For a start, Federer has not beaten Djokovic in a best-of-five-sets match since 2012 and not on a hard court over five sets since 2009.

Federer won an exhausting five-set match against Tennys Sandgren in the quarter-finals
Federer won an exhausting five-set match against Tennys Sandgren in the quarter-finals (Andy Wong/AP)

Then there is their form here. After dropping a set to Jan-Lennard Struff in the first round, Djokovic has cruised through while Federer has been riding his own personal roller coaster.

A Houdini act to recover from 4-8 in a deciding tie-break against John Millman in the third round was followed by a four-set win over Marton Fucsovics and then topped by the logic-defying victory over Sandgren.

Federer, hampered by a groin problem and struggling to keep the ball in the court, somehow found a way through and he tried to put a positive spin on his tournament afterwards.

“This one definitely has been tough in many different ways,” he said. “Then again, I didn’t feel like I wasted too much emotional energy out there (against Sandgren) because I came to terms quickly that things weren’t exactly the way I wanted them to be.

“I don’t feel physically exhausted like against Millman. I recovered very well from that match. I’m hopeful that I can recover.”

Although Federer’s recent slam record against Djokovic is not a reason for Swiss optimism, many of the matches have been close, not least last summer’s epic Wimbledon final, where he held two match points.

Federer also won their last meeting, at the ATP Finals in London in November.

Federer, right, won the last match-up against Djokovic in London
Federer, right, won the last match-up against Djokovic in London (Tess Derry/PA)

Djokovic is certainly expecting his rival to rise to the challenge, saying: “I know that whenever we get a chance to play each other, we understand it takes a big effort and it’s required from us to come up with the best game in order to win against each other.

“Wimbledon last year, he had two match points, he was one shot away from winning that match. It’s not like I’ve been dominating the match-ups.

“I’ve had success against him in grand slams in particular. But Roger is Roger. You know that he’s always going to play on such a high level. He loves to play these kind of matches, big rivalries, semis, finals of grand slams.

“What he did (against Sandgren) was really amazing. To come back and save seven match points at his age, he’s still playing such great tennis and proving that he deserves to be up there. He’s a great fighter. Obviously I have lots of respect for him.

“But I’ve been feeling well on the court. This is my favourite court, the court where I had the most success in my career. Hopefully things can come together for me in a positive way on Thursday and I can have a chance to win.”

Djokovic is bidding for his eighth title at Melbourne Park and has never lost once he has made it to the semi-finals.

The Serbian currently has 16 slam titles, four behind Federer and three adrift of Rafael Nadal.

Coach Goran Ivanisevic expects Djokovic to finish with the most, saying: “My challenge as a coach is to stay in the team with Novak and try and witness for him to be the best player in the history of tennis.

“Last nine years, by statistics, in every part, grand slams, winning matches, Masters 1000, he’s by far the best.

“Still missing couple of grand slams. I think he’s going to get there. How many, I don’t know. I hope him and Nadal, they break 20. They push each other, they make each other better players.”

Ivanisevic cited the ATP Cup earlier this month, where Djokovic led Serbia to victory, as a key factor in his charge’s great form so far this fortnight.

Goran Ivanisevic believes Novak Djokovic will have the most grand slams in history when he retires
Goran Ivanisevic, pictured, believes Novak Djokovic will have the most grand slams in men’s singles history when he retires (Mike Egerton/PA)

“I think ATP Cup helped Novak a lot,” said the former Wimbledon champion.

“Because the way he finished last year, for his standards, was, I don’t say poorly, but the match against Roger, mentally he didn’t show up. He was a little bit down.

“The ATP Cup really lifted him. He needed that positive energy. You could see that he’s playing every match better and better here.

“I think it’s going to be a completely different match than the one we saw in Wimbledon, and especially the one we saw in ATP Finals. I don’t want to see that again.”