SAN FRANCISCO — Microsoft reported quarterly revenue and profit that beat analysts’ expectations, driven by aggressive cost cutting and growing demand for its cloud products and services.

CEO Satya Nadella has focused on cloud services and mobile applications on slower growth in its traditional software business. Companies moving much of their information technology off premises, part of the cloud-computing trend, proved a bright spot.

"The enterprise cloud opportunity is massive, larger than any market we have ever participated in," Mr Nadella said in a conference call.

Microsoft’s stock had climbed more than 26% in the past 12 months to $52.06 at Thursday’s close, even as the broader market had dropped 5%. The shares rose 3% in after-hours trading.

Revenue from the "intelligent cloud" business, which includes products such as its Azure cloud infrastructure and services business, along with other noncloud products such as traditional servers, rose 5% to $6.3bn.

Perhaps a better indicator of its cloud strength is what the company calls its combined cloud business, on track for $9.4bn in annual revenue, the company said. That measure, which includes Azure plus other businesses such as Office 365, is up 15% from the $8.2bn revenue it estimated last quarter.

"They nailed the cloud," said Matt Howard, a venture capitalist at Norwest Ventures who monitors Microsoft closely.

Total revenue, however, fell 10.1% to $23.8bn, squeezed by a strong dollar as well as a weak personal computer market that has reduced demand for Microsoft’s Windows operating system. On an adjusted basis, revenue fell to $25.69bn but beat analysts’ estimates.

Microsoft generates more than half of its revenue from outside the US.

Revenue in the business that includes Windows fell 5% to $12.66bn. Windows revenue closely tracks sales of personal computers, which fell 10.6% globally in the December quarter from a year earlier, according to research firm IDC.

IDC said business should improve later this year as companies that had delayed replacing machines before upgrading to Windows 10 make the switch. Microsoft released Windows 10 in July.

Microsoft’s net income fell to $5bn, or 62c per share in its second-quarter ended December 31, from $5.86bn, or 71c per share, a year earlier. Excluding items, the company earned 78c per share.

Analysts on average had expected a profit of 71c per share and revenue of $25.26bn, according to Thomson Reuters IBES.