For long-term investors, backing stocks with the potential to benefit from massive trends can be a path to incredible performance. Companies in the early stages of capitalizing on big shifts can often see big valuation swings, but those who back the right businesses at the right times open the door for market-crushing performance.

Growth stocks have rallied over the last year, but investors still have opportunities to build positions in emerging category leaders that trade at big discounts. With that in mind, read on for a look at two top stocks that can be purchased for under $20 per share.

1. Palantir

Palantir (PLTR 3.73%) is a data software company that provides services to the U.S. government, Western allies, and business customers. The company's stock has surged as new artificial intelligence (AI) initiatives have been launched and seen encouraging rates of adoption. But priced at roughly $16 per share, the company's stock is still down roughly 59% from the lifetime high it hit in 2021.

Total revenue from government customers grew roughly 10% year over year to $308 million in the third quarter, representing roughly 55% of the $558 million in sales the business posted in the period. While Palantir's business with the U.S. government is on track to grow at a rate of roughly 10% this year, the company expects the growth rate to reaccelerate.

Notably, the company's sales to private-sector customers are already growing at a much faster clip. Revenue for the company's commercial segment grew 23% year over year in the quarter. As this faster-growing segment continues to account for a larger portion of overall sales, it should have the effect of boosting the company's overall rate of sales growth.

Thanks to momentum from both public and private sector clients, Palantir's overall revenue climbed 17% year over year in Q3 -- accelerating from 13% growth in Q2. Crucially, Palantir has been able to launch and market new services and power stronger sales growth while still managing to keep costs down.

The business generated $72 million in net income in its last reported quarter. The performance was good for a 13% net income margin and marked the company's fourth consecutive quarter of profitability on a generally accepted accounting principles (GAAP) basis. With Palantir still in the early stages of capitalizing on massive AI opportunities and already delivering cost-effective growth, its stock looks like a long-term buy.

2. StoneCo

StoneCo (STNE 5.01%) is a leading provider of payment processing services for small and medium-sized businesses (SMBs) in Brazil -- a country that's seeing adoption for card- and app-based payments expand rapidly. The company had also been a rising provider of loans for SMBs, but this segment of the business wound up facing massive setbacks.

StoneCo had been relying on Brazil's national registry system to determine whether business applicants were creditworthy. Unfortunately, this system proved faulty, and pressures on the unit intensified as many companies closed due to pandemic-related challenges.

StoneCo ended up taking massive losses on its loan portfolio and temporarily suspended its credit business, but it's slowly started to build the unit up again. More importantly, the company's payment processing business continued to deliver impressive growth despite struggles for the other segment.

In the third quarter, the fintech company grew its revenue roughly 25% year over year to reach roughly 3.14 billion Brazilian reals -- roughly $644.2 million at today's exchange rate. Thanks to efficiency initiatives and increased transaction processing volume and take rates, the company's non-GAAP (adjusted) net income soared approximately 302% to reach 435 million reals -- roughly $89.2 million.

Despite a recent rally for the stock powered by fantastic business performance, StoneCo stock is down roughly 82% from its high and is trading at approximately $17 per share. Valued at roughly 14 times expected forward earnings and 2 times expected sales, StoneCo is an attractively priced growth stock that could deliver big wins for long-term investors.