Stocks fell on Tuesday, weighed by data pointing to weak consumer demand and by profit-taking in banks after a run-up in anticipation of strong results from Goldman Sachs Group .

Even though June total retail sales rose 0.6 percent, more than forecast, rising gasoline prices were a big part. Excluding autos and gas sales, retail sales registered a fourth consecutive monthly decline.

A rebound in sales is considered vital for the U.S. economy to bounce back from recession, as consumer spending accounts for roughly two-thirds of the country's economic activity.

Stocks rallied on Monday on hopes that results from Goldman Sachs would kick-off a stronger than expected earnings season for the financial sector. Indeed, Goldman posted a solid quarterly profit as its trading revenue nearly doubled.

But investors booked profits as they braced for more bank results later in the week from Bank of America Corp , Citigroup Inc and JP Morgan Chase & Co . Goldman shares rose 0.3 percent to $149.82, but BofA slipped 0.9 percent and JP Morgan was off 1.2 percent.

The S&P gauge of the financial sector <.GSPF> fell 1.1 percent.

The (Goldman) numbers were in line with what most of the street was looking for, but I think there were some whisper numbers out there that saw an even better bottom line, said Tom Schrader, managing director of U.S. equity trading at Stifel Nicolaus Capital Markets in Baltimore.

He added that the slight increase in retail sales was not enough to give the market direction.

I think we're range-bound until we get deeper into the earnings season,, Schrader said.

The Dow Jones industrial average <.DJI> lost 35.83 points, or 0.43 percent, to 8,295.85. The Standard & Poor's 500 Index <.SPX> dropped 3.33 points, or 0.37 percent, to 897.72. The Nasdaq Composite Index <.IXIC> fell 8.23 points, or 0.46 percent, to 1,784.98.

The S&P 500 jumped 40 percent from its 12-year low hit in early May, but the rally wilted in June as investors sought hard evidence that the U.S. economy, in recession since December 2007, is recovering.

The index is up 33 percent from the March lows.

Looking ahead into earnings season, results from Intel Corp , expected after the closing bell, will be closely watched following Dell Corp's forecast Monday of lower gross margins in the quarter as demand has shifted toward cheaper computers such as netbooks.

Dell shares fell 4.5 percent to $12.43, weighing down the Nasdaq and the information technology sector of the S&P 500 <.GSPT>.

Gainers included shares of CSX Corp , which shot up more than 6 percent a day after the U.S. railroad posted a better-than-expected quarterly profit by slashing costs. It led the Dow Jones Transportation Average <.DJT> up 1.8 percent.

(Editing by Padraic Cassidy)