Asked by a reporter to what extent Americans' financial situations were motivating him to strike a deal, Trump said: "Not even a little bit."
"The only thing that matters, when I'm talking about Iran, they can't have a nuclear weapon," Trump said before departing the White House for a trip to China on Tuesday.
"I don't think about Americans' financial situation. I don't think about anybody. I think about one thing: We cannot let Iran have a nuclear weapon. That's all. That's the only thing that motivates me."
Trump's remarks are likely to draw scrutiny from critics who argue the administration should balance geopolitical objectives with the economic impact on Americans, particularly as cost-of-living concerns remain a top issue for voters ahead of the November mid-term elections.
White House Communications Director Steven Cheung said Trump's "ultimate responsibility is the safety and security of Americans. Iran cannot have a nuclear weapon, and if action wasn't taken, they'd have one, which threatens all Americans".
Trump is under growing pressure from fellow Republicans who fear economic pain caused by the war could spark a backlash against the party and cost it control of the House of Representatives and possibly the Senate in November.
Rising energy costs linked to the Iran conflict have pushed up gasoline prices and contributed to inflation.
US consumer inflation in April posted its largest gain in three years, according to data released on Tuesday.
Trump framed his approach as a matter of national and global security, suggesting economic concerns were secondary to preventing nuclear proliferation.
US intelligence assessments, however, indicate that the time Iran would need to build a nuclear weapon has not changed since last summer, when analysts estimated that a US-Israeli attack had increased the timeline to nine months to a year, according to three sources familiar with the matter.