International Business Machines (IBM) posted stronger-than-expected first-quarter earnings and raised its full-year guidance on Tuesday, but the blue-chip tech company’s shares retreated in the wake of a sales miss.

Joining a slew of big-name tech companies releasing results on Tuesday, IBM said it earned $3.1 billion, up 7% to from the year-earlier period’s $2.9 billion. On a per-share basis, the company earned $2.61, up from $2.31. 

Excluding one-time items, IBM earned $2.78 a share, topping the Street’s view of $2.65.

Hit by slumping hardware and global business software sales, IBM said revenue inched up just 0.3% to $24.67 billion, trailing consensus calls from analysts for a rise to $24.78 billion. Total gross margins expanded to 45.1% from 44.1% the year before.

“In the first quarter, we drove strong profit and earnings per share growth. We delivered another excellent software performance, expanded services margins, and continued the momentum in our growth initiatives," CEO Ginni Rometty said in a statement.

Looking ahead, IBM now said it expects to earn at least $14.27 in 2012, up from at least $14.16 earlier. On a non-GAAP basis, IBM sees EPS of at least $15.00, which would surpass the Street’s view of $14.94.

After jumping 2.33% to $207.45 during regular trading on Tuesday, shares of IBM pulled back in after-hours action. In recent trading, IBM was off 2.12% to $203.06.

IBM said its revenue in the Americas rose 1% last quarter to $10.5 billion from the year before, while revenues in its Europe/Middle East/Africa division slid 2%.

Sales in the faster-growing Asia-Pacific jumped 4% to $6.1 billion. Likewise, sales in Brazil, Russia, India and China – the so-called BRIC nations – climbed 10%.

IBM reported a 2% increase in global technology services sales to $10 billion, but a 2% drop in global business software revenue. The company’s overall services backlog stood at $139 billion as of the end of March, down 2% year-over-year.

IBM said software sales jumped 5% to $5.6 billion and pre-tax income rose 12%.

On the other hand, hardware revenue from IBM’s systems and technology segment fell 7%.

On the business software front, IBM competes with Larry Ellison’s Oracle (ORCL), struggling Hewlett-Packard (HPQ) and Germany’s SAP (SAP).

H-P and Oracle don’t report results until next month, while last week SAP revealed an 11% jump in sales amid a slower-than-expected 4% rise in software licenses.

Earlier on Tuesday, IBM inked an $850 million deal to unload its point-of-sale terminal business to Toshiba.

Fellow blue-chip technology company Intel (INTC) reported stronger-than-expected results after Tuesday’s close, but its shares retreated almost 2%.

Follow Matt Egan on Twitter @MattMEgan5