CalAmp Corp. (NASDAQ:CAMP) and NVIDIA Corp. (NASDAQ:NVDA) are both technology companies betting on huge trends. CalAmp's hardware and software allow businesses to bring devices and industrial equipment online, track them, and collect data. CalAmp is tapping into the growing Internet of Things market, and its tech and software have already given the company a headstart.

Meanwhile, NVIDIA's graphics processors are used for all sorts of applications, from desktop gaming to artificial intelligence data centers to driverless cars. NVIDIA's prospects have led many investors to buy the company's stock and drive its share price up more than 1,000% over the past three years.

Both companies are doing a great job of tapping into growing tech trends, but which one is the better buy for investors going forward?

A wall with a blue door on the left and a red door on the right.

Image source: Getty Images.

The case for CalAmp

CalAmp's opportunity -- and it's a pretty big one -- lies in the growing Internet of Things (IoT) segment. The IoT is expected to create more than $6 trillion in revenue and cost savings by 2025 and CalAmp's hardware and software are already part of this growing trend.

The company's hardware sales consist of selling components that can bring everything from cars to smart speakers online. One of the company's biggest money makers is its telematics business, which allows companies to add routers to their vehicles to connect them to the internet. For example, Caterpillar is a large CalAmp customer and uses the company's hardware and software to bring fleets of industrial equipment online.

But the company also sells software and services to its customers that account for about 20% of the company's top line, which is the company's fastest-growing business. In the first quarter, software and services grew by 15% year over year, compared to just 6% growth for its telematics business. 

CalAmp's software and services segment is an important one for investors to watch because it allows the company to bring in recurring revenue, as opposed to one-time hardware sales. CalAmp's software-as-a-service (SaaS) and recurring service platform has grown to 776,000 customers. This segment is particularly strong because of the company's purchase of LoJack several years ago. The LoJack brand accounted for 50% of CalAmp's software and subscription sales in the first quarter.

CalAmp's small-cap size and the fact that the Internet of Things is still a relatively young market means that the company's share price can be prone to some large swings. But despite that, CalAmp's shares have managed to easily outpace the S&P 500 over the past year.

The company's shares are trading at about 30 times CalAmp's trailing earnings, which is on par with the average price-to-earnings ratio for technology companies.

The case for NVIDIA

NVIDIA makes the vast majority of its revenue -- about 54% -- from sales of its graphics processors in the gaming market. What's great about that for NVIDIA investors is that the company's gaming sales grew 60% year over year in the most recent quarter and the company has a huge lead over its closest competitorAdvanced Micro Devices, in the discrete desktop gaming market.

But even with its fantastic growth in the gaming market, there are many other reasons that NVIDIA should be on tech investors' radars. For one, the company is making big moves in the driverless car market with its Drive PX supercomputers. The company uses its graphics processing units (GPUs) to help driverless car technology process complex visual information from vehicles.

The company is already on the third version of Drive PX, called Pegasus, and NVIDIA's management says the latest version will be used in fully autonomous robo-taxis by next year. Selling driverless car tech isn't a moneymaker for NVIDIA just yet. The company made just 4.5% of its top line from its automotive business in the most recent quarter. But investors should remain patient. NVIDIA believes its total addressable market in autonomous vehicles will be $60 billion by 2035.

But there's much more potential for NVIDIA than the gaming or driverless car market. NVIDIA's graphics cards are also used for complex processing for artificial intelligence data centers. This is opening up the company to a total addressable market of at least $40 billion in the artificial intelligence computing market, according to the company. NVIDIA's processors are already used by Amazon.com, Alphabet, Facebook, and other companies for their high-performance data centers, and it's likely that we're only at the beginning of this trend.

NVIDIA's shares trade at about 42 times the company's trailing earnings, which makes it more expensive relative to CalAmp. But investors should also keep in mind that NVIDIA is a growth stock that hasn't realized its full potential in AI and driverless cars.

The verdict

In one way, CalAmp and NVIDIA are very similar companies. Both are betting that emerging tech trends (the IoT, driverless cars, and AI) will fuel growth. But the main difference between their approaches is that NVIDIA has a substantial business to fall back on if AI and driverless cars don't turn out to be as lucrative as the company's management hopes they will be.

NVIDIA can weather any significant shifts because of its long-established and growing gaming business. I don't think CalAmp has the same benefit. While the company has done a good job of growing its software and services segment, it's still very dependent on some large customers for the bulk of its revenue. Additionally, CalAmp is essentially putting all of its eggs in the IoT basket, while NVIDIA is pursuing many different opportunities.

For all of those reasons, I believe NVIDIA is the better buy between these two companies. That's not to say that CalAmp's stock isn't worth buying. It certainly has a lot of opportunity in the Internet of Things, but I think NVIDIA's multiple opportunities in AI and autonomous vehicles far surpass CalAmp's potential.

John Mackey, CEO of Whole Foods Market, an Amazon subsidiary, is a member of The Motley Fool's board of directors. Suzanne Frey, an executive at Alphabet, is a member of The Motley Fool's board of directors. Chris Neiger has no position in any of the stocks mentioned. The Motley Fool owns shares of and recommends Alphabet (A shares), Alphabet (C shares), Amazon, Facebook, and Nvidia. The Motley Fool recommends CalAmp. The Motley Fool has a disclosure policy.