While the world economy has been jittery in recent months, IBM was still able to pull off decent Q2 earnings with net income up but revenue slightly down.

IBM reported Q2 net income of $3.9 billion, up 6 percent versus the year-ago quarter. However, the company’s Q2 revenue was $25.78 billion, down 3 percent versus its $26.67 billion revenue in the year-ago quarter.

While IBM reported a profit of $3.51 a share in the quarter, analysts were expecting the company to report $3.43.

“In the second quarter, we delivered strong profit, earnings per share, and free cash flow growth. This performance reflects continued strength in our growth initiatives and investments in higher value opportunities,” IBM CEO Ginni Rometty said in a statement. “These are fundamental elements of our long-term business model. Looking ahead, we are well positioned to deliver greater value to a wider range of clients and to our shareholders. Given our performance in the first half and our outlook for the second half, we are raising our full-year operating earnings per share expectations to at least $15.10.”

Investors responded positively to the results, as IBM stock is trading up about 2.5 percent in after-hours trading.

Here are the raw numbers from the company’s earnings report:

— Diluted EPS: — GAAP: $3.34, up 11 percent;
— Operating (non-GAAP): $3.51, up 14 percent;
— Net income: — GAAP: $3.9 billion, up 6 percent;
— Operating (non-GAAP): $4.1 billion, up 8 percent;
— Gross profit margin: — GAAP: 47.6 percent, up 1.2 points;
— Operating (non-GAAP): 48.2 percent, up 1.5 points;
— Revenue: $25.8 billion, down 3 percent, up 1 percent adjusting for currency;
— Free cash flow of $3.7 billion, up 9 percent;
— Software revenue, flat, up 4 percent adjusting for currency;
— Services revenue down 3 percent, up 1 percent adjusting for currency: — Services pre-tax income up 18 percent;
— Services backlog of $136 billion, down 6 percent, flat adjusting for currency;
— Systems and Technology revenue down 9 percent, down 7 percent adjusting for currency;
— Growth markets revenue up 2 percent, up 8 percent adjusting for currency;
— Business analytics revenue up 13 percent in the first half;
— Smarter Planet revenue up more than 20 percent in the first half;
— Cloud revenue doubled first-half 2011 revenue;
— Full-year 2012 operating (non-GAAP) EPS expectations raised to at least $15.10 from at least $15.00.

Photo credit: Daniel Voyager/Flickr