Amazon is officially the third most valuable company in the US.

The retail giant surpassed Microsoft in market capitalisation for the first time on Wednesday, climbing to US$702.5 billion.

Amazon and Microsoft are leaders in their respective industries – Microsoft in desktop and productivity software and Amazon in retail. But the two companies directly compete in the cloud, and business is booming for both companies.

Amazon earlier this month reported financials around its cloud business for the first time. Amazon Web Services pulled in US$17.4 billion in sales in 2017, up an impressive 43 percent from 2016's US$12.2 billion in sales.

At the same time, Microsoft said that its Azure revenue grew 98 percent year over year and reported "intelligent cloud" revenues, a segment that includes Azure, of US$7.8 billion last quarter.

Amazon, for its part, has almost quadrupled in value over the past three years. The company has attributed 10 percent of its total revenue growth to AWS.

Amazon’s market capitalisation sat at US$702.5 billion on Wednesday evening; the company's shares were trading up US $8.65 (0.6 percent) to US$1459.70 in trading late Thursday. Microsoft was worth US$699.2 billion after the market closed on Wednesday.

Amazon still comes in behind Apple, worth US$849.2 billion, and Alphabet, Google's parent company, which stands at US$744.8 billion as of Wednesday evening. Microsoft currently holds fourth place.

At the close of market on Wednesday, CNBC dubbed Amazon CEO Jeff Bezos the richest man of all time, beating out Microsoft founder Bill Gates, who had an estimated fortune of US$100 billion in 1999. Bezos holds 78.9 million shares of Amazon stock, and currently has an estimated net worth of US$118 billion, according to the Bloomberg Billionaire's Index.