However, the company, which is wrapping up its $34 billion (£26 billion) cloud deal for Linux software maker Red Hat Inc, guided 2019 free cash flow below analysts' expectation, adding to investor concerns following the deal, the company's biggest.

IBM said revenue slipped to $21.76 billion in the three months ended Dec. 31, but came in above analysts' average estimate of $21.71 billion, according to IBES data from Refinitiv.

The company reported net income of $1.95 billion, or $2.15 per share, compared with a loss of $1.05 billion, or $1.14 per share, a year earlier.

IBM recorded a charge of $1.9 billion related to the U.S. tax overhaul in the latest reported quarter. The company took a $5.5 billion charge related to the tax reform in the year-ago quarter.

Excluding special items, the company earned $4.87 per share. Analysts had expected $4.82. It was not immediately clear if the numbers were comparable.

IBM also forecast operating earnings for 2019 to be "at least" $13.90 per share, while analysts on average were expecting $13.79.

The company said it expects free cash flow of about $12 billion for the year, roughly in line with 2018. Analysts on average are expecting $12.67 billion for 2019.

Under Chief Executive Officer Ginni Rommetty, IBM has been refocusing towards faster-growing cloud and analytics services to lower its dependence on its traditional hardware products and reverse years of revenue declines

Underscoring that push, IBM in October agreed to buy Red Hat, a deal expected to close in the second half of the year.

The company is also shedding some of its legacy business as part of the shift. The company said in December it would sell some of its software products business to India's HCL Technologies for $1.80 billion.

IBM said its cloud business, part of what it refers to as "strategic imperatives", grew 12 percent to $19.2 billion in 2018.

The company's cognitive software business, which houses artificial intelligence platform Watson, analytics and cybersecurity services and is its second biggest, reported sales of $5.46 billion, compared with analysts' expectation of $5.25 billion.

IBM's revenue of $4.32 billion from its global businesses services segment also beat estimates of $4.15 billion.

The Armonk, New York-based technology services giant, which makes over 60 percent of its revenue from outside the United States, had warned in the third quarter that a strong dollar would hit its revenue.

(Reporting by Pushkala Aripaka in Bengaluru; Editing by Sriraj Kalluvila)