In the last 12 months, tech giants Apple (AAPL -2.19%) and Microsoft (MSFT -1.96%) have moved in opposite directions. During this period, Apple is down about 26%, and Microsoft is up about 10%. Some investors interested in the two companies might wonder if Apple stock has become a comparatively better buy than Microsoft after these moves, so let's compare the two companies head to head.

AAPL Chart

AAPL data by YCharts.

Growth

For Apple, recent growth can either appear to be a strength or a weakness, depending on how it's viewed.

Looking closely at Apple's current sales trends, Apple appears to be facing some headwinds. Revenue in Apple's most recent quarter fell 13% compared to the year-ago quarter, and iPhone revenue, which accounts for the majority of the company's sales, was down 18% during the same period. Further, management guided for year-over-year declines to persist in the current quarter, expecting revenue to fall about 15%.

But when you zoom out a bit, Apple's still proving it can grow sales. Revenue in the trailing-12-month period is up 11% compared to last year, and the company has averaged annualized revenue growth of about 34% during the past five years. Investors wonder, therefore, whether recent quarters are representative of what is likely to occur in the future, or if they simply represent a temporary pullback after a monstrous iPhone 6 cycle?

Image source: Apple.

Microsoft's growth story isn't as complex. The company has clearly reached a point in which growth doesn't come as easily. Trailing-12-month revenue is down 8% from the year-ago period, and the tech giant has averaged annualized revenue growth of 8% during the past five years.

While I'd personally bet that Apple's temporary pullback in revenue growth is more temporary than the market imagines, I'll side with conservatism when it comes to stock picking and assume a more bearish scenario in which the tech company's revenue growth prospects are no better than Microsoft's.

So, when it comes to comparing Apple and Microsoft's growth, let's call it a draw.

Valuation

The two companies' may sport similar prospects when it comes to growth, but they go down far different paths when it comes to valuation.

Investors have adopted a very bearish outlook for Apple stock. It trades at just 10 times free cash flow, essentially pricing in zero growth going forward. Microsoft, on the other hand, trades at about 17 times its annualized free cash flow, priced for sustained growth for years to come. By pretty much whatever valuation metric is applied to the two companies, Apple stock is cheaper than Microsoft.

Going a step further, not only is Apple's valuation more conservative than Microsoft's, but the company's dividend yield is no longer too far behind Microsoft's. Apple and Microsoft's dividend yields are 2.4% and 2.8%, respectively. So, Apple shareholders not only can take comfort in the stock's conservative valuation, but they are also getting a meaningful dividend yield.

On valuation, the market's skepticism has rendered Apple stock the winner.

Overall, a comparison of the two companies suggests Apple stock is the better buy. The Street's dubious outlook for the company has simply resulted in bargain-level valuation, mitigating risks if Apple's headwinds with growth persist. As for Microsoft, while the company's underlying business may appear more sustainable, the market seems to have priced in this competitive advantage.