Sales came in higher than the 0.3 percent economists had forecast, giving support to stocks that slipped early, taking a cue from Asia and Europe, where stocks sputtered.
With investors concerned about government debt in Greece, Italy, Spain and elsewhere, the European Commission's data office Eurostat said gross domestic product growth in the third quarter slowed to 0.2 percent in the 17-member eurozone and the 27-member European Union.
Olli Rehn, the European Commissioner for Economic and Monetary Affairs said economic recovery "has now come to a standstill, and there is a risk of a new recession," The New York Times reported Tuesday.
By close of trading on Wall Street, the Dow Jones industrial average added 17.18 points or 0.14 percent to 12,096.16. The Standard & Poor's 500 index gained 6.03 points or 0.48 percent to 1,257.81. The Nasdaq composite index gained 28.98 points or 1.09 percent to 2,686.20.
On the New York Stock Exchange, 1,922 stocks advanced and 1,105 declined on a volume of 3.3 billion shares traded.
The benchmark 10-year treasury note rose 3/32 to yield 2.05 percent.
The euro fell to $1.3537 from Monday's 1.3634. Against the yen, the dollar fell to 77.03 yen from Monday's 77.07 yen.
In Tokyo, the Nikkei 225 index shed 0.72 percent, 61.77, to 8,541.93.
In London, the FTSE 100 index lost 0.03 percent, 1.60, to 5,517.44.