Did you know that if you earned an average of 7% per year, your investment would double in 10 years? That's lower than the S&P 500's long-run average of 10%. Investing in some top growth stocks could even set you up for even better gains.

If you have $5,000 that you can afford to invest in the stock market, two stocks that can be solid growth business to invest in right now are UnitedHealth Group (UNH 0.30%) and Palantir Technologies (PLTR 3.73%).

1. UnitedHealth Group

Health insurer UnitedHealth Group makes for an attractive long-term investment for a couple of reasons.

The first is that its business is stable and growing. Since 2019, the company's profits have risen by 45%, from $13.8 billion to $20.1 billion this past year. The company has been pursuing investments and is constantly on the lookout to become even bigger and more diverse.

During the past year, it closed on two significant deals involving technology company Change Healthcare and home health business LHC Group. UnitedHealth has generated over $23 billion in free cash flow over the trailing 12 months, putting it in a great position to take on even more acquisitions should it feel the need to supplement its growth even further.

That strong free cash flow brings me to the second reason it's a great investment, which is UnitedHealth's dividend. While it may appear modest at 1.5% and in line with the S&P 500 average, the healthcare company has been aggressively increasing its dividend payments over the years:

UNH Dividend Chart

Data source: YCharts

During the past four quarters, UnitedHealth has paid out almost $6 billion in cash on the dividend, which means there's ample room, given its free cash flow, for it to both continuing raising its payouts and for the company to pursue more acquisitions. 

Investing $5,000 in the company for at least the next decade can be a good way to generate excellent dividend income and benefiting from what is still a growing business, especially with the demographics of the U.S. changing and the number of seniors due to increase.

2. Palantir Technologies

Another good place to invest $5,000 is in a top data analytics business such as Palantir Technologies. With the emergence of ChatGPT and more companies focusing on artificial intelligence (AI) solutions, there's much more growth ahead for a business such as Palantir. Its stock has risen an incredible 160% this year, but there may be more upside in the long run as it realizes its potential.

The company recently launched an AI platform that will help it capitalize on opportunities. Chief Executive Officer Alex Karp says the business has been thriving, and demand has been unprecedented. The company expects to turn its first annual profit this year.

Plus, rising geopolitical tensions between China and the U.S. may increase demand for the company's products and services among governments, which have used Palantir's technology for counterintelligence purposes.

Palantir's revenue has more than doubled in just three years, as the company's top line totaled $1.9 billion in 2022 versus less than $743 million in 2019. The company's growth has been explosive, and AI could take it to another level over the next decade.