Stocks gained and were at session highs in afternoon trading on Thursday, with technology shares advancing ahead of quarterly results from International Business Machines Corp .

IBM shares were up 2.5 percent at $109.87 and gave a boost to the Dow industrials.

The Dow Jones industrial average <.DJI> was up 51.77 points, or 0.60 percent, at 8,667.98. The Standard & Poor's 500 Index <.SPX> was up 4.45 points, or 0.48 percent, at 937.13. The Nasdaq Composite Index <.IXIC> was up 13.51 points, or 0.73 percent, at 1,876.41.

(Reporting by Caroline Valetkevitch; Editing by Padraic Cassidy)