SAN FRANCISCO (Reuters) - Amazon.com's AMZN.O stock market value reached $900 billion on Wednesday for the first time, marking a major milestone in its 21-year trajectory as a publicly listed company and threatening to dislodge Apple AAPL.O as Wall Street's most valuable jewel.

After Jeff Bezos founded the online book-selling company in his garage in 1994, Amazon survived the dot-com crisis and then expanded across the retail industry, altering how consumers buy products and setting off a Darwinian struggle among brick-and-mortar stores.

After announcing on Wednesday that it sold more than $100 million products during its annual Prime Day sale, the Seattle, Washington company’s stock briefly touched $1,858.88, giving Amazon a stock market value of $902 billion. It later reversed, trading down 0.16 percent for the session.

Amazon’s stock has surged more than 57 percent in 2018, bringing its increase to over 123,000 percent since it listed on the Nasdaq in 1997. An investor who bought 1 share of Amazon for $18 in the IPO would now have an investment worth more than $22,200, including three stock splits in the 1990s.

Amazon, video streaming service Netflix NFLX.O and a handful of heavyweight technology companies have fueled Wall Street's rally in recent years and they remain key parts of portfolio managers' portfolios.

Apple replaced Exxon Mobil XOM.N in late 2011 as the U.S. company with the largest stock market value. The Silicon Valley company's shares have risen 12 percent in 2018, bringing its stock market value to $935 billion.

To view a graphic on Amazon catching up with Apple, click: reut.rs/2Jz2SyR

The calculations for Apple and Amazon’s market capitalizations are based on the number of shares outstanding in their March-quarter reports. Amazon has increased its share count by over 1 million shares per quarter in recent years, and if it continued that in the June quarter, its stock market value may already have exceeded $900 billion.

Amazon reports its results on July 26 and Apple, which has been reducing its share count through buybacks, reports its June-quarter results on July 31.

As Amazon expands into grocery retail through its acquisition of Whole Foods Market last year, and as more businesses move their IT departments onto the cloud, its stock price has been red hot, recently trading at 111 times expected earnings, compared to more-profitable - but slower growing - Apple’s valuation of 15 times earnings.

Amazon dislodged Microsoft Corp MSFT.O as the No. 3 U.S. company by market capitalization in February. Since then, Microsoft has been overtaken by Google-owner Alphabet GOOGL.O.

To view a graphic on Analyst Price Targets, click: reut.rs/2JygrP1