The electric vehicle (EV) market is heating up as new players and legacy automakers rush to gain a foothold in this exciting industry.

Tesla (TSLA -1.92%), the undisputed market leader, is firing on all cylinders -- reporting its highest revenue and net income in company history in Q2 2021. Meanwhile, up-and-coming EV company Lucid Group (LCID 0.41%) has yet to reach mass production of its luxury sedan, the Lucid Air. However, Lucid claims that the Air can go toe-to-toe with the Model S, Daimler's (MBGA.F -0.69%) Mercedes-Benz S-Class line, and other luxury brands such as Porsche, Audi, and Tata Motors' Jaguar. 

Twenty years ago, oil ruled the world and Tesla wasn't even incorporated. Twenty years from now, auto industry leadership could look much different from today, especially if EVs outnumber traditional internal combustion engine (ICE) vehicles in key markets. Let's compare Lucid to Tesla to see which company could be worth more by 2040. 

A blue Tesla Model S cruises down an open road with mountains in the background.

Image source: Tesla.

Tesla's five-year transformation

Tesla, the most valuable car company in the world, is worth $737 billion at this writing. Exactly five years ago, it was worth less than $30 billion. For comparison, Lucid is worth roughly $32 billion right now. 

So how did Tesla increase its market cap 25-fold in just five years? A lot of it has to do with a 180-degree shift from widespread investor pessimism that the company could fail to widespread optimism that the company can do no wrong. Tesla's valuation reflects an idealized scenario where the company scales production volumes on par with the other major automakers, but retains high gross margins, a torrid growth rate, and generates money from other sources outside of car sales.

To be fair, Tesla is a much better company now than it was just a few years ago. It went from consistently missing production forecasts, struggling to maintain profitability, and posting lumpy quarters to becoming a global success with a fast-growing top line, nice gross profit margin, and a positive annual net income in 2020. In sum, Tesla's parabolic stock price ascension is a result of a change in investor sentiment, a belief that a transition from ICE cars to EVs is imminent, and Tesla showing real top and bottom line growth.

TSLA Revenue (Quarterly) Chart

TSLA Revenue (Quarterly) data by YCharts

To illustrate Tesla's growth, consider that the company produced nearly five times more vehicles in 2020 than it did in 2017. In the first half of 2021, Tesla produced just over 387,000 cars, compared with 510,000 in all of its record 2020. And it generated over $1 billion in profit in Q2, which is more than any full year in company history. 

Despite these excellent results, Tesla is a growth stock that's still expensive by traditional valuation metrics. Its price-to-sales ratio (P/S) ratio is 20, and its price-to-earnings (P/E) ratio is 383 -- not cheap by any means. However, Tesla supporters believe that the company's first-mover advantage and global potential will allow it to grow into an even higher valuation over time.

How Lucid could pass Tesla

Lucid's long-term plan is to operate three business segments -- cars, energy storage systems, and technology, such as battery packs sold to EV racing teams. The simple answer for how Lucid could catch up to Tesla or even surpass it by 2040 would be that it has to sell more cars, make more money, and grow faster. But the bigger picture is that Lucid needs to establish brand equity and recognition, and most importantly, it has to capture and retain a technological advantage over its competitors.

Tesla's success really comes down to its technology, design, and the performance of its cars. CEO Elon Musk is a controversial figure, and Tesla is known to garner its fair share of devout fans and folks who can't stand it. Despite its rocky history, years of cash burn, production inefficiencies, and an eccentric CEO, Tesla still came out on top. The point is that investors will tolerate almost anything for great technology and growth.

Lucid has built an incredible car and received $4.4 billion in funding that it will use to scale its operations and mass-produce the Lucid Air. The company will probably have to raise more cash in the future, considering it doesn't expect to turn a profit in 2022. But it should have no problem receiving additional funding if it shows it can hit its goal to deliver 20,000 Lucid Airs in 2022. 

A white Lucid Air parked in front of a modern home.

Image source: Lucid Group.

A pivotal couple of years

In today's age of special-purpose acquisition companies and direct listings, Wall Street has shown its insatiable appetite for throwing money at prospective companies and hoping it sticks. Lucid's most valuable asset isn't the 2022 Lucid Air or even its plans for producing the Lucid Gravity. Rather, it's the company's innovation and creativity, and its ability to keep pushing the limits to try to be the best car company. The next year or two will be a pivotal time for Lucid. But if it can hit the ground running and prove its production prowess, continue to attract reservations, and grow its sales, then the company could become a lot bigger in the future than it is today.

The better buy

It's doubtful that Lucid could be worth more than Tesla by 2040. However, there is an argument that Lucid could be a better investment than Tesla between now and 2040. Looking at the potential of both electric car companies, it seems easier to imagine that Lucid could increase in value threefold than Tesla could. However, it also seems much more likely that Lucid could collapse or even go bankrupt than that Tesla could become worth a fraction of what it is today.

Given that backdrop, investing in Tesla is the safer bet when it comes to the EV space. But Lucid is a higher-risk, potentially higher-reward option for those who want to invest in a younger company with more upside.