Microsoft's (NASDAQ:MSFT) had a lot to write home about this past year. The company beat analysts' consensus earnings estimates four times in 2017, made huge strides toward its lofty cloud computing goals, and saw its share price rise more than 30%.

The company is thriving under the leadership of CEO Satya Nadella, and Microsoft's laser-focus on new growth areas is already paying off. So let's take a look back on what went right with the company this year.

Microsoft logo sitting outside of a building.

Image source: Microsoft.

Share price gains

A stock price gain of about 30% over the past year may not be as high as some other high-flying tech stocks, but it's nothing to balk at for a company the size of Microsoft.

The company made most of those gains as it repeatedly blew past analysts' earnings estimates across four quarterly reports. For example, in Microsoft's first quarter of fiscal 2018 (reported at the end of October) the company had earnings of $0.84, while analysts were expecting $0.72. And in the quarter before that, Microsoft's earnings hit a whopping $0.98 per share, when analysts expected just $0.71. 

All of this has helped the company's share price march upward since the beginning of the year, with an especially huge jump after the Q1 2018 report.

MSFT ChartImage source: YCharts.

Not only did the company make impressive share price gains in 2017, but they follow 19% share price gains in 2015 and 12% gains in 2016, all of which has helped build up investor sentiment for the stock that doesn't appear to be slowing down.

Reaching important goals

Part of the optimism surrounding Microsoft right now is that the company is executing well on its cloud computing potential. In 2015, Nadella said that Microsoft's commercial cloud business would achieve an annualized run rate of $20 billion by mid-2018.That was a pretty high target considering that the company's cloud run rate the time was $6.4 billion.

In the fiscal first quarter of 2018, the company surpassed that goal by about $400,000 and did it a few months ahead of schedule. It was an important milestone for Microsoft, not just because it proved it can set long-term goals in new growth markets and meet them, but also because cloud computing is expected to become a $411 billion market by 2020. Hitting the annual run rate goal showed that Microsoft's pivot to the cloud is in full swing and that the company can profit from it.

Microsoft said that its Q1 2018 commercial cloud revenue surpassed $5 billion, a 56% year-over-year jump, and that gross margin increased by 8 percentage points, to 57%. Additionally, revenue from the company's Intelligent Cloud business (which includes its public cloud offering Azure) rose by 14%.

Microsoft is successfully competing in the cloud computing space right now, with 11% of the public cloud computing market. That's still far behind Amazon's 40%, but the company's gains this year prove that it doesn't need to be the market leader to benefit in this segment.

Can this continue?

Microsoft has put itself on a strong footing this year that should help propel the company forward in 2018. Investors should expect more growth from the company's cloud segments and to see more investments in other opportunities, including artificial intelligence and augmented reality. If Microsoft continues at the same pace it did in 2017, then this coming year should bring much more for investors to look forward to.

Teresa Kersten is an employee of LinkedIn and is a member of The Motley Fool's board of directors. LinkedIn is owned by Microsoft. Chris Neiger has no position in any of the stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.