The Dow Jones Industrial Average (DJINDICES:^DJI) was leading the charge on Tuesday, up about 1.1% at 12:40 p.m. EDT and outperforming both the S&P 500 and the Nasdaq Composite by wide margins. While the number of confirmed cases of COVID-19 in the U.S. has dipped in recent days, the numbers remain elevated compared to the previous peak in April.

Shares of International Business Machines (NYSE:IBM) and Coca-Cola (NYSE:KO) rose on Tuesday following earnings reports from both companies. IBM beat estimates across the board, while Coca-Cola was only able to muster mixed results.

The IBM logo on a building.

Image source: IBM.

IBM does better than expected

Revenue slumped by 5.4% to $18.1 billion for IBM in the second quarter, with the pandemic taking a toll on the company's services segments. But that result was $400 million better than analysts were expecting. Adjusted earnings per share of $2.18 also beat estimates by $0.09, although the metric was down 31% year over year.

Some parts of IBM's business performed better than others. The cloud and cognitive software segment managed to grow revenue by 3%, thanks partly to the acquisition of Red Hat, and the systems segment enjoyed 6% revenue growth driven by a 68% rise in mainframe sales. Total cloud revenue, which spans all of IBM's segments, was up 34% on a constant currency basis, and Red Hat's stand-alone revenue was up 18%.

IBM's two large services segments did not fare as well. Global business services revenue dropped 7% year over year, and global technology services revenue fell 8%. The company is seeing some clients pulling back on discretionary spending, as well as lower volumes from hard-hit industries.

The mix shift away from the lower-margin services segments, as well as an improvement in gross margin for global business services, drove IBM's overall adjusted gross margin up 1.6 percentage points to 49%. However, pre-tax margin dropped 3.8 percentage points to 12.8%.

IBM stock didn't get much of a boost from its results on Tuesday, up just 0.5% by early afternoon. A challenging demand environment in the IT industry will likely continue to put pressure on IBM's revenue and profit.

Coca-Cola reports mixed results

A 28% revenue decline headlined Coca-Cola's second-quarter earnings report Tuesday morning. That decline was slightly worse than expected, with revenue of $7.2 billion missing analyst expectations by $60 million. The bottom line also fell off a cliff, with adjusted earnings per share down 33% to $0.42. EPS was $0.01 higher than the average analyst estimate.

There was some good news: Coca-Cola has seen improvements in global volumes since experiencing a 25% decline in April. Volumes were down just 10% in June, and so far in July volumes are down a mid-single-digit percentage. Elevated sales from the at-home channels are helping the cause, as are improving sales from the away-from-home channels.

Coca-Cola expects the second quarter to be the worst quarter of the year, although a high level of uncertainty remains. Coca-Cola's away-from-home sales recovery has been correlated with the easing of pandemic lockdowns, but many areas in the U.S. are now experiencing surging cases of COVID-19. New restrictions would likely put a damper on the company's away-from-home sales.

Coca-Cola's results were viewed favorably by the market, with the stock up 2.2% by early Tuesday afternoon. Shares of the beverage giant remain down about 17% since the beginning of the year.