Amazon has become the second publicly traded company to hit a $1tn market cap after its shares rose nearly 2% to a high of $2,050.50. The Amazon market cap milestone follows Apple, which became the first to break the trillion dollar mark in August.

The two companies had long been the leaders in the race to a trillion. Forecasters initially predicted the first company to reach a trillion dollar market cap could happen by October.

Apple surpassed the $900bn mark eight months before Amazon. However, Amazon has reached the milestone in just 21 years, compared to Apple’s almost 38.

In July Amazon’s share price was boosted by its biggest Prime Day, which pushed its market cap to $900tn. Customers purchased more than 100 million products during the annual event, which offers heavy discounts to promote its products and services.

Amazon has seen its share price increase by nearly 70% since the start of the year.

Amazon market cap: From bookstore to billions

Founded in 1994 by Jeff Bezos as an online bookstore, the company issued its first public offering in 1997 at $18 a share on the NASDAQ stock exchange.

Many e-companies went out of business during the dot-com bubble burst in the early 2000s. However, Amazon survived to become one of the leading e-commerce sites. It turned a profit for the first time in 2001.

It has since diversified its services via a range of acquisitions, including Alexa in 1999, which is now its flagship voice-controlled assistant.

In 2017 it moved into the grocery market with the $13.7bn purchase of US chain Whole Foods.

While the bulk of its revenue comes from retail, it has other revenue streams that include its subscription services, such as Amazon Prime.

It is also generating an increasing amount of revenue from advertising, which reached $4.65bn in 2017, a rise of 62% year-on-year.

Technically, the first company to reach a trillion dollar valuation was Chinese energy company PetroChina. The state-owned company crossed the threshold on the Shanghai stock exchange in 2007.