Currently, just three U.S. companies are worth at least $3 trillion: Nvidia, Microsoft, and Apple. But certain Wall Street analysts expect Amazon (AMZN -1.62%) and Alphabet (GOOGL -0.96%) (GOOG -0.92%) to join the list within 12 months.

  • Among 68 analysts, the highest target price on Amazon is $306 per share, according to LSEG Analytics. That implies 32% upside from the current share price $231. It also implies a market value of $3.2 trillion.
  • Among 55 analysts, the highest target price on Alphabet is $250 per share, according to LSEG Analytics. That implies 23% upside from its current share price of $204. It also implies a market value of $3 trillion.

Amazon and Alphabet are two of the three largest public clouds, meaning they are ideally positioned to benefit from demand for artificial intelligence services. But that is only one part of the investment thesis. Here's what investors should know.

An upward-trending green arrow overlaid on Benjamin Franklin's face.

Image source: Getty Images.

1. Amazon

Amazon announced second-quarter financial results that crushed estimates on the top and bottom lines. Revenue rose 13% to $167 billion on particularly strong growth in advertising and cloud services, operating margin expanded 1.5 percentage points, and GAAP earnings increased 33% to $1.68 per diluted share.

The investment thesis for Amazon focuses on strong positioning in e-commerce, digital advertising, and cloud computing, three quickly growing markets. Grand View Research estimates that through 2030 e-commerce sales will increase at 11% annually, digital ad spending will grow at 15% annually, and cloud computing sales will increase at 20% annually.

Amazon is also using artificial intelligence (AI) to make its retail operations more efficient. The company has built AI tools to improve product listings, customer service, inventory placement, and last-mile delivery. It is also using AI to help warehouse robots navigate fulfillment centers more efficiently, and it's building humanoid robots that may one day work alongside human drivers to deliver packages.

Collectively, those innovations should lead to margin expansion in the future. Wall Street expects Amazon's earnings to grow at 18% annually over the next three years. That makes the current valuation of 35 times earnings seem reasonable. Amazon has a good shot at a $3 trillion market value within 12 months, but the stock is a smart long-term investment even if that doesn't happen.

2. Alphabet

Alphabet reported second-quarter financial results that exceeded estimates on the top and bottom lines. Revenue increase 14% to $96 billion on particularly strong sales growth in the cloud computing segment driven by demand for AI services. And GAAP earnings increased 22% to $2.31 per diluted share. CEO Sundar Pichai said, "AI is positively impacting every part of the business."

The investment thesis for Alphabet is complicated by antitrust lawsuits. The company has a strong presence in digital advertising and cloud computing, markets where spending is projected to increase at 15% and 20% annually, respectively, through 2030. That puts the company on a glidepath to double-digit earnings growth through the end of the decade.

However, federal judges have twice ruled against Alphabet in the past year, determining the company has an illegal monopoly in internet search and ad tech software. Both cases have reached the remediation phase, where judges select penalties to fix the problems. Analysts generally think a court-ordered breakup is unlikely, but it's not entirely out of the question.

Wall Street expects Alphabet's earnings to increase at 15% annually during the next three years. That makes the current valuation of 22 times earnings look rather cheap, but that's due to lingering uncertainty. Alphabet looks compelling today, and the company could be worth $3 trillion within 12 months if it comes through the lawsuits mostly unscathed.

However, the remedies ruling in the internet search case is expected this month. In the unlikely event the judge forces Alphabet to sell its Chrome browser -- a remedy requested by the Justice Department -- the share price could plummet. It could also set a precedent leading to other forced divestitures in the second antitrust case. Investors must be comfortable with that possibility before buying the stock today.