For the full year, IBM earned $16.6 billion, or $14.37 per share, up 5 percent from $15.86 billion, or $13.06 per share, in 2011. Adjusted earnings were $15.25 per share last year, above analysts' estimates of $15.14.
Revenue declined 2 percent to $104.5 billion from $106.9 billion. Analysts had expected slightly lower revenue of $104.4 billion.
For 2013, IBM expects earnings of at least $15.53 per share. It expects adjusted earnings of at least $16.70, above the $16.65 that analysts were expecting.
The company said it is "well on track" toward its long-term outlook for adjusted earnings of at least $20 per share in 2015. By 2015, it also expects software to account for more than half its total profit. In 2012, software accounted for 45 percent of IBM's profit, up from 43.5 percent a year earlier.
Armonk, N.Y.-based IBM's stock rose $8.37, or 4.3 percent, to $204.45 in after-hours trading. The stock had closed up $1.61 at $196.08 in the regular session.
How to Profit From Fracking and Shale. Access Our Free Report Here.