How the Dow Jones industrial average and other major indexes fared on Tuesday

Markets Associated Press

U.S. stocks ended higher Tuesday, erasing an early loss, as traders hoped for progress in talks in Europe on how to keep Greece in the euro. The gains were led by utilities stocks and makers of consumer staples, safe-play sectors investors tend to favor when they're fearful of market swings. Materials stocks fell as prices for metals dropped.

Continue Reading Below

For the day:

The Dow Jones industrial average gained 93.33 points, or 0.5 percent, to 17,776.91.

The Standard & Poor's 500 index increased 12.58 points, or 0.6 percent, to 2,081.34.

The Nasdaq composite edged up 5.52 points, or 0.1 percent, to 4,997.46.

For the week:

Continue Reading Below

The Dow is up 46.80 points, or 0.3 percent.

The S&P 500 index is up 4.56 points, or 0.2 percent.

The Nasdaq is down 11.76 points, or 0.2 percent.

For the year:

The Dow is down 46.16 points, or 0.3 percent.

The S&P 500 index is up 22.44 points, or 1.1 percent.

The Nasdaq is up 261.40 points, or 5.5 percent.