Electric vehicle (EV) leader Tesla (TSLA 1.97%) wasn't always the household name and portfolio-changing stock it's viewed as today. The company had its ups and downs over the years, facing the threat of bankruptcy as recently as between 2017 and 2019, when Tesla increased the production volume of its Model 3.

Had you invested $10,000 in Tesla stock back in 2019, your investment would be worth more than $90,000 today. That strong performance comes even though the stock has fallen more than 50% from its high in November 2021.

So what happened that electrified investor returns, and can that translate to future return potential? 

Tesla's turning point explained

Automotive manufacturing requires complex and expensive factories; a manufacturer like Tesla must make a lot of cars to spread out factory costs enough to turn a profit on each vehicle. It faced this problem between 2017 and 2019 -- it needed to make enough Model 3s (its lowest-priced model) to turn a profit.

Tesla vehicle sales from 2016 to Q1 of 2022.

Image source: Statista.

Tesla delivered 224,900 vehicles in 2018, its first full year of Model 3 production. You can see in the chart below that its free cash flow was negative that year.

But as deliveries increased, you can see how free cash flow turned positive and kept climbing with deliveries. Tesla crossing that threshold to positive cash flow showed investors that the business was sustainable. That proof of profitability had much to do with the stock's lucrative run from 2019 to the present day.

TSLA Free Cash Flow Chart

TSLA free cash flow data by YCharts.

A young and growing business often loses money, but investors will eventually demand profits to know that the business is sustainable. Earnings growth will have a significant impact on investment returns as companies mature.

Now that Tesla is profitable, looking at its potential runway to grow earnings will give clues to the stock's potential.

Massive possibilities ahead

Tesla recently closed out its 2022 fiscal year, delivering 1.31 million vehicles. According to data tracked by InsideEVs, global plug-in EV registrations were approximately 8.8 million through 11 months of 2022 and could hit around 10 million once December data is tallied. This would give Tesla roughly 13.1% market share of EVs sold last year.

The International Energy Agency said that there were 16.5 million EVs on the road as of 2021, but that could grow to 350 million by 2030, depending on how charging infrastructure develops and the availability of resources for batteries.

Even if Tesla's market share falls as competition ramps up (which will likely happen), the addressable market is big enough that Tesla could grow by multiples in volume and revenue from where it is today.

This doesn't factor in its other business segments, including commercial vehicles (the Tesla Semi), renewable power, and Optimus, a humanoid robot it plans to mass produce by 2027.

The company has several irons in the fire, though investors must see how these opportunities develop over the coming years. Tesla is infamous for unveiling a product (like the Cybertruck) and taking several years to bring it to market. 

As a reference, analysts call for earnings per share (EPS) to average 24% annual growth over the next three to five years.

Valuation allows growth-driven returns

Things can change fast on Wall Street; few traders wanted to touch Tesla last month, but most probably wish they had bought when the stock traded down to a price-to-earnings ratio (P/E) near 25. Now, shares have rebounded to a forward P/E of 49.

But that's still a solid buying opportunity for long-term investors. After all, Coca-Cola trades at roughly half Tesla's P/E but is expected to grow earnings only a quarter as fast as Tesla. It's not a direct comparison, but it shows you how little respect Tesla's future-looking growth outlook is getting from investors. If you're investing with a multiyear horizon, the EV maker's expected growth will whittle away at that valuation reasonably quickly.

Tesla's 2022 EPS of $4.07, growing 24% annually for five years, puts 2027 EPS at $11.93. Even if the P/E compresses to 25, the resulting share price is $298, a 54% total return over five years.

TSLA PE Ratio (Forward) Chart

TSLA PE ratio (forward) data by YCharts.

No, Tesla is not likely an overnight multibagger anymore, like it was in 2019. But even a conservative run through the math shows that it can still be a worthwhile investment.

The EV opportunity is massive, and Tesla should play a big part in its future. That's enough to make the stock an excellent buy if you can look to the next decade and beyond.