Stocks were little changed on Friday as May sales at U.S. retailers fell unexpectedly, while a consumer sentiment index topped forecasts, offering a mixed picture of the health of the U.S. economy.

Total sales dropped for the first time in eight months after rising 0.6 percent in April, while the preliminary reading of U.S. consumer sentiment improved in June to its strongest point in over two years, easily topping forecasts.

It's a good number and could provide reassurance after the retail sales number, which was particularly weak, said Nigel Gault, chief U.S. economist at IHS Global Insight in Lexington, Massachusetts. After that, the first question on everyone's mind was whether consumers were pulling back in a major way.

According to this survey, they're not, at least not in a major way.

Macy's Inc added 0.5 percent to $21.38 while the Morgan Stanley Retail index <.MVR> climbed 0.6 percent.

The Dow Jones industrial average <.DJI> slipped 10.73 points, or 0.11 percent, to 10,161.80. The Standard & Poor's 500 Index <.SPX> gained 0.02 points, or 0.00 percent, to 1,086.86. The Nasdaq Composite Index <.IXIC> rose 13.60 points, or 0.61 percent, to 2,232.31.

U.S.-listed shares of BP Plc climbed 4.5 percent to $34.24 as UK officials made supportive comments, even as scientists doubled estimates of the Gulf of Mexico oil spill.

The Nasdaq moved higher on strength in semiconductor stocks after National Semiconductor Corp forecast margins and revenues above estimates, signaling that demand is bouncing back after a miserable 2009 for the microchip industry.

The PHLX Semiconductor index <.SOXX> climbed 1 percent.

(Reporting by Chuck Mikolajczak; additional reporting by Ryan Vlastelica; editing by Jeffrey Benkoe)