US stock indexes rose on Wednesday after data showed that while US inflation was at its highest in decades, it largely met economists' expectations, cooling some fears that the Federal Reserve would have to pull back support even more forcibly than already expected.

Ten out of the 11 major S&P sectors finished higher after the news with the S&P 500 and the Nasdaq outperforming the Dow as growth stocks outperformed value.

Data from the US Labor Department showed the consumer price index increased 0.5 percent last month after rising 0.8 percent in November, while in the 12 months through December, the CPI surged 7.0 percent to its highest year-on-year rise in nearly four decades

Data from the US Labor Department showed the consumer price index increased 0.5 percent last month after rising 0.8 percent in November, while in the 12 months through December, the CPI surged 7.0 percent to its highest year-on-year rise in nearly four decades. 

Economists polled by Reuters had forecast a CPI gain of 0.4 percent for December and 7.0 percent on a year-on-year basis.

"Investors were bracing for even hotter in inflation than what we actually saw. As bad as the number is and as much inflationary pressure that's in the economy there was a little relief in that," said Anthony Saglimbene, Ameriprise Financial's global market strategist in Troy, Michigan.

"Today's inflation report validates the Fed trajectory and means they don't have to be any more aggressive than is already priced in."

The central bank's plan for easing accommodation to fight inflation includes raising interest rates, which analysts expect to start as soon as March, as well as tapering its bond buying program and reducing its asset holdings. 

For most stock sectors it also helped that longer-dated US Treasury yields dipped on Wednesday. In recent weeks, sharp gains in the US 10-year yield had weighed on stocks, particularly in rate-sensitive growth sectors like technology.

"The fact that bond market yields are standing down is probably a signal for equity investors to take on a little more risk today," said Jack Ablin, chief investment officer at Cresset Capital Management in Chicago.

But with the small cap Russell 2000 index underperforming to end down 0.82 percent, Ablin saw some caution.

The Dow Jones Industrial Average rose 38.3 points, or 0.11 percent, to 36,290.32, the S&P 500 gained 13.28 points, or 0.28 percent, to 4,726.35 and the Nasdaq Composite added 34.94 points, or 0.23 percent, to 15,188.39.

The S&P's top sector gainers of the day were materials, up almost 1 percent, consumer discretionary, up 0.6 percent and technology which rose 0.4 percent.