NEW YORK — Stocks shot higher Tuesday, giving the market its biggest gain in a month. Results at Mattel, Goldman Sachs and Johnson & Johnson were all above expectations.

It was the second day of broad gains following a down week last week. Investors had been worried headed into the third-quarter earnings season that corporate profits wouldn’t be good enough to justify the run-up in stocks. While earnings haven’t been out-of-the-park great, they haven’t been as bad as some had feared.

Also Tuesday, the Labor Department said consumer prices rose 0.1 percent last month, not counting food and energy costs. And gasoline prices have come down since then. Also, a measurement of home-builder confidence rose to its highest level in six years.

The Dow Jones industrial average rose 127.55 to close at 13,551.78, its biggest gain since Sept. 13. The S&P 500 rose 14.79 to 1,454.92. The Nasdaq composite rose 36.99 to 3,101.17.

REDMOND, Wash. — Microsoft’s first tablet computer, the Surface, will start at $499 when it goes on sale Oct. 26.

The price matches that of Apple’s iPad, the most popular tablet computer, but the base model of the Surface has twice as much storage memory, 32 gigabytes. The screen also is slightly larger.

The signature hardware feature of the tablet, a cover that doubles as a keyboard, will cost another $100, Microsoft said Tuesday. A step-up model for $699 has twice the memory, 64 GB, and includes a cover.

NEW YORK — Coca-Cola has a formula for growth in the volatile economic climate — sell more of its drinks in emerging markets and evolve its stable of products at home, where concerns over sugary drinks are intensifying.

The world’s biggest beverage maker, which also makes Sprite, Fanta, Minute Maid and Dasani water, said the strategy helped lift its global sales volume by 4 percent in the third quarter. But with unfavorable currency exchange rates and pressures to keep prices in check in economically hard-hit regions in Asia and Europe, total revenue rose just 1 percent, which was shy of Wall Street expectations.

OMAHA, Neb. — CSX Corp. said its third-quarter profit and revenue slipped 2 percent because the railroad delivered fewer carloads of coal and crops, and fuel surcharge revenue declined.

CSX said the railroad’s earnings per share actually increased 2 percent because it had fewer shares outstanding.

The railroad said Tuesday that it generated $455 million net income. Revenue fell 2 percent to $2.89 billion as the mix of goods it carried changed.

CSX is one of the two major commercial rail haulers that serve Charleston.

ARMONK, N.Y. — IBM said its third-quarter earnings remained unchanged from a year ago despite an unexpected charge and a steeper drop in revenue than analysts anticipated.

IBM earned $3.8 billion, or $3.33 per share, in the July-September period. Revenue for the quarter fell 5 percent from last year to $24.7 billion, about $1 billion below analyst projections.

Staff and wire reports