After talks in the US, Mr Trump, who is sceptical of an accord that was struck in 2015, spoke about “doing a much bigger, maybe, deal”.
Mr Macron said a new pact must cover Iran’s ballistic missile programme and its role in the Middle East.
In 2015, Iran agreed to mothball its nuclear programme in return for an easing of economic sanctions on Iran.
The US president has been threatening to reject an extension of the Obama-era nuclear pact reached between Tehran and world powers by a 12 May deadline.
Mr Macron had been lobbying Mr Trump to stick with the deal, saying there was no better option.
Germany’s Chancellor Angela Merkel is due to visit the US on Friday to make a last-minute bid to dissuade Mr Trump from potentially torpedoing the agreement.
Iranian Foreign Minister Javad Zarif was quoted as saying that Tehran would “most likely” abandon the accord if the US pulled out.
What did Trump and Macron say in Washington?
“I think we will have a great shot at doing a much bigger, maybe, deal,” the US president said, adding that any new agreement must be built on “solid foundations”.
“They should have made a deal that covered Yemen, that covered Syria, that covered other parts of the Middle East,” said Mr Trump, referring to the 2015 accord which he described as “insane”.
Meanwhile, Mr Macron agreed that Tehran’s influence in the region must be part of negotiations.
He also stressed that – as well as controlling Iran’s nuclear programme for the next decade as envisaged by the current agreement – a fresh deal would need to cover its nuclear activities longer-term, as well as its ballistic missile programme.
And he talked about working with President Trump to build a “new framework” in the Middle East – and especially in Syria.
Mr Macron said he did not know whether Mr Trump would extend the 12 May deadline, adding: “I can say that we have had very frank discussions on that, just the two of us.”
Mr Trump earlier warned Iran against resuming its nuclear programme.
“They’re not going to be restarting anything. They restart it they’re going to have big problems, bigger than they’ve ever had before.”
Analysis by the BBC’s Barbara Plett Usher
The visit was a strange mix.
On the one hand, a display of stark differences – Mr Macron almost channelling an anti-Trump in his opening admonition to resist “aggressive nationalism” and “build a new multilateralism.”
On the other hand, an overt display of deliberate chumminess punctuated with tussling handshakes and capped by the very odd dandruff episode, where Mr Trump seemed to hover between playfulness and aggression.
But whether or not the French president felt humiliated by the bout of unexpected grooming, he did manage to get Mr Trump’s attention on the Iran nuclear accord.
He framed his appeal to preserve the deal with the promise of a “bigger, better” one.
In other words, build on the existing agreement to address its flaws, rather than scrap it and start fresh.
Whether or not this is possible is an open question.
But the suggestion was enough to intrigue Mr Trump.
His tone changed, moving from a blistering harangue of the deal before the meeting to something more considered – although still noncommittal – afterwards.
And that shows the influence of personal engagement with the president, from someone who – like Mr Macron – knows how to talk to him.
What was Iran’s response?
Meanwhile, Mr Zarif said just hours before the Trump-Macron summit that a probable response would be to restart the enrichment of uranium – a key bomb-making ingredient.
“You cannot stop the process or not engage just because of a fear of failure. But at least you need to have some hope of success, some prospect for success, in order for this process to start,” the Iranian foreign minister was quoted as saying by Reuters.
“And I do not believe that, under the present circumstances, with the present tone, and language and approach of the current administration in Washington, you would have much prospect.”
Iran maintains its nuclear programme is solely for peaceful civilian purposes.
What are Trump’s objections to the 2015 accord?
The US president has long complained that the accord – signed by the US, Iran, Europe, Russia, China and Germany – does nothing to halt Iran’s support for militant groups in the region such as Hezbollah.
What about other issues discussed in Washington?
Mr Macron, on a three-day visit to the US, is the first foreign leader to be treated to a state visit during the Trump presidency.
President Macron and his wife, Brigitte, attended a state dinner in their honour at the White House on Tuesday.
Guests included former Secretary of State Henry Kissinger and Apple chief executive Tim Cook.
“May our friendship grow even deeper, may our kinship grow even stronger, and may our sacred liberty never die,” Mr Trump said in his toast.
In response, Mr Macron spoke of “how deep, how strong, and how intense the relationship is between our two countries”.
“I got to know you, you got to know me. We both know that none of us easily changes our minds, but we will work together, and we have this ability to listen to one another,” he said.
The Iran deal is not the only potential source of discord between the two leaders.
Also on the agenda is the Paris climate accord, the US decision to recognise Jerusalem as the capital of Israel, and planned US tariffs on EU steel and aluminium.
Mr Trump thanked France for joining the US and Britain earlier this month in launching air strikes after an alleged chemical attack in Syria.
‘Bigger, better’ deal