Options trader Todd Gordon, speaking on CNBC June 14, said Microsoft (MSFT - Get Report) was stuck in a trading range until the company reports earnings on July 20. He thinks the stock is stuck between $65 and $72. But a deeper dive shows now may be a good time to buy.

Over the past 12 months, shares of Microsoft have risen 41%, and they are up about 13% year to date. The stock is being driven by the Windows Pro upgrade cycle, slightly better gross margins and uptake of the company's cloud offering, Azure.

On April 27, Microsoft reported third-quarter fiscal 2017 earnings of $0.73 per share, $0.03 better than the consensus estimate. Revenue rose 6.3% to $23.56 billion.

Commercial Office 365 product revenue was up 7%. Consumer Office product revenue increased 15%. Microsoft now has 26.2 million Office 365 subscribers. The "Intelligent Cloud" revenue increased 11% to $6.76 billion, and revenue in the More Personal Computing unit slipped 6.6%, mostly due to disappointing Surface sales. Surface sales were down 26%.

Despite dilution from the LinkedIn acquisition, gross margins increased 81 basis points to 65.8%.

Microsoft CEO Satya Nadella.
Microsoft CEO Satya Nadella.

Overall, the third quarter was in line with expectations. Going forward, analysts are looking for Microsoft to close out fiscal 2017 with $96.24 billion in revenue, up 4.5%. With strong growth coming from the cloud and continued Windows 10 uptake, analysts expect revenue to jump 8% to $103.8 billion in 2018. Next year, the company is forecast to earn $3.32 -- up 9.5% from this year's estimated earnings of $3.03 per share.

As long as businesses continue to move towards Windows 10, I think the stock will grind higher. The Windows sales cycle is very long. In 2002, Windows XP was released into enterprise accounts, followed by Windows 7 in 2009. Large customers are still evaluating the move to Windows 10. Analysts think Windows 10 won't be fully adopted by businesses until well into 2020, which leaves plenty of upside in the stock.

Furthermore, margins should continue to rise. Over the next three years, Azure margins could expand from the 40%-to-50% range to about 60%, as Microsoft begins to add more customers and gain economies of scale. Before the cloud, in fiscal 2013, Microsoft had a 74% gross margin. The company ended 2016 with a margin of just 62%.

Microsoft has a median forward earnings multiple of 22x, but with a strong Windows 10 cycle and the prospects of a margin recovery, which would incrementally drive earnings higher than the consensus estimate, I think Microsoft can get to $75.

The technology company's shares fell 0.5% to $69.94 on Thursday in the early afternoon.

Visit here for the latest business headlines.

Here's more of the latest top stories from TheStreet:

This article is commentary by an independent contributor. At the time of publication, the author held no positions in the stocks mentioned.