Stocks climbed on Tuesday after stronger-than-expected quarterly earnings from such bellwethers as Goldman Sachs and Johnson & Johnson helped ease concerns about a dismal quarterly earnings season.

Dow components Johnson & Johnson and UnitedHealth Group both raised their full-year profit views while Goldman Sachs increased its dividend.

Goldman Sachs shares gained 0.4 percent to $124.97 after the banking company posted earnings that beat expectations and revenue that more than doubled. Goldman's results followed earnings in the two previous sessions from Citigroup Inc , JP Morgan Chase & Co and Wells Fargo .

Shares of Johnson & Johnson, the diversified U.S. healthcare company, rose 1.4 percent to $69.53. In contrast, UnitedHealth shed 1.3 percent to $56.73.

The S&P 500 is on track for its second consecutive advance, and its best two-day run in a month on the heels of last week's 2.2 percent slide. That was the benchmark index's worst weekly decline in four months as investors looked for more evidence on the global economic climate from large multinational companies.

"One of the biggest things coming into this earnings reporting season was this drumbeat for how bad it was going to be," said Art Hogan, managing director of Lazard Capital Markets in New York.

"We went through a period of time last week where we focused on how bad it was going to get, and we've got a chance to get some of that back because the worst-case scenario is not playing out."

The Dow Jones industrial average rose 123.43 points, or 0.92 percent, to 13,547.66. The Standard & Poor's 500 Index gained 14.49 points, or 1.01 percent, to 1,454.62. The Nasdaq Composite Index advanced 33.55 points, or 1.09 percent, to 3,097.73.

Coca-Cola Co also reported a rise in earnings, but quarterly revenue came in short of Wall Street's expectations, hurt by declines in Europe and Asia. Its stock slid 0.8 percent to $37.81.

Citigroup unexpectedly announced that Chief Executive Vikram Pandit had resigned effective immediately, along with Chief Operating Officer John Havens. Michael Corbat, previously chief executive for Europe, Middle East and Africa, was named to succeed Pandit.

The announcement came one day after a surprisingly strong quarterly earnings report. Citigroup's stock gained 1 percent to $37.03.

"It certainly is a bit of a shock," said Jeff Morris, head of U.S. equities at Standard Life Investments in Boston. "Certainly the transitioning and the messaging was more abrupt than I think anybody would have anticipated."

As earlier profit warnings from large multinationals left investors leery of the third-quarter earnings season, Tuesday's earnings helped decrease concerns about the global economy. Materials stocks, closely tied to economic fortunes, were the S&P 500's best performers. The S&P materials index gained 2.2 percent.

Quarterly profits of S&P 500 companies are seen dropping 2.3 percent from the year-ago period, according to Thomson Reuters data through Tuesday morning. With about 10 percent of S&P companies having reported, 60 percent have topped profit expectations, under the average beat rate of 67 percent for the past four quarters.

Intel and International Business Machines Corp are scheduled to report earnings after the closing bell. Their results will be among the first major earnings reports from the tech sector, which has been hit by a number of profit warnings, including from Intel.

In Tuesday afternoon trading, Intel's stock rose 2.4 percent to $22.26. IBM shares rose 0.8 percent to $210.54.

Economic data showed the overall U.S. Consumer Price Index rose 0.6 percent in September as the cost of gasoline surged, posing a threat to consumers' spending power. On the other hand, inflation pressures look unlikely to derail the Federal Reserve's ultra-easy policy path.

(Reporting by Chuck Mikolajczak; Editing by Jan Paschal)