U.S. stocks managed modest gains on Tuesday as better-than-expected corporate profits overshadowed concerns about weak consumer demand.

The Dow Jones industrial average <.DJI> was up 27.81 points, or 0.33 percent, to end unofficially at 8,359.49. The Standard & Poor's 500 Index <.SPX> was up 4.78 points, or 0.53 percent, to finish unofficially at 905.83. The Nasdaq Composite Index <.IXIC> was up 6.52 points, or 0.36 percent, to close unofficially at 1,799.73.

(Reporting by Edward Krudy; Editing by Jan Paschal)