Apple (NASDAQ:AAPL) and Amazon (NASDAQ:AMZN) both briefly became trillion dollar companies over the past year. However, neither company remained above that valuation, and analysts rushed to crown the next trillion dollar company.

One of the top candidates is Microsoft (NASDAQ:MSFT), which currently has a market cap of about $860 billion. Analysts at Wedbush Securities recently joined the bullish chorus, claiming that the growth of its cloud services would boost its market cap past the $1 trillion mark later this year. Could that actually happen, or are the analysts getting ahead of themselves?

Does a company's market cap matter?

A company's market cap, which is calculated by multiplying the number of outstanding shares by its price per share, is a poor way to value a company because it doesn't measure the value of those shares relative to its earnings.

For example, Apple traded at just 16 times forward earnings when it crossed the $1 trillion mark last August. Amazon's forward P/E was around 100 when it hit that mark the following month. In other words, if Apple and Amazon traded at the same P/E ratios, Apple's market cap would be much higher than Amazon's.

However, stocks also have higher P/E ratios because investors are willing to pay more for future earnings growth. Stocks ideally have a P/E ratio that's lower than their projected earnings growth rate. Here's how Apple, Amazon, and Microsoft's forward earnings growth rates currently compare to their forward P/E ratios:

Capture Source: Yahoo finance, Feb. 27. Photo: The Motley Fool

Based on this chart, shares of Apple and Amazon are cheaper relative to their earnings growth potential than Microsoft's stock -- which raises concerns with Wall Street's predictions that Microsoft will be the next trillion dollar stock.

Why Microsoft probably can't hit $1 trillion this year

To hit a market cap of $1 trillion, Microsoft's stock needs to rally 16% to about $130, assuming that its share count remains roughly the same. That would boost its forward P/E to 26, which would be double its projected earnings growth rate for the year.

Analysts expect Microsoft's annual earnings to grow at an average rate of 14% over the next five years. This gives it a 5-year PEG ratio of 1.8, which is significantly higher than Apple's PEG ratio of 1.2 and Amazon's PEG ratio of 1.4. A PEG ratio under 1 indicates that a stock is "undervalued", so Microsoft's stock seems the priciest of the three relative to its long-term earnings growth potential.

But what about the cloud business?

Microsoft's cloud business is certainly the company's core pillar of growth. Its commercial cloud revenue rose 48% annually to $9 billion and accounted for 31% of its top line last quarter. However, the growth of that business in fiscal 2019 remains below its 50%+ growth rates throughout fiscal 2018:

Capture1 Source: Microsoft quarterly reports. Photo: The Motley Fool

The growth of its cloud platform Azure, the second largest cloud infrastructure player in the world after Amazon Web Services (AWS), also decelerated in the first half of 2019. Office 365 and Dynamics CRM, the other two pillars of its cloud business, also generated slower growth compared to the prior year quarters.

Capture3 Year-over-year growth, constant currency. Source: Microsoft quarterly reports. Photo: The Motley Fool

Those growth rates are still impressive, but they indicate that softer enterprise spending or tougher competition from AWS and Salesforce (NYSE:CRM) in the CRM market could still throttle its long-term cloud growth.

Microsoft could be tempted to counter the competition with lower prices, but that would weigh down its earnings growth and make it even harder to justify a $1 trillion valuation.

Ignore the market cap and focus on the valuations

I think Microsoft is still a great long-term tech play. However, the stock isn't cheap now, and a $1 trillion target for the company would be based more on hype than reality. Therefore, investors should focus on Microsoft's valuations instead of its market cap to decide if the stock is a worthy investment.

This article originally appeared in the Motley Fool.

John Mackey, CEO of Whole Foods Market, an Amazon subsidiary, is a member of The Motley Fool's board of directors. Teresa Kersten, an employee of LinkedIn, a Microsoft subsidiary, is a member of The Motley Fool's board of directors. Leo Sun owns shares of Amazon and Apple. The Motley Fool owns shares of and recommends Amazon, Apple, and The Motley Fool owns shares of Microsoft and has the following options: long January 2020 $150 calls on Apple and short January 2020 $155 calls on Apple. The Motley Fool has a disclosure policy.