U.S. stocks dipped on Tuesday as investors opted to book profits from the recent sharp run-up, while energy shares succumbed to pressure from retreating oil prices.

Standout drags included shares of big-cap technology companies, banks, home builders, and big manufacturers. These have all been among the market's bright spots in the two-month rebound off the 12-year lows of early March.

We've had a nice run over the last couple of months and I think it's just been a little too much, said Dean Barber, president of investment firm Barber Financial Group in Kansas City. We've been overbought a little bit at this point in time.

Shares of software maker Microsoft Corp , off 2.4 percent at $19.71, weighed on the Nasdaq. Shares of energy company Chevron , down nearly 2 percent at $65.50, were among the Dow's drags, along with those of No. 2 U.S. bank JPMorgan , off 2.7 percent.

Procter & Gamble
shared dropped 2.6 percent following news of problems at one of its manufacturing plants.

The Dow Jones industrial average <.DJI> shed 20.95 points, or 0.25 percent, to 8,405.79. The Standard & Poor's 500 Index <.SPX> dipped 4.72 points, or 0.52 percent, to 902.52. The Nasdaq Composite Index <.IXIC> lost 16.54 points, or 0.94 percent, to 1,747.02.

The market's recent push higher meant the benchmark S&P 500 ended in positive territory year-to-date on Monday, a feat that capped a 34 percent jump from a March 9 bear market low.

Increasingly less dire economic reports have boosted optimism that the economic recession that began in December 2007 may be abating, while some renewed confidence about the banking sector underpinned sentiment.

Even so, investors were also looking ahead to the release of government stress test results, due on Thursday, which may show about half of the 19 biggest banks under review need to raise more capital.

Tuesday's economic data showed that the vast services sector contracted less severely in April, adding to the brighter tone on the economy.

And Federal Reserve Chairman Ben Bernanke said the three-year U.S. housing bust may be near a bottom and that he expected the recession to end this year, barring a relapse of the financial crisis.

However, Bernanke also acknowledged growth would remain subdued and unemployment high. [ID:nN05470010].

U.S. front-month crude fell nearly 1 percent to $53.98 a barrel. The Dow Jones home construction index <.DJUSHB> dropped 4.3 percent.

The KBW Bank index <.BKX> -- which through Monday had risen 88 percent since March 9, slipped 1.1 percent -- with Wells Fargo down 3.7 percent to $23.36. But Citigroup gained 5.6 percent to $3.38.

Investors are optimistic that the largest banks do not need dramatic new government interventions. Among banks undergoing the test, Citigroup, for example, has been told it will need to boost its common equity by about $10 billion, a person familiar with the matter said on Monday.

Kraft Foods helped cushion losses on the Dow after the maker of household brands including Oreo cookies, reported a higher profit. Like many companies this earnings season, Kraft said its results were helped by raising prices and cutting costs, sending its shares up 6 percent to $25.71.

(Editing by Padraic Cassidy)