IBM said Wednesday that its second-quarter net income fell 17 percent as revenue slipped and it absorbed the cost of layoffs.
Net income came to $3.23 billion, or $2.91 per share, down from $3.88 billion, or $3.34 per share, a year earlier.
Excluding a $1 billion charge related to layoffs, IBM Corp.'s adjusted earnings came to $3.91 per share. That beat the $3.77 per share expected by analysts polled by FactSet, and IBM shares rose in after-hours trading.
Revenue fell 3 percent to $24.92 billion. The figure was below the $25.35 billion expected by analysts.
Services sales dipped 5 percent, while hardware sales were off 12 percent. Software revenue, however, grew 4 percent.
Andrew Bartels, an analyst with research firm Forrester, said the shifts among categories were a net positive for IBM.
"Their strategic focus on software is paying off," Bartels said. "Because that software growth has the best profit margins."
The Armonk, N.Y., company also raised its annual profit outlook. It now expects to earn an adjusted $16.90 per share for the full year, above the $16.66 analysts expected.
The company's previous guidance was for full-year earnings of $16.70. The previous guidance included the charge for layoffs, which amounts to 65 cents per share.
The sale of an IBM hardware business - reportedly its small server business based on Intel chips - was meant to offset the layoff charge this year. But IBM said the sale had been delayed until at least next year. So it excluded both items from its new guidance.
The company said the new guidance was still an apples-to-apples comparison to its previous guidance.
Chief Financial Officer Mark Loughridge said the workforce restructuring would begin to show benefits in the third quarter and more fully in the fourth quarter.
He said the company was on track to post operating earnings of $20 per share in 2015 and return $70 billion to shareholders in the five-year period ending in 2015.
IBM shares rose $4.72, or 2.4 percent, to $199.27 in after-hours trading. They closed up 70 cents at $194.55 in the regular session.