U.S. stocks inched ahead on Tuesday after the makers of Kellogg’s cereal and Oreo cookies joined the parade of companies reporting stronger-than-expected profits.

On Tuesday:

The Standard & Poor’s 500 index gained 2.43 points, or 0.1 percent, to 2,575.26.

The Dow Jones industrial average rose 28.50, or 0.1 percent, to 23,377.24.

The Nasdaq composite gained 28.71, or 0.4 percent, to 6,727.67.

The Russell 2000 index of smaller-company stocks gained 11.64, or 0.8 percent, to 1,502.53.

For the week:

The S&P 500 is down 5.81 points, or 0.2 percent.

The Dow is down 56.95 points, or 0.2 percent.

The Nasdaq is up 26.41 points, or 0.4 percent.

The Russell 2000 is down 5.78 points, or 0.4 percent.

For the year:

The S&P 500 is up 336.43 points, or 15 percent.

The Dow is up 3,614.64 points, or 18.3 percent.

The Nasdaq is up 1,344.55 points, or 25 percent.

The Russell 2000 is up 145.40 points, or 10.7 percent.