Electric vehicles (EVs) have become a big part of the future in the automotive industry, thanks mainly to the path Tesla (TSLA 14.60%) paved as the first company to mass-produce them successfully. Today, the dynamics of the EV market could be shifting. New competitors, such as Rivian Automotive (RIVN 2.38%), are ramping up, and almost all legacy brands have launched various EVs.

From an investment standpoint, Tesla's $700 billion market cap makes it a Goliath. At the same time, Rivian, a company with a valuation of $15 billion, plays the role of David, offering a newer stock with arguably higher potential.

But which is the better stock to own today? Here is what you need to know.

The case for Tesla

Tesla's first-mover advantage has built up some brand power for the company. It has about 50% of the American EV market and 20% globally. That's been accomplished with little to no marketing, helped by the celebrity status of CEO Elon Musk.

The company's second significant advantage is that it has reached manufacturing critical mass, building enough units to operate its factories profitably, a costly journey that Rivian is just starting.

This makes Tesla the safe play for EVs. It's financially sound, profitable, and the leading brand -- and it still has growth opportunities with its Cybertruck, which is just starting its first deliveries.

TSLA Operating Margin (TTM) Chart

TSLA operating margin (TTM), data by YCharts; TTM = trailing 12 months.

Tesla has slashed its prices, which is a way to undercut competitors or a potential sign of desperation to drive orders, depending on how you see it. Either way, it's playing with a lead in the EV industry, which still has room to grow for years. EVs still account for only a low single-digit percentage of all vehicles on today's roads.

The company also has flexibility that few can match. Most of its business is automotive today, but that could change someday. It has a growing energy business and is developing AI products, including a humanoid robot that could replace humans for simple, repetitive tasks.

Elon Musk pushes the company to innovate, which means it's harder to put a potential ceiling on Tesla than it is on most other companies.

The case for Rivian

Growing an automotive business is challenging. Musk once said that his company almost went under as recently as 2019. Overcoming these odds is partly why Tesla stock has been so lucrative over the past few years.

Is Rivian up to the task? Evidence shows it could be. The company has increased its manufacturing numbers, hitting a record 16,304 units in the third quarter and raising its full-year production guidance.

The battle is far from over; the company has burned more than $6 billion in free cash flow over the past year. But you can see that operating margins are rapidly improving, and cash burn may have peaked.

Rivian also has a healthy balance sheet with $10.2 billion in cash, investments, and a small available loan. That means the business is well funded for the near term -- potentially the next four to six quarters.

RIVN Operating Margin (TTM) Chart

RIVN operating margin (TTM), data by YCharts.

Rivian also doesn't directly compete with Tesla right now. Its flagship R1T is a pickup truck very different from Tesla's Cybertruck. The electric delivery van that it produced for Amazon doesn't overlap with Tesla and is now available to other customers. The R1S SUV competes with Tesla's Models X and Y, but there is room for Rivian to carve its niche in the EV market.

Rivian remains much smaller than Tesla, meaning more room for growth and potential share price appreciation. Tesla's market cap of over $700 billion makes a tenfold increase unlikely, since that would make it roughly triple the size of Apple, the world's largest company. Meanwhile, Rivian could 10x its market cap to $150 billion and still be a fraction of Tesla's size.

Here is your winner and why

Wall Street seems to find Tesla's much higher floor as an established EV player and solid growth potential more appealing than a still-unproven Rivian. Valuing both stocks on their enterprise value versus their revenue, the market is paying a hefty premium for Tesla stock over Rivian.

They say a bird in the hand is worth two in the bush, and Tesla is the much safer company to invest in today. Unfortunately, the stock is costly based on the earnings growth analysts expect from Tesla. Shares trade at a price/earnings-to-growth (PEG) ratio of 3.7, a hefty price tag. That means the stock could still drop if the market wants to pay a more conservative valuation for shares.

TSLA EV to Revenues (Forward) Chart

TSLA EV to revenue (forward) data by YCharts; EV = enterprise value.

Rivian isn't profitable, so I can't apply the same ratio. Still, it can be an excellent investment because the stock is still so small. It doesn't need to become as big as Tesla in order to grow enough to please shareholders.

Tesla, the blue chip, is a better buy when the valuation makes sense. But given how expensive shares are, there is a solid argument that Rivian's additional upside makes the stock the one to go for today.