IBM reported quarterly earnings that beat expectations on Tuesday as the cloud business soared. But sales fell short as the company capped five straight years of declining year-over-year quarterly revenues. The company's shares dropped more than 5 percent after hours.

Earnings

EPS: $2.38 a share vs. $2.35 a share expected by Thomson Reuters

Revenue: $18.16 billion vs. $18.39 billion expected by Thomson Reuters That's a 1 percent gain in earnings per share, and a 3 percent decline in revenue from a year ago, the company said. Full-year 2017 EPS guidance: $13.80 per share, vs. $13.78 per share expected by Thomson Reuters

Big Blue bets on cloud, A.I.

IBM is in the midst of an uneasy transition from its traditional business model to newer bets, like cloud computing and artificial intelligence. Still, New York–based company has seen a five-year stretch of year-over-year revenue declines going back to April 2012, when sales were nearly flat from the year-ago period, according to FactSet. "The portfolio will grow. I am confident that the IBM company will grow again," chief financial officer Martin Schroeter told CNBC. "We're taking time to make sure we invest in the right places and make sure we get the kind of margin high-value profile we're looking for." In a statement, Schroeter said the company had ramped up research and development spending during the quarter. R&D expenditures did edge higher, to $1.53 billion during the quarter, up from $1.46 billion a year ago. The legacy enterprise technology company, founded over 100 years ago, has reorganized around "strategic imperatives," which include businesses like cloud , analytics, mobility and security. In 2016, those strategic imperatives grew to represent more than 40 percent of total revenue, CEO Ginni Rometty said earlier this year. "For us what it's always been about for us is a shift as much as it is adding to that pie," Schroeter said in the conference call. "So I think the adding to the pie now is behind us and the shift will continue. So we'll continue to invest heavily in the strategic imperatives, but it won't represent the same growth that we've seen in the past."