Strong earnings from big tech companies, including Apple (AAPL -2.19%), failed to propel the Dow Jones Industrial Average (^DJI -0.65%) higher on Friday. The Dow was down around 0.75% at 2:20 p.m. EDT.

Apple was one of the few gainers in the Dow on Friday, surging after the company reported sales that were far ahead of expectations. Heavy machinery manufacturer Caterpillar (CAT -0.47%) also beat estimates, but a steep revenue and profit decline sent the stock sharply lower.

A man standing in front of a drawing of a scale.

Image source: Getty Images.

Apple reports blowout results

Going into Apple's fiscal third-quarter report, it was almost a foregone conclusion that sales of the tech giant's pricey gadgets would be hurt by the pandemic. That assumption turned out to be far too pessimistic. Apple reported revenue of $59.7 billion for the quarter, up 11% year over year and a whopping $7.1 billion ahead of the average analyst estimate.

In a surprising twist, sales of iPhones rose slightly in the quarter, buoyed by the launch of the affordable iPhone SE. Apple's other devices performed even better: Mac revenue jumped 21.6%; iPad revenue rose 31%; and wearables, home, and accessories revenue surged 16.7%. The services segment, Apple's second-largest source of revenue, grew sales by about 15%.

Apple's bottom line also came in ahead of expectations, with earnings per share of $2.58 up 18% year over year and $0.51 higher than analysts were expecting. In addition to the earnings news, Apple announced that it will be implementing a four-for-one stock split. The company also confirmed during the earnings call that its upcoming iPhones will launch a few weeks later than usual this year.

Economic stimulus in the U.S. no doubt played some role in driving Apple's sales. Direct payments to Americans, as well as a supercharged unemployment benefit, put plenty of cash in consumers' pockets. Combine that cash with the boredom of staying home amid the pandemic, and the end result appears to be increased demand for Apple's products.

Apple stock was up about 7.3% Friday afternoon. Shares are now up about 40% since the start of the year.

Caterpillar sees demand dry up

While iPhones were in demand during the second quarter, the same can't be said for heavy machinery. Caterpillar reported revenue of $10 billion for quarter, down 31%. Earnings per share tumbled 70% to $0.84. Both numbers beat analyst expectations, but it wasn't enough to prevent the stock from slumping.

Sales were down in all three of Caterpillar's segments; the construction industries segment was the weakest performer with a 37% decline. Lower end-user demand coupled with a $1.4 billion reduction in dealer inventories were the drivers behind Caterpillar's weak sales performance.

While Caterpillar didn't provide guidance for the full year, the company said it expects end-user demand to drop by a similar percentage in the third quarter as it did in the second quarter. Dealers are also expected to reduce inventory levels, with the company anticipating a $2 billion reduction for the full year.

Shares of Caterpillar were down about 3.4% by Friday afternoon. The stock is now down more than 10% this year.