Tesla's (TSLA -0.35%) stock has risen nearly 115% since the beginning of the year. Its improving sales and work on AI made the company increasingly popular with investors.

Still, recent price cuts have reduced its margins, and the dramatic move higher over a short time increases the likelihood of a pullback. Does that possibility make it a stock to avoid? Let's take a closer look.

The case for further growth potential

Tesla just released its Q2 earnings report, and in many ways, it highlights why its gains are so significant. Its $25 billion in revenue increased 47% versus the same quarter last year. Also, the 480,000 vehicles it delivered during the quarter surged 86% higher. Moreover, free cash flow rose 62% to $1 billion as operating income accelerated amid slowing growth in capital expenditures.

Looking beyond earnings, Tesla continues to grow its production by maintaining a 50% compound annual growth rate (CAGR) over the long term. Additionally, it has begun the tooling phase of Cybertruck development and expects to start mass production by the end of 2023. This should contribute to the forecasted "acceleration of AI, software, and fleet-based profits."

Furthermore, the long-term performance of Tesla has been unmatched by all but a few companies. The stock is up nearly 17,000% since its June 2010 IPO. And even over the last five years, it returned over 1,200% to its long-term shareholders.

TSLA Chart

TSLA data by YCharts

Why some investors might hesitate

However, that growth has increased its market cap to over $850 billion. That is nearly four times higher than the next largest automaker, Toyota, whose market cap is approximately $225 billion.

Still, investors should consider its more indirect approach to AI. Other than its self-driving platform, Tesla Autopilot, AI serves as a supplemental technology for the company. In other words, Tesla's AI chips will not be stand-alone products. Instead, they will be part of the AI hardware that helps monitor and control the functions within its cars.

Nonetheless, that places it in competition with the likes of Nvidia, Advanced Micro Devices, Qualcomm, and other chip companies looking to break into the automotive sector. The uncertainty for investors is whether Tesla's AI infrastructure can support both the company and the non-Tesla vehicles using Autopilot.

Moreover, its P/E ratio now stands at over 75. Admittedly, during the 2021 bear market, Tesla routinely sold at higher valuations. But at that time, the market was deep into bull territory. That tolerance for high multiples disappeared in the 2022 bear market, and without agreement as to whether the bull market has returned, it could plateau at those levels.

Furthermore, investors now have to contend with falling gross margins. This was by design, as the company lowered prices to attract more buyers. In an environment of rising interest rates, sales would have likely dropped without the lower prices. Still, the pressure on its margins could continue, especially if interest rates continue to rise.

Should I buy Tesla?

Given Tesla's potential in AI, investors are likely not too late to buy the stock. Yes, its success in AI is not guaranteed, and its market cap may put off investors.

However, Tesla's AI capabilities likely mean more investors will view it as a tech company rather than an automotive stock. Additionally, revenue growth remains rapid, and the steadily falling prices should increase the availability of its technology, thus taking Tesla stock higher over time.