Stocks posted their biggest gains in nearly two months on Tuesday as retail sales figures allayed fears over the economy that had driven a six-week slump in the market.

Based on the latest available data, the Dow Jones industrial average <.DJI> was up 123.21 points, or 1.03 percent, at 12,076.18. The Standard & Poor's 500 Index <.SPX> was up 16.06 points, or 1.26 percent, at 1,287.89. The Nasdaq Composite Index <.IXIC> was up 39.03 points, or 1.48 percent, at 2,678.72.

(Reporting by Caroline Valetkevitch)