Tesla (TSLA -1.11%) stock has been an incredible investment over the last three years. Its share price has climbed 1,390% since March 2019, easily outperforming the S&P 500. But more recently, high inflation and the prospect of rising interest rates have conspired to sink growth stocks, and Tesla's stock price has fallen 33% from its high.

Even so, the company still has a market cap of $850 billion -- meaning it's worth as much as the next 13 automakers combined. The stock trades at 17.2 times sales, a pricey valuation compared to more established businesses like Ford Motor Company and General Motors, which both trade around 0.5 times sales. But I still think Tesla is a smart buy.

Here's why.

People gathered around a table, analyzing financial charts.

Image source: Getty Images.

Industry leadership

In 2021, electric car sales soared 120% to 6.6 million units. While impressive, that figure only accounts for 8.6% of total car sales, meaning adoption is still in the early stages. Looking ahead, Grand View Research believes electric car sales will grow at 34% per year to surpass 38 million units by 2027.

Not surprisingly, the competitive landscape is getting more intense. Legacy automakers like Ford, GM, and Volkswagen are spending billions to retool factories in an effort to accelerate their shift away from fossil fuel-powered vehicles. Meanwhile, Chinese automaker BYD saw 230% sales growth in its new energy vehicles last year, and numerous electric start-ups are vying for attention, especially Amazon-backed Rivian.

Despite that competition (and widespread supply chain disruptions), Tesla delivered over 936,000 cars in 2021, up 87% from 2020. And the company notched its fourth consecutive year as the industry leader, though its market share declined to 14%, down from 17% in 2019. However, Tesla says it can grow vehicle deliveries at an annualized pace of 50% over a multi-year horizon, outpacing the forecast for the broader industry.

Impressive execution

Tesla has been relentless in its pursuit of manufacturing efficiency, and those efforts continued to pay off last year. The cost per vehicle dropped to $36,000 in 2021, down from $84,000 in 2017. Tesla posted an industry-leading operating margin of 14.6% in the third quarter, and that figure rose to 14.7% in the fourth quarter.

Several factors fueled those results. First, Tesla built its factories for electric cars, meaning it doesn't have to invest billions overhauling its infrastructure. Second, increased production capacity at Gigafactory Shanghai helped localize its China business, reducing logistics expenses associated with shipping cars across the ocean.

And finally, thanks to its innovative battery cell technology, Tesla has a significant cost advantage; it pays $187 per kilowatt-hour to build battery packs, the most expensive part of an electric car. That's 10% less than the next closest competitor and 24% less than the industry average, according to CAIRN Energy Research Advisors.

Not surprising, Tesla is becoming a financial machine. Over the past year, revenue soared 71% to $53.8 billion, and cash from operations surged 93% to $11.5 billion, fueled by Tesla's 10th consecutive quarter of GAAP profitability.

Big ambitions

CEO Elon Musk once said that people will eventually see Tesla as an artificial intelligence (AI) and robotics company, not just an auto manufacturer. He also believes that, in the long run, full self-driving (FSD) software will be its most important source of profitability. Both statements hint at big ambitions, and they highlight key differences between Tesla and legacy automakers.

Today, Tesla has nearly 2 million autopilot-enabled cars on the road, each equipped with eight external cameras. It uses that video data to train the AI models that power its FSD software, and because its autopilot-enabled fleet is unmatched, Tesla has access to more training data than any of its rivals. That gives it an edge in the race to make a self-driving car.

Building on that edge, Tesla introduced its D1 chip last September, a semiconductor that will make its Dojo supercomputer the fastest AI training machine in the world. Dojo is set to go live this summer, opening new opportunities in cloud computing, as Musk says Tesla will eventually offer AI training as a service.

Better yet, Dojo could accelerate Tesla's pursuit of full autonomy. And once it has a self-driving car -- something Musk thinks could happen this year -- Tesla plans to start an autonomous ride-hailing service, entering a market that ARK Invest believes could generate $2 trillion in profits per year by 2030.

Even then, Tesla may have more tricks up its sleeve. Musk recently noted that Optimus -- an AI-powered humanoid robot -- may eventually be more significant than Tesla's vehicle business. Optimus could enter production as early as 2023, alongside the long-awaited Tesla Semi and Cybertruck.

Worth the risk

There is no question that Tesla stock is richly valued compared to legacy automakers. But its business is also radically different. If Tesla successfully executes on its ambitions, it will eventually generate recurring revenue through FSD software subscriptions, AI cloud services, and autonomous ride-hailing fees. And given the multi-trillion-dollar size of those markets, Tesla's current valuation may look cheap a decade or two down the road.

That's why I think this growth stock is worth owning, but only if you're prepared to hold for the long term.