The market has not been kind to growth stocks in 2022. Rising inflation, interest rates, and increasing focus on valuation have caused many of them to tumble as investors seek calmer waters.

Yet, the sell-off has created opportunities for long-term investors to buy excellent companies like The Trade Desk (TTD -2.44%) and Shopify (SHOP 1.03%) at considerable discounts from their peaks. Let's look closer at what makes these two stocks, in particular, worth buying right now.

A person making an online purchase.

Image source: Getty Images.

The Trade Desk

The Trade Desk is riding a powerful tailwind. As a facilitator of digital ad buying, it is taking advantage of a growing shift of advertising to digital channels. From 2014 to 2021, its revenue skyrocketed to $1.2 billion from $45 million. And the stock has soared 1,730% in the past five years -- even after the recent sell-off.

TTD Chart

TTD data by YCharts.

The Trade Desk has the potential to continue surging for at least several more years, especially given that its $1.2 billion in 2021 revenue is just a fraction of the $763 billion in global ad spending.

Interestingly, of the total ad spending in 2021, 64.4% was through digital channels, up from 52.1% in 2019.That trend is unlikely to reverse. Digital advertising has several advantages over its predecessor; billboards, newspapers, and radio advertisements offer little targeting or results measurement to marketers.

Digital channels like social media, search engines, and connected TV offer businesses the option of precision advertising, which creates a better return on investment. So far, so good for The Trade Desk; it has been profitable on the bottom line for several years, a characteristic uncommon with explosive growth stocks.

TTD Net Income (Annual) Chart

TTD net income (annual) data by YCharts.

Shopify

Shopify has been one of the most explosive stocks in recent years. The Canadian company helps small and medium-sized businesses create e-commerce sites. Since 2016, the stock has been up an incredible 2,400%. But the growth stock sell-off has seen Shopify's shares slump 56% so far in 2022.

Shopify announced a 10-for-1 stock split on April 1, so perhaps the announcement’s momentum can help life the share price. Note that stock splits don’t change shareholders’ ownership portions but they create enthusiasm from potential investors who appreciate the resulting lower price per share.

Despite the stock's steep decline, the company's prospects remain excellent. Of course, customer and revenue growth will not be as explosive as it was during the pandemic. Still, over the long run, more and more spending will be done through digital channels, an area where Shopify excels.

The pandemic was undoubtedly a boom for the business; revenue nearly tripled from $1.6 billion to $4.6 billion from 2019 to 2021. Perhaps equally as important, many of the customers Shopify signed up during the pandemic will likely stick around long term. Shopify has basic plans for merchants starting at as little as $29 per month and much higher for a comprehensive suite of services. So it's not likely that the boom from the pandemic will be short-lived.

SHOP Cash from Operations (Annual) Chart

SHOP cash from operations (annual) data by YCharts.

In the last two years, the rise in sales was enough for Shopify to generate positive operating income, turning the corner from a $141 million operating loss in 2019 to $269 million in operating income in 2021. Further, it boosted cash from operations from $71 million to $504 million over that same time period. While Shopify may not attract as many new clients as it did during the initial stages of the pandemic, its current scale is large enough to generate healthy operating profit and cash flow.

Overall, surging revenue fueled by powerful, long-lasting tailwinds and discounted prices caused by the growth stock sell-off make The Trade Desk and Shopify excellent stocks to buy in 2022 and beyond.