Shares of Microsoft are climbing on Friday after the company managed to beat analyst expectations despite declining PC sales.Microsoft reported quarterly profit of about $5.6 billion, or $0.68 a share, for the quarter, topping last year's results and analyst expectations of profit of 63 cents a share, according to Thomson Reuters. Sales fell by 0.4% to $20.4 billion, in line with analyst estimates. Market research firms Gartner and IDC estimate that personal computer shipments fell by two-to-four-percent. That was partially offset by a surge in customers who paid to upgrade their computers in light of Microsoft's decision to end support for its 13-year-old Windows XP operating system on April 18. Revenue from devices and consumer products like the XBox One rose 12%. It was the first quarterly earnings release under new CEO Satya Nadella, who has been behind the company's push into cloud computing. Sales from Microsoft's Office 365 cloud product more than doubled in the period, gaining one million subscribers, while gross margin in the Commercial Other segment, which contains cloud products, rose by 80%. At last check, shares of Microsoft were inching higher by 0.3% to $39.98. In New York, I'm Brittany Umar for TheStreet. -- Written by Brittany Umar in New York.