NEW YORK >> U.S. stocks drifted to a mixed finish Wednesday after the Federal Reserve indicated it may cut interest rates twice this year, although it’s far from certain about that.

The S&P 500 finished nearly unchanged and edged down by less than 0.1% after flipping between modest gains and losses several times. The Dow Jones Industrial Average dipped 44 points, or 0.1%, and the Nasdaq composite rose 0.1%.

All told, the S&P 500 fell 1.85 points to 5,980.87. The Dow Jones Industrial Average dipped 44.14 to 42,171.66, and the Nasdaq composite added 25.18 to 19,546.27.

Treasury yields also wavered but ultimately held relatively steady after the Fed released a set of projections showing the median official expects to cut the federal funds rate twice by the end of 2025. That’s the same number they were projecting three months ago, and it helped calm worries a bit that inflation caused by President Donald Trump’s tariffs could tie the Fed’s hands.

Cuts in rates would make mortgages, credit-card payments and other loans cheaper for U.S. households and businesses, which in turn could strengthen the overall economy. But they could likewise fan inflation higher.

So far, inflation has remained relatively tame, and it’s near the Fed’s target of 2%. But economists have been warning it may take months to feel the effects of tariffs. And inflation has been feeling upward pressure recently from a spurt in oil prices because of Israel’s fighting with Iran.

Fed Chair Jerome Powell stressed Wednesday that all the uncertainty surrounding tariffs means the median forecast for two cuts to interest rates this year could end up being far from reality. “Right now it’s just a forecast in a very foggy time,” he said.

Fed officials are waiting to see how big Trump’s tariffs will ultimately be, what they will affect and whether they will drive a one-time increase to inflation or something more dangerous. There is also still deep uncertainty about how much tariffs will grind down on the economy’s growth.

“Because the economy is still solid, we can take the time to actually see what’s going to happen,” Powell said.

“We’ll make smarter and better decisions if we just wait a couple months or however long it takes to get a sense of really what is going to be the passthrough of inflation and what are going to be the effects on spending and hiring and all those things.”

Adding to the uncertainty Wednesday were continued swings for oil prices. After topping $74 during the morning, the price for a barrel of benchmark U.S. oil dropped below $72 before settling at $75.14, up 0.4% from the day before. Brent crude, the international standard, rose 0.3% to $76.70.

Oil prices have been yo-yoing for days because of rising and ebbing fears that the conflict between Israel and Iran could disrupt the global flow of crude. Not only is Iran a major producer of oil, it also sits on the narrow Strait of Hormuz, through which much of the world’s crude passes.

Trump said Wednesday that Iran has reached out to him and that it’s not “too late” for Iran to give up its nuclear program, although he also declined to say whether the U.S. military would strike the country.

“I may do it. I may not do it,” he said. “I mean, nobody knows what I’m going to do.”

On Wall Street, Nucor rose 3.3% after the steelmaker said it expects to report growth in profit for all three of its operating groups in the second quarter. It said it benefited from higher selling prices at its sheet and plate mills, among other things.

In the bond market, Treasury yields held relatively steady following a few wavers up and down.

The yield on the 10-year Treasury edged down to 4.38% from 4.39% late Tuesday. The two-year Treasury yield, which more closely tracks expectations for what the Fed will do with its overnight interest rate, held at 3.94%.