During 2015, Microsoft (NASDAQ:MSFT) handily outperformed the S&P 500, appreciating 18% as the S&P 500 declined nearly 1%.

MSFT Chart

MSFT data by YCharts

Pairing 2015 with the software giant's excellent 2014, and shares are up an impressive 46% during the past two years.

With such a significant rise in share price, has the valuation got out of hand?

From undervalued to overvalued
On March 22 of last year, I asserted that Microsoft was "an undervalued dividend stock." A 2.9% dividend yield, a sustainable business model, and a seemingly undervalued stock price represented a buying opportunity. But today's Microsoft stock isn't nearly as enticing. Since the time of this article, shares have soared 28%. And now the stock is borderline overvalued.

How did Microsoft go from undervalued to overvalued in such a short time?

Microsoft is undoubtedly a transformed company. Since CEO Satya Nadella took the reins in February 2014, the company pivoted toward an increased emphasis on mobile, cloud, and services. And there's already evidence the new focus is paying off handsomely.

Office

Office 365 has been particularly successful under Nadella's reign, playing a key role in driving customer adoption of cloud services. Image source: Microsoft.

But is Microsoft's encouraging execution enough to merit such a huge jump in the company's share price during this period?

Valuation
There are a number of ways to gauge whether or not the price for Microsoft stock makes sense in relation to the underlying value. The simplest methods would be to consider popular valuation metrics like price-to-earnings and price-to-sales in comparison to peers and in relation to recent growth. Microsoft's P/E and P/S ratios of 36 and 4.91, respectively, both imply the stock is probably pricey. Apple, for instance, has P/E and P/S ratios of 15.5 and 2.8, respectively, yet has managed to grow its EPS about 18% annually over the past five years while Microsoft's EPS has gone nowhere.

But for investors looking for a more concrete representation of what shares are trading at today compared to what their fair value is, a discounted cash flow valuation can be used.

The weakness of a DCF valuation, of course, is the forward-looking nature of growth assumptions required to calculate value, as present value is determined by discounting predicted cash flows. In Microsoft's case, even a fairly optimistic outlook for cash flow growth over the next 10 years suggests shares could be overvalued. Consider two scenarios, for instance.

Year

Scenario 1: FCF Annual Growth Rate

Scenario 2: FCF Annual Growth Rate

1

9%

5%

2

8.6%

5%

3

8.1%

5%

4

7.7%

5%

5

7.3%

5%

6

7%

5%

7

6.6%

5%

8

6.3%

5%

9

6%

5%

10

5.7%

5%

Perpetuity

3%

3%

Scenario one predicts free cash flow increases by 9% in year one. This growth decelerates by a modest 5% annually to a rate of about 5.7% in year 10. For years beyond 10, it's estimated that Microsoft's free cash flow grows in line with the historical rate of inflation: 3%. Using a discount rate of 10%, the present value of these future cash flows is $59.35 per share -- leaving very little room for error in these predictions.

In a safer, and appropriately more conservative, prediction of future cash flows, Microsoft is hands-down overvalued. This scenario predicts that Microsoft's free cash flow increases at a rate of about 5% annually over the next 10 years and at 3% beyond year 10. In this scenario, the present value of future cash flows is $49.70 per share -- about 10% below today's share price.Scenario one, which we'll assume is the bull case, predicts free cash flow increases by 9% in year one. This growth decelerates by a modest 5% annually to a rate of about 5.7% in year 10. For years beyond 10, it's estimated that Microsoft's free cash flow grows in line with the historical rate of inflation: 3%. Using a discount rate of 10%, the present value of these future cash flows is $59.35 per share. With this valuation just 8% higher than where shares are trading today, this scenario leaves very little room for error in these cash flow predictions.

Metric

Scenario 1

Scenario 2

Discount rate

10%

10%

Fair value of shares

$59.35

$49.70

These scenarios don't necessarily mean that it's time to sell Microsoft stock. Industry-leading companies like Microsoft with a proven history could outperform expectations. So if I owned Microsoft stock, I wouldn't sell. But the uninspiring outlook for the stock based on these two DCF valuations does suggest the stock isn't the buy it was last March.

Daniel Sparks owns shares of Apple. The Motley Fool owns shares of and recommends Apple. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.