Roger Federer is solely focused on winning the ATP World Tour Finals in London next month, rather than usurping Rafael Nadal to finish 2017 as world number one.

Federer closed the gap on his long-time rival on Sunday with victory over Nadal in the Shanghai Masters final – the Swiss' sixth title of the year.

With only a handful of events remaining before the end-of-season tournament in London it would need Federer to maintain his form to finish on top of the rankings.

And while that remains a possibility after a scintillating win over Nadal in China, the 36-year-old insists tournament wins not rankings are his main priority.

Such is his desire to win the World Tour Finals, Federer is only considering playing in Basel and Paris before the last tournament of the year begins on November 12.

"I don't even know what it takes [to be world number one] to be honest," he told Sky Sports after his 6-4 6-3 win on Sunday.

"I just know that [winning] the World Tour Finals is a must, and then probably Paris and Basel too, but that all depends on how Rafa plays.

"So it's a wild thought, that's why I'm not even thinking about it at this point. I was thinking about it going into the Montreal finals and hopefully Cincinnati and the US Open, but it just all didn't work out the way I was hoping it to. 

"So I just try to be healthy now, I'll go back to the drawing board when I get back to Switzerland tomorrow [Monday] with my team, we'll decide what I'm going to play.

"Basel. Paris. One of those tournaments, or both, or none before I go to London because that's my priority right now, I really want to win the World Tour Finals and we'll take it from there. 

"I'm very excited to have had the year that I have, everything else from here is a bonus and world number one is a long shot, I don't think it is going to happen but if I keep playing like this who knows, maybe I'll get close again."

Sunday's was Federer's fifth successive win over Nadal and he was delighted that his game plan worked in such impressive fashion.

He added: "I think I played a great match without hardly any bad mistakes.

"The decision making was very clear for me, how I had to play and I was able to do it for the hour and 12 minutes while I was out here. 

"I think I started perfectly, kept the pressure on and created more opportunities on the return, stayed on the offence, and then also pulled back at the right times to make sure Rafa could make some errors on his own.

"And that's exactly what happened so I am very pleased with how it all worked out. I'm actually surprised that I won here because with all that has happened since Montreal with my back, it's just nice to see I'm back again."