Apple Inc. earned $6.9 billion in its third quarter, a 22 percent drop from last year. Figures show people aren't buying the latest-generation items, which cost more.

The results announced Tuesday mark the second straight quarter that Apple Inc.’s earnings have fallen from the previous year after a decade of steadily rising profits. The company earned $6.9 billion, or $7.47 per share, in its fiscal third quarter, a 22 percent drop from $8.8 billion, or $9.32 per share.

Despite that, Apple fared better than analysts anticipated. That helped lift the company’s stock by $22.01, more than 5 percent, to $441 in extended trading. The shares remain down by more than 35 percent since the latest model of the iPhone came out 10 months ago.

Apple’s revenue for the three months ending June 29 barely budged from last year. That’s the smallest revenue increase since the Cupertino, Calif., company unleashed a mobile computing revolution with the iPhone six years ago. Apple hasn’t released another breakthrough product since the iPad three years ago, raising concerns the company has lost its touch since the 2011 death of founder Steve Jobs.

The earnings topped the average estimate of $7.31 per share among analysts surveyed by FactSet. Rev­e­nue totaled $35.3 billion ver­sus $35 billion a year ago. Analysts had projected that revenue would be unchanged. As usual, Apple was propelled by iPhone sales. The company sold 31.2 million units in the quarter, a 20 percent increase from the same time a year ago. But many people were evidently buying earlier generations of the smartphone, which have smaller profit margins. IPhones sold for an average of $581 in the past quarter; the average was $608 a year ago. The same phenomenon occurred with the iPad, and Apple sold 14 percent fewer tablets – 14.6 million in the past quarter compared with 17 million a year ago.