Microsoft CEO Satya Nadella speaks to participants during the Viva Technologie show at Parc des Expositions Porte de Versailles on May 24, 2018, in Paris

Sales jumped 14% in the latest quarter, driven by the company's transition to the public cloud as more large businesses offload their servers and data storage to Azure infrastructure. Gross margin, or the percentage of revenue left after accounting for the costs of goods sold, was 66.7% up from 65.4% a year earlier. Net income rose 19% to $8.8 billion.

Microsoft shares are trading near a record after rallying 34% over the past year. The stock climbed past $130.50 in extended trading, pushing the market cap over $1 trillion.

Microsoft reported fiscal third-quarter results on Wednesday, and the stock jumped more than 3% on better-than-expected earnings and revenue.

Azure's revenue surged 73%. Microsoft's commercial cloud business, which includes Azure, grew 41% in the quarter to $9.6 billion. While Azure is still much smaller than rival Amazon Web Service, Stifel analysts say it's growing faster than AWS was at a similar size.

"We continue to believe the shift to the cloud will be additive to Microsoft given a broader portfolio of products with deeper functionality as well as Microsoft's ability to enter new categories where it did not compete previously," wrote Stifel's Brad Reback, who has a buy rating on the stock.

Microsoft said on the earnings call that revenue in the fiscal fourth quarter will be $32.2 billion to $32.9 billion. Analysts expected $32.6 billion, according to Refinitiv.

Microsoft and AWS are in the last stages of competing for a $10 billion Department of Defense contract, known as JEDI, after IBM and Oracle were recently ruled out. Last week, Wedbush analysts said momentum has been moving toward Microsoft CEO Satya Nadella in his effort to catch Amazon's Jeff Bezos.

"The tide has turned significantly for MSFT on the 'game changing' $10 billion JEDI Beltway cloud deal for the Pentagon with our work in the field indicating this bake-off is now a toss-up and even odds between Bezos and Nadella vs. the slam dunk win for AWS that it appeared to be roughly a year ago," wrote Daniel Ives, an analyst at Wedbush, who recommends buying Microsoft shares. It "could represent a key positive catalyst for MSFT looking ahead when this winner likely gets announced in the summer time-frame," he wrote.

Microsoft is also benefiting from the move to cloud applications, pushing users of its traditional productivity products like Word and Excel to the cloud-based Office 365 suite. Commercial sales of Office 365 increased 30%. And LinkedIn, the professional networking site that Microsoft acquired for over $26 billion in 2016, continues to grow much faster than the overall business. LinkedIn's revenue climbed 27% in the quarter.

The company kicked off tech earnings season, with the mega-cap companies all slated to report in the next week. Facebook's revenue also topped estimates on Wednesday. Amazon reports on Thursday, followed by Alphabet and Apple early next week. Expectations are high, after the Nasdaq climbed to an intraday record on Wednesday.

WATCH: Microsoft tops revenue estimates in third quarter