Amazon (AMZN 1.23%) has been a steady winner in 2025, even as investors debate how quickly artificial intelligence will translate into dollars for the tech and retail giant. The company operates a massive online marketplace and logistics network, a fast-growing advertising platform embedded across its properties, and Amazon Web Services (AWS), the world's largest cloud infrastructure business.

Recent results and guidance point to a company leaning further into its most profitable areas. That mix shift, combined with disciplined cost control, sets up a reasonable path for earnings to compound at healthy rates. If the price-to-earnings multiple stays where it is today, shares could hit $300 within two years.

A person looking at business charts on a laptop.

Image source: Getty Images.

Strong growth in higher-margin lines

Amazon's second-quarter results were strong where it matters most. Net sales rose 13% year over year to $167.7 billion, while operating income climbed 31% to $19.2 billion. AWS grew 17.5% to $30.9 billion, and advertising services increased 23% to $15.7 billion -- both outpacing consolidated growth and, importantly, carrying richer margins than first-party retail.

The mix is slowly shifting toward these higher-margin engines. In the quarter, AWS represented about 18% of revenue, and advertising services exceeded 9% of total sales. Together, they're becoming a larger slice of the pie as they compound faster than online stores. The bottom-line effect is visible in earnings power: Trailing-twelve-month earnings per share improved to $6.55 through the end of Q2, up from $4.18 in the trailing-12-month period ending a year earlier.

While management doesn't specifically call out the margins of its advertising services segment, it did say in its second-quarter earnings call that "Advertising remains an important contributor to profitability in the North American International segments." Regarding AWS, its operating margin is about 37% on a trailing-12-month basis, compared to an operating margin of about 11% for the overall company.

Guidance adds another layer of confidence. For the quarter ending in September, Amazon expects revenue to be between $174 billion and $179.5 billion, up 10% to 13% year over year, and operating income of $15.5 billion to $20.5 billion. While that operating-income range allows for macro and spending variability, it still implies a business that is running far more efficiently than it was two years ago.

A clear path to $300, with caveats

For investors, the question is whether these dynamics can carry the stock from roughly the high-$220s today to $300. A simple way to frame it is to hold the valuation roughly constant and let earnings do the work. At recent prices, the shares trade at around 35 times trailing earnings.

If trailing-twelve-month earnings per share of $6.55 grow at about a 15% compound annual rate for two years, earnings would climb to roughly $8.70. Multiply that by the same 35 price-to-earnings multiple, and the stock price comes out to just over $300. In other words, without assuming a richer valuation, earnings growth could drive the stock materially higher in a relatively short timeframe.

Of course, there are some critical risks to keep an eye on. AWS' quarterly operating margin ticked down to 32.9% from 39.5% in the prior quarter as Amazon accelerated investments in artificial intelligence (AI) capacity and infrastructure. Further, competitive intensity in cloud computing remains high, and heavy capital spending tied to AI models and data centers could pressure near-term profitability. Additionally, trade and tariff policies remain a headwind that the company explicitly calls out in its guidance commentary, and retail demand can soften if consumers pull back.

Still, the core investment case is strong. Advertising continues to grow faster than the company overall, AWS remains a large and expanding business even as Amazon invests aggressively in AI, and cost discipline is showing up in operating income gains. These dynamics -- steady growth, a richer revenue mix, and a more efficient retail business -- should support mid-teens earnings growth and help the company command a similar price-to-earnings ratio in the years ahead.

Ultimately, the stock price going from the high-$220s to about $300 within two years looks not just possible but reasonable. With this said, investors shouldn't buy the stock with a two-year time horizon in mind. A longer-term view is less risky and allows more wiggle room for sentiment shifts. But this exercise helps show how Amazon can continue to reward shareholders.