Microsoft reported quarterly earnings missed analysts' expectations on Thursday, while revenues came basically in line.
The technology giant posted fiscal third-quarter earnings per share of 62 cents, compared to 61 cents a share in the year-earlier period. Revenue for the quarter came in at $22.08 billion, against the comparable year-ago figure of $21.73 billion.
Analysts expected Microsoft to report earnings of 64 cents a share on $22.09 billion in revenue, according to a consensus estimate from Thomson Reuters.
Shares of the tech giant traded more than 4 percent lower in after-hours following the release, and fell as much as 5 percent.
Microsoft's international business was hurt by a strong U.S. dollar, as well as declining PC sales. On April 11, research firm Gartner said worldwide PC shipments declined 9.6 percent year over year in the first quarter, marking the sixth-straight quarter of PC shipment falls.
However, its cloud business grew more than expected last quarter.
"Organizations using digital technology to transform and drive new growth increasingly choose Microsoft as a partner," Satya Nadella, chief executive officer at Microsoft, said in a release. "As these organizations turn to us, we're seeing momentum across Microsoft's cloud services and with Windows 10."
Microsoft said its Intelligent Cloud business grew 8 percent in constant currency last quarter to $6.1 billion. Analysts expected the firm to report $6.28 billion in revenue from that segment, according to StreetAccount. Within the segment, Azure revenue grew by 120 percent.
"They really have changed perceptions from being a pure PC play to being a cloud play on a longer-term basis, " David Katz, president and chief investment officer at Matrix Asset Advisors, told CNBC's "Squawk Alley" Thursday before earnings were released. "We are watching carefully the PC decline but we do think the cloud is picking up in a meaningful way — and if that's the case, we think earnings finally are going to go up and break through the $3 number next year … so we think Microsoft can be about 20 percent higher in the next 12 to 18 months."
Meanwhile, the company's More Personal Computing segment, made up in part by Microsoft's PC business, grew 3 percent in constant currency, to $9.5 billion, above the expected $9.24 billion.
Microsoft shares are only up 1.6 percent in 2016, but have spiked 11 percent in the last three months and 18 percent over the past six months.
Microsoft in last 6 months
What are shares of Microsoft doing? Click here to track the stock.
— CNBC's Anita Balakrishnan contributed to this report.
Correction: This story has been updated to reflect that Microsoft's revenue was $22.08 billion, not $22.07 billion.