Image copyright Getty Images

Microsoft's focus on cloud computing has helped it deliver better-than-expected quarterly profits, sending its shares to an all-time high.

The software giant posted a $4.7bn (£3.8bn) profit for the three months to September.

Chief executive Satya Nadella has focused on building Microsoft's expertise in cloud-based services amid slowing PC sales.

Shares rose 6% to $60.73 in after-hours trading.

The previous high was $59.97 in December 1999, close to the peak of the dot-com boom, shortly before Steve Ballmer replaced Bill Gates as chief executive.

When Mr Nadella succeeded Mr Ballmer in 2014, Microsoft's shares were trading below $37.

Changing environment

Investor confidence in Microsoft has been restored by focusing on mobile and cloud computing rather than its traditional products such as the Windows operating system and Office software.

Individuals and businesses are increasingly accessing computing services such as servers, databases, software and storage that are provided over the internet ("the cloud").

And Mr Nadella said the changing business environment meant this was paying off.

"It's not just the Silicon Valley startups anymore; it is the core enterprise that is also becoming a digital company. And we are well-positioned to serve them," Mr Nadella said.

Revenue from Microsoft's Office 365 cloud service increased 8% in the quarter while revenue from its Surface tablet - pitched as a rival to the iPad - rose 38%.

And while revenue from its flagship Xbox - Microsoft's games console - fell, the number of people playing online rose to 47 million from 39 million a year.