What happened

Shares of Microsoft Corporation (NASDAQ:MSFT) popped 37.7% in 2017, according to data provided by S&P Global Market Intelligence, after the company repeatedly beat analysts' consensus earnings estimates in several of its quarters last year.

So what

Microsoft started 2017 on a high note when it reported its fiscal second-quarter results at the end of January. The company's sales hit $26.07 billion and non-GAAP earnings per share came in at $0.83, which was much higher than the $0.79 per share analysts had expected.

Stock chart on dark blue background.

Image source: Getty Images.

The company continued the trend of outpacing analysts' estimates in both its fiscal third and fourth quarter, as well. For example, Microsoft's non-GAAP earnings per share came in at $0.98 in the fiscal fourth quarter, while analysts were expecting $0.71. 

But the biggest jump in the company's share price came in October, after the tech giant reported its fiscal first-quarter 2018 results. Non-GAAP earnings hit $0.84, ahead of analysts' $0.72 expectations, and the company's shares jumped about 12% as a result.

Investors also were optimistic about Microsoft's long-term prospects after the company met -- and surpassed -- its goal of earning an annualized revenue run rate of $20 billion for its commercial cloud business by mid-2018. Microsoft reached its goal a few months early and surpassed it by about $400,000. Cloud computing is expected to be a $411 billion market by 2020, and investors likely saw the company's growth in this space as an indicator of its future cloud-computing opportunities.

Now what

Microsoft's shares have ticked up by just 2% since the beginning of this year, and the company's growing opportunities in cloud computing are likely to keep investor sentiment positive in 2018. Microsoft's management says that the company's server products and cloud services should see another quarter of double-digit growth in the second quarter. That growth, added to the fact the company recently met its cloud-computing revenue goals, means that Microsoft is giving its investors more reasons to remain optimistic about its future.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.