(Bloomberg) -- International Business Machines Corp. reported better-than-expected sales and affirmed its full-year outlook, suggesting the company’s focus on software and hybrid cloud services is paying off.

Third-quarter sales gained 4.6% to $14.8 billion, the Armonk, New York-based company said Wednesday in a statement. Analysts, on average, estimated $14.7 billion. IBM also reiterated that annual sales will growth 3% to 5% and free cash flow will be about $10.5 billion.

As part of its transformation, IBM has divested its managed infrastructure, weather and health businesses in recent years. In August, the company completed the acquisition of software management company Apptio for $4.6 billion. Ahead of the results, analysts raised concerns that an unpredictable economy would hurt IBM’s consulting unit. The division reported $5 billion of sales in the quarter, slightly short of the $5.1 billion expected by analysts.

Much of that miss is attributable to a strengthening US dollar, since many of IBM’s consulting customers are overseas, Chief Financial Officer Jim Kavanaugh said in an interview. Consulting customer behavior hasn’t changed much since the start of the year, he added.

Sales in software, a crucial business unit for a revamped IBM, increased 7.8% to $6.3 billion. Acquired unit Red Hat gained 9%, another comparatively slow quarter for the business that once regularly jumped above 20% each quarter. Profit, excluding some items, was $2.20 per share in the period ended Sept. 30, compared with an average estimate of $2.12.

Slowdowns in consulting and Red Hat indicate pressure on discretionary corporate tech spending, wrote Bloomberg Intelligence’s Anurag Rana. “We believe the Consulting segment’s challenges will accelerate in 4Q amid worsening geopolitical concerns.”

In May, IBM announced a platform for large companies to train and use artificial intelligence models, leaning on its Watson legacy to try to stand out in the crowded field for AI tools. The company has booked a few hundred million dollars worth of generative AI business, which is split between consulting and software, Kavanaugh said.

Currency movements affected IBM’s results by about $250 million, including in the consulting business, he said. Exchange rates may cost full-year revenue growth about 1%, the company said.

The shares gained about 1.5% in extended trading after closing at $137.08 in New York. IBM has missed out on the rally in tech stocks, with the stock slipping 2.7% this year.

(Updates with comments from analyst in the sixth paragraph.)

©2023 Bloomberg L.P.