Microsoft (MSFT 0.37%) and Cisco Systems (CSCO 0.06%) are both tech stalwarts that have helped shape the landscape of the Internet and computer software for the past several decades.

In the age of cloud-based services, both companies have had to reinvent themselves to accommodate shifting customer demands. The two tech giants appear to have navigated the changes pretty successfully so far, and investors have pushed up Cisco's share price 95% and Microsoft's 165% over the past three years as a result.

But to find out which is the better long-term play for investors, let's look at their financial fortitude, valuations, and competitive advantages.

Image of a line graph.

Image source: Getty Images.

Financial fortitude

Company Cash Debt Free Cash Flow (TTM)
Microsoft $131.5 billion $86.3 billion $33.6 billion
Cisco $34.6 billion $23.7 billion $15.1 billion

Data source: Yahoo! Finance and Morningstar. TTM = Trailing 12 months.

Both of the companies have significant debt, but also have substantial cash that offsets their debt obligations. Additionally, Microsoft and Cisco are generating solid trailing-12-month free cash flow, an indicator that their businesses are in good shape. Because of all this, Microsoft and Cisco have stable financial positions that investors don't need to worry about right now.

Winner: Tie.

Valuation

Company P/E Ratio (TTM) Forward P/E EV/EBIDTA
Microsoft 30.7 27.0 19.4
Cisco 19.8 16.7 15.1

Data source: Yahoo! Finance.

The average P/E for companies in the S&P 500 is about 22, which means that Cisco's stock looks cheaper compared with Microsoft's shares. It's not that Microsoft is all that expensive, but when matched up to Cisco, it's the slightly pricier of the two.

Meanwhile, the average EV/EBITDA for companies in the S&P 500 is around 14, which makes Cisco's stock again look cheaper. All of which means Cisco gets the edge in the valuation comparison.

Winner: Cisco.

Competitive advantage

Cisco has built its business by providing top-shelf internet connectivity hardware and services for years. Providing its clients with some of the best technology and software has given it a good competitive advantage that won't be easily overcome.

Similarly, Microsoft has successfully transitioned to cloud-based software, and its suite of Office productivity offerings is unmatched. The company has moved quickly and successfully into the public cloud-computing market, providing storage and services to companies of all sizes through Azure, the second-largest public cloud service. It's tapping into the massive cloud computing market that is predicted to be worth $278 billion by 2021.

While both of these companies have some advantages over their peers, Microsoft's dominance in both cloud-based software and its Azure cloud services gives the company more opportunities to benefit as cloud services grow. Meanwhile, Cisco is still focused more on hardware rather than the cloud, which gives Microsoft a slight edge right now.

Winner: Microsoft.

And the winner is ... Microsoft

Because of Microsoft's successful transition to the cloud, I'm giving the company the win. Cisco is a great company, and it's performing well for investors. But if you look five or 10 years down the road, I see Microsoft continuing to benefit from the cloud and even strengthening its position. Meanwhile, Cisco is still, at its core, a hardware company that likely won't benefit as much from cloud computing as Microsoft will.