IT veteran International Business Machines (IBM -1.37%) reported second-quarter results on Tuesday evening. Big Blue knocked this quarter out of the park, crushing analyst estimates across the board. As a result, the stock surged as much as 6.7% higher on Wednesday.

Q2 sales and earnings beat expectations

IBM's second-quarter sales crept 2% higher year over year, landing at $15.8 billion. On the bottom line, adjusted earnings rose by 11% to $2.43 per diluted share. Your average Wall Street analyst would have settled for earnings near $2.20 per share on roughly $15.6 billion in top-line revenues.

Management explained that software and infrastructure sales came in above expectations while consulting revenues were a bit soft. Artificial intelligence (AI) played a leading role in this success story, as it has done in recent reports.

"Our results underscore the continued success of our hybrid cloud and AI strategy and the strength of our diversified business," CEO Arvind Krishna said on the earnings call.

AI's towering role in IBM's business plans

There's AI magic in pretty much everything IBM does nowadays. The Watson AI engine is a robust business in its own right, but its presence makes itself known in System Z mainframes, Red Hat's OpenShift services, the Granite AI development platform, and more. Demand for these machine-brain services is strong, and IBM is making money hand over fist.

This strong report inspired management to raise their full-year guidance for free cash flows from "about $12 billion" to "greater than $12 billion." That's up from $11.2 billion in fiscal year 2023.

IBM shares are now trading just 7% below their all-time highs set way back in 2013. This centennial technology giant looks ready to explore brand-new record prices as its AI expertise earns more business in the second half of 2024 and beyond.