Shares of Palantir Technologies (PLTR 0.56%) have been hot this year, rising more than 125% since the start of January, and it's now trading at a 52-week high. But despite the stock's resurgence this year (after falling 65% in 2022), it still may not be too late to invest in the data analytics company, as there's still plenty of growth potential ahead for the business.

Here's why the stock can still be a good buy right now.

Profits should be the norm moving forward

Last year, Palantir incurred a $374 million net loss. And that was an improvement from 2021, when its net loss totaled $520 million. Today, however, the business is on a much better trajectory, posting a profit in consecutive quarters.

And the company anticipates that trend to continue. In a recent letter to shareholders, CEO Alex Karp said that management expects the business to be profitable throughout the rest of the year.

If Palantir is finally, consistently profitable, that could make the business a much more tenable investment to own. Plus, it could result in it getting into the S&P 500, which will be sure to attract more investors, even ones who are risk averse.

One of the things that's really attractive about the business is that it generates strong gross margins of close to 80%.

PLTR Gross Profit Margin (Quarterly) Chart

PLTR Gross Profit Margin (Quarterly) data by YCharts

With margins like that, profits will rise as the business continues to grow -- and that shouldn't be a problem.

Artificial intelligence will open up more opportunities for the business

Artificial intelligence (AI) has been a hot topic this year due to the fact that ChatGPT and next-gen technologies can transform and improve many businesses. Palantir is no exception to that. The company's operations center on data analysis and helping companies and governments make decisions upon analyzing many different data points. 

Palantir is in the process of launching an artificial intelligence platform (AIP) it says will enable customers to take advantage of its machine learning technologies. Karp mentioned on the company's earnings call in May that demand for AIP is incredibly strong, and is nothing like he's seen in working for the company for the past 20 years.

The company's technology can be used in counterterrorism operations and war. In April, it showed a demo of how its AIP can help assist with deploying drones and estimating an enemy's capabilities and strategy. AIP can take Palantir's business to the next level, allowing AI to do more data analysis, saving time for businesses and governments in the process.

Karp said the first iteration of AIP would be available in May and that the company has "had hundreds of conversations with potential customers about deploying the software."

Adding another growth catalyst for the business can be huge for Palantir, as it can improve its growth rate, which has been slowing down for several quarters:

PLTR Revenue (Quarterly YoY Growth) Chart

PLTR Revenue (Quarterly YoY Growth) data by YCharts

Now may still be a great time to buy the stock

Between its fantastic margins and some incredible growth opportunities on the horizon, Palantir could soon become a hugely profitable business.

AI could be the catalyst that the business needs to get it share price closer to the levels it reached in 2021, when the tech stock often traded well above $20. Palantir has a much brighter future ahead with AI, and its current valuation could look cheap in a few years.