About two stocks rose for every one that fell on the New York Stock Exchange, where volume came to a relatively low 726 million shares, compared with 957.4 million shares at the same time a day earlier.
Oil prices rose after six days of declining. Crude rose 23 cents to $60.37 a barrel on the New York Mercantile Exchange. A little over a week ago, crude prices stood at $73 a barrel. The falling price of oil has put pressure on markets around the world in recent days.
In other trading, the Russell 2000 index of smaller companies dipped 0.41, or 0.09%, to 481.73. The VIX index, a measure of market volatility, fell 1.77, or 5.7%, to 29.53.
The dollar fell against other major currencies, while gold prices rose.
Overseas Thursday, Japan's Nikkei stock average fell 1.4%. Britain's FTSE 100 rose 0.5%, Germany's DAX index gained 1.3%, and France's CAC-40 added 0.5%.