With discussions for a comprehensive agreement seemingly deadlocked, Rouhani's comments were the strongest signal yet that the long-running talks seeking an agreement will continue.
Rouhani yesterday said there was "no turning back" on the need for a deal but with the cut-off date of November 24 just 40 days away the reality was that further discussions may be necessary.
"Our will is that in 40 days the matter will be resolved but if other things happen and we are not able to solve all the problems, the two camps will find a solution," he said in a live interview on state television.
Iran and the P5+1 group of nations (Britain, China, France, Russia, the United States plus Germany) signed an interim deal in January that gave Iran some relief from economic sanctions in return for curbs on its disputed nuclear programme.
More From This Section
But the road to a final deal has stalled since because of disputes on the extent of uranium enrichment Iran would be allowed to undertake and on the timetable for sanctions on the Islamic republic to be lifted.
"The world has accepted our nuclear programme and agreed that this issue should be resolved through negotiations and a win-win solution," Rouhani said.
Pointing out the economic benefits of a deal, the Iranian president said "hundreds of big companies were waiting to rush" to Tehran to cash in on what the energy-rich country had to offer.
Iran has the world's fourth largest crude oil reserves and, according to some estimates, the largest gas reserves, but international trade has been dramatically hit by nuclear sanctions imposed by the West.