Tesla (TSLA -3.55%) ranked among the five worst-performing stocks in the S&P 500 last year, as its share price nosedived nearly 70%, erasing roughly $850 billion from its market cap. The company has never suffered a sharper decline at any point in its history, and several factors contributed to that monumental fall from grace.

Throughout the year, supply chain problems, factory closures in China, and logistics bottlenecks plagued Tesla on the supply side, while high inflation and rising interest rates acted as a headwind on the demand side. Tesla still managed to deliver 1.3 million vehicles in 2022, up 40% from the prior year, but that number fell short of management's guidance, which calls for 50% average annual growth in deliveries over a multiyear horizon.

The stock rebounded slightly so far in 2023, but it is still 57% off its high. Here's why investors should treat the current situation as a buying opportunity.

The silver lining to a difficult year

Tesla accounted for 18.1% of battery electric vehicle sales through November 2022, putting it more than five percentage points ahead of the next closest competitor, Chinese automaker BYD. Unfortunately, that means Tesla actually lost three percentage points of market share as it navigated obstacles last year. Meanwhile, BYD gained four percentage points of market share, as it managed to avoid the COVID-driven factory closures in China that hurt Tesla.

On the bright side, Tesla still delivered impressive financial results in 2022. Revenue climbed 51% to $81.5 billion, and GAAP earnings soared 122% to $3.62 per share. Better yet, the company took the crown for most efficient volume carmaker on the planet; Tesla reported an industry-leading operating margin of 16.8% in 2022, an accomplishment that CEO Elon Musk attributes to unmatched manufacturing technology.

For example, Tesla can produce battery packs (the most expensive part of an electric car) at a lower cost per kilowatt-hour than any other automaker. That advantage is expected to persist through the end of the decade, according to Cairn Energy Research Advisors.

Looking ahead, Tesla is set to become even more efficient in the years ahead. The company is ramping up production at two new factories, one of which is in Berlin. That will reduce logistics costs by localizing its business in Europe, the second-largest electric market in the world.

Better yet, there is a significant margin upside with full self-driving (FSD) software, which was recently released in beta to all customers in North America. In fact, management expects FSD technology to become the most important source of profitability for Tesla in the long run.

The future still looks bright for Tesla

Some analysts have voiced concerns about waning demand, especially with high inflation and rising interest rates putting pressure on consumer spending. But Musk addressed those concerns during the latest earnings call, assuring investors that "demand far exceeds production."

In fact, Musk said the company is currently receiving orders at nearly twice the rate of production. That bodes well for Tesla, suggesting that demand remains high despite a difficult economy. With that in mind, global electric vehicle sales are expected to grow at 23% annually to reach $1.1 trillion by 2030, according to Precedence Research.

However, that figure is only part of a larger opportunity. The autonomous vehicle market will grow at 40% annually to approach $2.2 trillion by 2030, according to Research and Markets, and Tesla is perhaps better positioned to benefit from that tailwind than any other automaker. Musk says the third-generation autopilot hardware is still the most efficient artificial intelligence inference computer in the world, and the fourth-generation hardware will likely be released in the near future.

Additionally, data is the cornerstone of artificial intelligence, and with over 100 million miles driven on FSD beta, Tesla has more data than its peers. In other words, the company is well positioned to be the first to market with a fully autonomous vehicle.

There is also another angle to the FSD software: Tesla plans to produce a robotaxi in 2024 to support the launch of an autonomous ride-hailing service, and that could be a game changer for the business. According to Ark Invest, autonomous ride-hailing platforms could generate $2 trillion in profits by 2030.

Four Tesla vehicles parked side by side at charging stations.

Image source: Tesla.

Tesla stock is worth the premium

While Tesla has seen its valuation cut in half, the stock is still priced at a premium compared to other automakers. Currently, shares trade at 8.2 times sales and 54.9 times earnings -- those are pricey valuations by any standard. But the current valuation multiples also represent a significant discount to the three-year averages of 15.7 times sales and 476.8 times earnings. More importantly, if Tesla realizes its ambitions regarding FSD technology and autonomous ride-hailing, its current share price may look like a bargain a decade down the road.

During the latest earnings call, Musk once again asserted his belief that "Tesla will be the most valuable company on Earth." He also said Tesla has a more exciting product roadmap than any company in any industry. That's why investors should buy a few shares of this growth stock today.