Amazon has passed Alphabet and now trails just Apple among the list of the world's most valuable companies.

The e-commerce giant rose 2.7 percent on Tuesday lifting its stock market value to $768 billion. Alphabet, the parent of Google, fell 0.4 percent and is now valued at $762.5 billion.

While the U.S. tech mega-caps have rallied in the past year, Amazon's performance has dwarfed them all, with the stock surging 85 percent over the past 12 months, including 35 percent to start 2018.

Investors have been piling into Amazon, betting that the company's growing and very profitable cloud computing business will provide the cash needed for investments in original content, physical stores and continuing to build data centers and warehouses.

Meanwhile, Facebook's plunge has dropped the social network's market value below Berkshire Hathaway. Facebook, now the seventh most valuable company, has lost more than 9 percent of its market capitalization in the past two days after revelations on Friday and over the weekend that Cambridge Analytica had misused data tied to 50 million Facebook users.

Microsoft is the fourth biggest company by market cap, followed by China's Tencent.