Numerous Wall Street analysts have been wondering how long it might take for Apple (NASDAQ:AAPL) to reach a $2 trillion market cap. Recently, Evercore analyst Amit Daryanani suggested it might take another four years. The stock has roared back from March lows when the market sold off over COVID-19 fears to reach fresh all-time highs.

In the process, Apple has now become the first U.S. company to reach a $1.5 trillion market valuation.

AAPL Market Cap Chart

AAPL Market Cap data by YCharts

Apple is worth the most while still being the cheapest

Of the three most valuable tech giants -- Apple, Microsoft (NASDAQ:MSFT), and (NASDAQ:AMZN) -- Apple is just barely ahead of Microsoft. All three stocks are trading at record levels despite the macroeconomic risks related to the ongoing coronavirus pandemic.

Companies need Microsoft's enterprise software offerings more than ever amid a broad transition to remote work, consumers are increasingly shifting toward e-commerce to purchase things from the safety of their homes, and Apple's booming services segment is helping offset lost hardware sales as Apple stores remain closed during the crisis.

Tim Cook on stage in front of an iPhone 11 Pro

Apple CEO Tim Cook introducing the iPhone 11 Pro. Image source: Apple.

Morgan Stanley analyst Katy Huberty recently noted that iPhone users are spending more money in the App Store on digital content as people spend more time at home. Huberty believes the higher levels of engagement and monetization are here to stay, while the Mac maker's last earnings release showed an acceleration in paid subscription growth.

It's also rather impressive that while Apple is worth more than Microsoft or Amazon in dollar terms, Apple shares are still cheaper relative to the Cupertino company's sheer earnings power.

AAPL PE Ratio Chart

AAPL PE Ratio data by YCharts

The massive scale of Apple's share repurchase program helps keep the stock's valuation low, delivering significant earnings accretion as the company retires the shares it buys back. At the same time, Apple's buybacks actually reduce its market cap since total shares outstanding continue to meaningfully decline.

Microsoft has a more modest buyback program with roughly $37 billion available at the end of last quarter, and the company only barely offsets dilution from stock-based compensation with shares outstanding declining slightly each quarter. Meanwhile, Amazon does not repurchase its stock even though the e-commerce juggernaut's board of directors authorized $5 billion in repurchases back in 2016.

The three tech giants are still very much locked in a race to $2 trillion. Apple won the race to $1 trillion back in 2018, becoming the first U.S. company to cross that threshold. Which tech company will be the first to reach $2 trillion?

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.