The major indexes are surging so far this year. The blue chip-heavy S&P 500 index has already broken out to several new highs, while the tech-centric Nasdaq Composite is not far behind.

Investors are voting with their dollars, and it appears they've decided on the industry that will likely generate the most growth in the next decade. Leading tech companies involved in artificial intelligence (AI) have outperformed the market over the last 12 months and continue to show strength in 2024.

Here are two growth stocks with adequate exposure to AI that could be rewarding buy-and-hold investments in the next 10 years.

1. Palantir Technologies

Palantir Technologies (PLTR 1.29%) is a leading AI software developer. Its products are used by the U.S. military and major corporations. The stock just hit a new 52-week high after more than doubling over the last year. Its latest earnings report showed accelerating revenue growth that could point to a large addressable market the company can grow into over the next 10 years.

Palantir's Q4 revenue increased 20% year over year to $608 million, compared to the previous quarter's 17% rate of growth. The improvement comes as enterprise customers ramp up investment in AI software, where Palantir is becoming a go-to vendor. The company said the U.S. commercial customer count rose 55% year over year.

Palantir signed several commercial deals last quarter, including one worth over $25 million with a major car rental business. It more than doubled the number of U.S. deals with a total customer value of $1 million or more. Management said these wins are expanding its addressable market, which bodes well for continued growth.

It's also a great sign that Palantir is already proving to have a profitable business model. Adjusted operating margin reached 34% in the quarter, and the company converted half of its revenue into adjusted free cash flow. Analysts expect Palantir's annual revenue to nearly double to $4 billion in the next two years, which should translate into more growth on the bottom line over the long term.

Management estimates its total addressable market to be over $100 billion. Given Palantir's relatively small size compared to that opportunity, the stock could hit many more highs over the next decade.

2. Microsoft

Microsoft (MSFT 0.22%) is a solid growth stock to buy for the long haul. The tech titan's shares have outperformed the market over the last 12 months, up 58% compared to the Nasdaq's 31% return. These gains come as the company is launching new AI tools to help consumers and businesses work more efficiently.

The most immediate benefit that AI will bring to the economy is productivity increases for workers. Goldman Sachs Research sees generative AI tools adding $7 trillion to the global economy, and there's no company better positioned to capitalize on the demand for these tools than the leader in productivity software.

Microsoft's large installed base of users could be a lucrative opportunity to upsell new AI services. For example, the company's GitHub developer platform already has over 1.3 million subscribers in the AI-driven GitHub Copilot, which helps programmers write code faster by providing helpful autocomplete suggestions. Meanwhile, Copilot for Microsoft 365 (e.g. Word, Excel, etc.) is seeing rapid adoption from major companies like Honda and Pfizer.

Microsoft is just getting started unleashing AI across the business. It could lead to a prosperous decade of robust growth if its latest results are any indication. The company reported in January that revenue and adjusted earnings increased 18% and 26% year over year, respectively, in the quarter ending in December, compared to a revenue uptick of just 2% in the year-ago period. This higher rate of growth may also suggest an improving economy after the macro headwinds last year, which is another reason to like the software specialist's prospects.

Analysts predict Microsoft will grow earnings by roughly 15% annually over the long term. Investors should expect the stock to deliver a return close to that estimate, which would be enough to at least triple your money in 10 years.