Artificial intelligence (AI) can improve the growth prospects of many industries. One function that it can help with in particular is data analysis, and that can aid virtually any type of business.

A company at the center of both data analysis and AI is Palantir Technologies (PLTR 0.68%). Its phone has been ringing off the hook with companies interested in how AI can help enhance their products and services through Palantir's AI platform (AIP). As a result, shares of the tech stock are through the roof this year. Has this become the best AI stock for investors to own?

Palantir has been a hotter buy than Nvidia of late

One stock that has been synonymous with AI and growth this year has been Nvidia, which makes AI chips. But it has been losing steam of late. Over the past six months, shares of Nvidia are up 54%, while Palantir's stock has risen by 68%.

The big risk with Nvidia these days is its exposure to China and the U.S. government putting restrictions on the type of AI chips that can be sold there. Palantir doesn't carry nearly the same risks -- it avoids U.S. adversaries, and in its S-1 filing in 2020 it said it wouldn't work with the Chinese Communist party. It also puts limitations in place on accessing its platforms in China to protect its intellectual property.

The company has turned a profit in four straight quarters

Another reason investors have grown more bullish on Palantir is the company recently posted another profitable quarter, setting up for what looks to be an inevitable inclusion in the S&P 500. While the index hasn't added Palantir's stock just yet, it may be only a matter of time before that happens. Being part of the S&P 500 would not only be a symbolic accomplishment for the company to demonstrate its safety as an investment, but it would also mean inclusion into more funds, and thus more institutional investors buying up the stock.

With many up-and-coming tech stocks, investors often have to accept the risk that it may be years before profits are commonplace. With Palantir, the business is already in the black, and it expects to remain profitable.

Why Palantir may have much more upside

Palantir is starting to see the effects of strong demand due to AI, but it's still in the early innings of its growth story. The company says that it's on track to complete AI bootcamps with 140 organizations by the end of this month. With many use cases to discover for its AIP, Palantir is still scratching the surface in terms of potential.

As of the end of September, the company had 453 customers, an increase of 34% from a year ago. And its commercial customers totaled 330, rising by 45% from 228 a year ago. During the quarter it also closed on 80 significant deals (worth $1 million or more), with 12 of them being worth at least $10 million.

Palantir's revenue will be around $2.2 billion this year, which is 16% higher than the $1.9 billion it reported in 2022. By comparison, Nvidia generated more than $32 billion in sales over the trailing 12 months. Tech giants Alphabet and Microsoft, which have also been investing heavily in AI, bring in well over $200 billion in revenue over the course of a year.

While Palantir isn't a tiny company, it is notably smaller than the other AI stocks noted above. And with the company closing on many million-dollar deals, demand being through the roof, and profits now being the norm for the business, there could be a lot more room in the company's top and bottom lines for them to grow at a high rate and keep investors bullish on the stock for the long haul.

Should you invest in Palantir's stock?

Palantir is a stock that has a lot of potential. The company earned the trust of many governments around the world, and has become a top name in data analysis. Its valuation isn't cheap, as the stock trades at nearly 70 times its estimated future profits, and that may look like the biggest deterrent today. But with much more growth on the horizon, its earnings should improve in the long run, and buying the stock today could be a great move for long-term investors.

Although there are many good ways to invest in AI, Palantir does look to be the best AI stock to buy right -- it doesn't carry significant risk, and there's plenty of upside for the stock to become much more valuable in the future.