Both countries have accused Iran of secretly working toward building a nuclear weapon, and Netanyahu has argued that a clear threat of military force is needed to convince the Islamic republic to stop.
Obama said there was still time for a diplomatic resolution to the situation, but added that each country has to make "the awesome decision to engage in any kind of military action" for itself.
"We prefer to resolve this diplomatically, and there's still time to do so," he said. "Iran's leaders must understand, however, that they must meet their international obligations."
Iran has rebuffed calls to halt its production of enriched uranium, saying it has a right to produce peacecful nuclear energy. But the International Atomic Energy Agency, the U.N. nuclear watchdog agency, has said it can no longer verify the peaceful nature of Iran's nuclear program.
Netanyahu said diplomacy and economic sanctions "have so far not stopped Iran's nuclear programs." And Obama added, "There is not a lot of daylight between our countries' assessments in terms of where Iran is right now."
The two leaders also discussed the stalled Middle East peace process and the ongoing civil war in Syria, where reports of the use of chemical weapons swirled this week.
During a joint news conference with Netanyahu, Obama repeated U.S. warnings to the Syrian government to keep those weapons off the battlefield or out of the hands of groups such as Syria's Lebanese ally Hezbollah, a sworn enemy of Israel.
Meanwhile, Palestinian activists erected a tent city Wednesday outside Jerusalem in the West Bank to protest Obama's visit and continued Israeli construction of settlements in what they consider an occupied territory.
Meanwhile, demonstrators in Gaza protesting Israeli and U.S. policies toward Palestinians burned flags of both nations as well as a picture of Obama.
After a morning meeting, both Obama and Israeli President Shimon Peres sought to alleviate any concerns among Israelis that the United States lacked the commitment or desire to support Israel on key issues.
"The state of Israel will have no greater friend than the United States" in seeking the mutual vision of giving the children of the Jewish state and other countries in the region "the opportunity for security and peace and prosperity," Obama said.
Peres raised topical issues, saying "we cannot allow" Hezbollah to get hold of Syria's chemical weapons because "it could lead to an epic tragedy."