Last year, electric cars accounted for nearly 9% of total car sales, according to the International Energy Agency. That figure has more than tripled since 2019, and a report from Grand View Research suggests sales will grow at 38% per year through 2027, fueled by falling production costs and improving battery range.

Not surprisingly, the market has become highly competitive. Legacy automakers are investing billions to electrify their vehicles, and dozens of start-ups are pouring into the market. But Tesla (TSLA 2.55%) is still my top electric car stock to buy and hold.

Here's why.

Two white Teslas parked in front of a building at twilight.

Image source: Tesla.

Tesla is the electric car leader

Tesla's focus on manufacturing efficiency continued to pay off in the first quarter. Despite supply chain disruptions and rising costs, the company posted an operating margin of 19.2%. That's up from an industry-leading operating margin of 14.7% in the fourth quarter.

Several factors are driving that efficiency, but battery cost is a big one. Tesla pays 10% less to build battery packs than the next closest competitor, and it pays 24% less than the industry average, according to Cairn ERA. Battery packs are the most expensive part of an electric car, meaning Tesla has a significant cost advantage, and Cairn says that edge will last (at least) through the end of the decade.

Highly automated factories, rising vehicle production, and pricing power have also contributed to Tesla's efficiency, and those factors have translated into strong financial results. Over the last year, revenue soared 73% to $62.2 billion and free cash flow skyrocketed 188% to $6.9 billion.

Looking ahead, Tesla's electric car business should benefit from several catalysts. That includes the 2023 launch of the Cybertruck, and the ramp up of production of other vehicles at the new Gigafactories in Berlin, Germany; and Austin, Texas. The factory in Berlin is particularly noteworthy, as it will cut logistics costs by localizing Tesla's business in Europe.

Here's the big picture: Tesla captured an industry-leading 14.4% market share in electric car sales last year. Yes, that figure is declining. But the company's operating margin is evidence of a cost advantage, and new technologies like the 4680 battery cell should reinforce that edge. Better yet, Tesla's capacity for innovation should carry it into more profitable verticals in the future.

Tesla wants to lead in robotaxis, too

Tesla's goal of building a self-driving car is no secret, nor is its plan to launch an autonomous ride-hailing service. Since 2016, its autopilot hardware has included eight external cameras that crowdsource driving data to train neural networks, the artificial intelligence engines that power its full self-driving (FSD) software. In 2019, it debuted a custom semiconductor meant to run the FSD software in its cars. And during the latest earnings call, CEO Elon Musk restated his belief that the FSD platform would exceed the capabilities of a human driver by year-end.

Additionally, Musk announced plans to build a dedicated robotaxi. The vehicle will be optimized for autonomy and low-cost transportation, and Tesla expects to reach volume production by 2024. The robotaxi puts the company one step closer to an autonomous ride-hailing service. That's particularly important, because management expects FSD to eventually be the most important source of profitability for Tesla's electric car business.

Asset manager Ark Invest agrees with that conclusion, theorizing that autonomous ride-hailing platforms could generate $2 trillion in annual profits by 2030. That puts Tesla in front of another big market opportunity.

Tesla is exploring autonomous robots

Tesla plans to extend its expertise in artificial intelligence to autonomous robots. Last year, the company introduced Optimus, an intelligent humanoid bot meant to handle dangerous or boring tasks in place of people, and Tesla may have a prototype as early as this year.

Of course, Optimus is still very theoretical at this point, but it could be a game-changer for Tesla a decade down the road. In fact, during the latest earnings call, Musk said, "Optimus ultimately will be worth more than the car business, worth more than FSD."

What about the valuation?

Tesla is undoubtedly one of the more controversial stocks on the market. Right now, the company is worth more than the next 14 automakers combined, and its price-to-sales ratio of 19 is more like the valuation of a software company than a motor vehicle manufacturer. Understandably, some investors cannot fathom that figure, and they see the stock as dangerously overvalued.

Of course, some analysts called Apple overvalued when it was a $60 billion business in 2006, a year before it released the first iPhone. The company has since grown into a $2.6 trillion empire. Similarly, Fortune magazine published an article in 2010 that noted, "Amazon trades at a valuation that far exceeds any semblance of reality." Amazon was worth $76 billion at the time, a fraction of its current $1.4 trillion valuation.

That doesn't mean Tesla stock is cheap right now. It could be wildly overvalued. But there are always two sides to every story. I think Tesla will parlay its technological expertise into a strong position in more profitable industries. That's why it's my top electric car stock to buy and hold.