Today's match-up features two chipmakers whose fortunes of late couldn't be any different. Ambarella (AMBA 3.18%) stock soared with the popularity of GoPro's cameras a few years back, only to fall -- violently -- back to earth. NVIDIA (NVDA -3.33%), on the other hand, had been a pretty boring stock until last year. Since then, it has absolutely exploded.

NVDA Chart

NVDA data by YCharts.

But that doesn't tell us much about which of these two is a better stock to buy today. While we can't know with 100% certainty how things will play out, we can evaluate these two on three different criteria that should give us a better idea of what we're paying for.

Sustainable competitive advantage

There's nothing more important for long-term investors to research than an underlying company's sustainable competitive advantage -- otherwise known as a "moat." In the most basic sense, a moat is what keeps customers coming back year after year while holding the competition at bay for decades.

An electronic circuit board

Image source: Getty Images.

To be honest, neither company has a huge moat. Ambarella makes systems-on-a-chip that allow for capture of high-definition video, among other things. For a while, its stock moved in lockstep with GoPro, as it was Ambarella's most important customer. Since then, the company has branched out to focus on automotive customers interested in the chips for filming potential accidents.

NVIDIA's graphics processing units (GPUs) have been the hottest thing on the block lately. The high-functioning chips are involved in everything from gaming to artificial intelligence to, most notably, the mining of cryptocurrencies. By being the top dog in all three of these booming niches, the company's sales -- and investors' expectations -- have boomed.

But here's the thing: there's nothing stopped anyone from making a better system-on-a-chip (Ambarella) or GPU (NVIDIA). In fact, many are already trying. Each company's key advantage is that it is currently best-in-breed. But in my book, having a great product and flawless execution is sometimes not enough to lock in long-term results. 

That's not to say that these companies can't continue to excel, but from where I sit, I don't see much of a moat.

Winner = Tie

Financial fortitude

Investors in companies like this often like to see excess cash reinvested in the business. That makes sense, given the opportunities for chipmakers on the horizon.

At the same time, however, there's something to be said for keeping a plain, boring pile of cash on hand. That's because every company, at one point or another, is going to face difficult economic circumstances. When those times hit, companies with lots of cash can actually emerge stronger relative to the competition: by buying back shares on the cheap, acquiring rivals, or outspending the rest of the industry to gain long-term market share.

Keeping in mind that NVIDIA is valued at 60 times the size of Ambarella, here's how they stack up.

Company Cash Debt Free Cash Flow
Ambarella $414 million $0 $89 million
NVIDIA $6.3 billion $2.0 billion $2.6 billion

Data source: Yahoo! Finance. Cash includes long and short-term investments. Free cash flow presented on trailing-12-month basis.

To be honest, these two are pretty evenly matched. Both have very healthy cash flows relative to their size, and while Ambarella benefits from having no long-term debt, NVIDIA has a sizable net cash position of $4.3 billion.

If a downturn were to occur, I don't see how one company would have the upper hand over the other in terms of financial fortitude.

Winner = Tie

Valuation

Finally, we have the topic of valuation. This is part art, part science, as there's no one metric that you can consult to get an idea for how expensive a stock really is. That's why I like to consult these four to get a more holistic picture.

Company P/E P/FCF P/S PEG Ratio
Ambarella 23 21 6.2 2.0
NVIDIA 49 46 13.3 3.0

Data source: Yahoo! Finance, E*Trade. P/E calculated using non-GAAP earnings when applicable.

On this facet, we do have a clear winner: Ambarella. While some could rightly argue NVIDIA deserves a premium based on its top dog status in so many emerging industries, the fact that it trades for a 50% premium when earnings growth is considered (PEG ratio) tells me that Ambarella might be the "cheaper" stock at today's prices.

Winner = Ambarella

And my winner is...

So there you have it: Ambarella is, in my opinion, the better stock to buy today. I know many will likely disagree with this given NVIDIA's important lead in AI, graphics, and crypto industries. But I am an investor who focuses primarily on moats, and I don't see a wide moat for either company -- which is why I don't own or have an outperform call on my CAPS profile for Ambarella or NVIDIA.

If you believe that these two can keep their respective leads over the competition for years to come, then these might be right for you. Otherwise, I suggest looking elsewhere.