Apple (NASDAQ:AAPL) and Microsoft (NASDAQ:MSFT) have fought each other for market share since the late 1970s. At various times, one has appeared to dominate the other. But in recent years, some investors have begun to believe that Apple will fall behind as its iPhone becomes commoditized and Microsoft emerges as a top player in the cloud. However, two emerging trends may give stockholders a case for sticking with Apple.

Despite their rivalry, both companies have enjoyed great success. Apple has amassed the world's largest market cap of around $2 trillion, while Microsoft has the second-largest market cap at $1.8 trillion.

Moreover, both have built cash hoards that all companies should envy. Apple holds $195.6 billion in cash on hand, offset by $112 billion in various forms of debt. Over the trailing 12 months, it generated $80.2 billion in free cash flow. 

A man using a tablet in an industrial setting.

Image source: Getty Images.

In comparison, Microsoft holds about $132 billion in cash, against $60.5 billion in total debt. Free cash flow for the company came in at about $50.4 billion over the previous 12 months. Nonetheless, almost no company, including Apple, matches Microsoft's AAA credit rating. Despite its debt levels, Microsoft has built a track record of financial stability going back to the 1980s. It could also pay off its debt immediately with existing cash, lowering its credit risk.

How Apple stands out

Apple pioneered an entire industry through the iPhone, its largest revenue driver for more than a decade. In time, competition from lower-cost players using Alphabet's Android operating system forced Apple to offer lower-cost iPhones as the company's overall net sales fell.

However, this situation may have changed. The pandemic brought about increased iPhone sales as dependence on such devices rose. Now, Apple has launched the 5G iPhone 12. With the 5G iPhone's faster speeds, Apple regained some pricing power. This has brought back some of the higher margins that bolstered iPhone profits in past years.

Moreover, Apple has maximized wearables sales, in part by promoting the health benefits of the Apple Watch. It not only monitors one's heart but also measures blood oxygen levels and sends out an alert in case of a fall. Additionally, Fitness+, Apple's fitness experience that works with the Apple Watch, launched on Dec. 14. Apple partially credited the Apple Watch with taking wearable sales 30% higher year over year in the latest quarter.

Also, Apple's services division, which includes iTunes and the App Store, has achieved notable successes with a 24% 12-month surge in revenue over the same period. Some analysts speculate that services could generate half of Apple's profits by the middle of the decade.

As a result, Apple earned more than $294.1 billion in revenue over the last 12 months. This represents a 10% increase from the previous 12-month period. Also, thanks in part to the iPhone release last fall, overall revenue for the latest quarter increased 21% from year-ago levels.

This revenue improvement led to net income for the latest quarter of almost $28.8 billion, 29.3% higher than year-ago levels. An increase in operating expenses of only 12% helped contribute to the higher profit surge.

This growth took Apple stock higher by more than 70% over the last 12 months. Additionally, its P/E ratio has risen to 33. This stands out, as Apple's multiple struggled to move above 20 before 2020. Still, its 29% net income increase does not match the growth in its P/E ratio during the same time frame. Thus, investors will have to also consider whether Apple now justifies its more expensive valuation.  

AAPL Chart

AAPL data by YCharts

The case for Microsoft

Microsoft has also struggled for respect at times. When Satya Nadella became CEO in 2014, he inherited a company reeling from the decline of the PC and the slowing growth of Windows.

As the previous head of Microsoft's cloud and enterprise group, he transitioned Microsoft to a cloud focus. This led to the company becoming the second-largest cloud provider with 15% cloud market share, according to ParkMyCloud. This lags only Amazon, which pioneered the industry.

Other software bolsters Microsoft as well. Microsoft 365, which constitutes its Office, intelligent cloud, and security suite, primarily drives its productivity and business processes division. This division makes up roughly one-third of the company's revenue, approximately the same as one year ago. Still, revenue increased 11% from year-ago levels. Within that division, the Office 365 commercial suite surged 21% during that period, while its Dynamics 365 software, its ERP tool, registered a 38% increase for that period. 

Furthermore, the company released its latest generation Xbox gaming console late last year. Moreover, Xbox Live, its multimedia social gaming service, has grown to 100 million monthly active users, while GamePass now claims about 18 million subscribers. Overall, Xbox content and services revenue increased 30% over the last 12 months.

Still, Xbox appears to have fallen short of its peers. Sony experienced 42% growth in its game & network services division, though Sony did not break out PlayStation revenue separately. Nintendo reported 38% growth in its Switch platform. Unlike its peers, Nintendo has not launched a next-generation console since 2017.

Despite slightly lower gaming growth, Microsoft stock has moved higher by just under 50% over the last year. Also, its P/E ratio has reached 36. This far exceeds the P/E ratio of 15, where Microsoft traded at the time Nadella took over in 2014. Still, the multiple has fallen from a multi-year peak above 60 in 2018, when a one-time tax charge temporarily reduced income and boosted the valuation. 

Apple or Microsoft?

Between the two tech stocks, I believe Apple still holds the edge. The 5G upgrade cycle will force all smartphone users to eventually upgrade, supporting iPhone sales and higher margins for years to come. Additionally, the growth in wearables and services could add to that revenue growth. Moreover, even with Apple's rising valuation, it still trades at a slightly lower multiple than Microsoft, despite higher cash flows and profit margins.

While this success will not negate Microsoft's bull case, it gives Apple more potential for higher returns.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.