Amazon (AMZN -0.90%) has become a favorite on Wall Street this year, with its stock up 64% since Jan. 1. The company has rallied investors with a growing push into artificial intelligence (AI) and a gradual recovery in its e-commerce segments after last year's economic downturn. 

The tech giant's market cap of $1.4 trillion makes it the world's fifth-most-valuable company, thanks to leading market shares in online retail and cloud computing. Amazon's immense growth over the last decade might make you think the best time to invest in its stock was long ago. However, the company is a leading force in multiple areas of tech which could offer substantial growth over the long term.

So, here's why it's not too late to buy Amazon stock. 

Expanding its position in chips

A boom in AI has attracted countless companies to the market, with cloud giants like Microsoft and Alphabet rushing to add AI services to their platforms as demand soars. Amazon has similarly unveiled several new AI tools to its cloud service, Amazon Web Services (AWS), this year as it works to keep up with the competition. However, the company is also strategically diversifying its role in the high-growth sector by venturing into the hardware side of AI

In June, Amazon CEO Andy Jassy announced the company had developed two AI chips called Inferentia and Trainium. A move into hardware will see Amazon go up against industry leader Nvidia, which holds a market share of about 90%. However, Jassy has said Amazon will offer the best price-to-performance in the market, which is promising considering many of Nvidia's customers have called for competing chipmakers to rise up in hopes of bringing down the cost of chips. 

Moreover, the Financial Times reported on Aug. 9 that Amazon is in talks to become an anchor investor in Arm's upcoming initial public offering. The U.K.-based chipmaker is expected to go public later this year but is looking for investment from many of the tech companies that rely on its hardware. 

As the home of the world's biggest cloud platform, Amazon has massive potential in AI, which is only made stronger by expanding into chips. 

A recovering retail business 

Amazon's e-commerce segments have been a sore point over the past year, reporting operating losses totaling $10.6 billion in fiscal 2022. However, this year has signaled a recovery for the business. In the first quarter of 2023, Amazon's North American segment returned to profitability, with its international segment seeing a marginal improvement. Then in the second quarter of 2023, the company's North American retail business reported operating income of $3.2 billion after seeing a loss of $627 million in the year-ago period.

The company's retail business is back on a growth path after last year's economic downturn, which will likely bolster its stock over the next year. 

Additionally, Amazon's nearly unrivaled dominance in e-commerce further strengthens its long-term outlook. The company holds a 38% share in the industry in the U.S., with the second-largest share going to Walmart at 6%. Meanwhile, online retail sales only made up about 15% of all purchases last year, indicating the market is nowhere near hitting its ceiling, and Amazon could profit the most from its growth.

Wall Street seems to agree with Amazon's growth potential, as its average 12-month price target of $167 is about 19% higher than its current position. As its e-commerce business continues to recover and the company expands its AI offerings, Amazon stock will likely keep to its trajectory. The company's prospects in these markets mean it's not too late to benefit from its potentially lucrative future, with its stock an attractive buy this year.