When the market is selling off like it has been for most of 2022, buying and holding stock in quality businesses is an important strategy to help weather the storm. Over time, the best businesses will likely succeed, even if in the short term the ride is bumpy.

The rough start to the year has made many tech stocks even more compelling investments due to significantly discounted share prices. To be clear, just because a stock's price has fallen doesn't mean it's not a quality business worth owning. There are some great businesses that have had their share prices dragged down despite strong business performance. Let's take a look at two stocks that are worthy of your investment dollars.

Person holding a coffee while using their smartphone.

Image source: Getty Images.

1. Twilio

Twilio (TWLO 2.94%) is a leading platform for developing the communications built into the websites and apps we all use every day. If you've ever messaged customer support, or communicated with a ride-share driver, there's a chance you've used a product developed using Twilio's platform. Twilio is the leader in the cloud communications category by revenue and market share. 

Revenue in the first quarter of 2022 increased 48% year over year to $875 million, and organic growth -- which removes the impact of a recent acquisition -- increased by 35%. This organic growth metric is important to keep an eye on as management believes the company can produce annual organic revenue growth of 30% or higher through 2024. 

The company also has a goal of becoming profitable on a non-GAAP basis beginning with its full-year 2023 results. The company still has some work to do on this front considering its Q1 non-GAAP earnings per share were $0, and it's guiding for a non-GAAP loss per share between ($0.23) and ($0.20) for Q2.

Twilio had 268,000 active accounts at the end of Q1 of 2022, which was up 14% year over year. More importantly, the company boasts a dollar-based net expansion rate of 127%. Put simply, existing customers spent 27% more this quarter than they did a year ago. Twilio is not only growing its customer base, its customers are spending more. 

2. Cloudflare

The technology sector is undergoing a massive transition from on-premises hardware and software products to cloud-based services. Cloudflare (NET 3.77%) is a leader in providing cloud-based solutions to aid this transition. By offering both free as well as pay-as-you-go services, Cloudflare has had success growing and monetizing its users to become a leader in its space.

In Q1 2021, Cloudflare posted revenue of $212 million, beating its guidance and growing 54% year over year. Gross margin expanded to 77.8%, compared to 76.8% in the year-ago quarter. Cloudflare is still unprofitable, and this quarter's net loss was $41 million. Despite that being a slightly larger loss than the $40 million from Q1 2021, this quarter's revenue growth means that the loss was a smaller percentage of revenue, representing a step in the right direction. 

On a non-GAAP basis, which excludes stock-based compensation and some amortization, Cloudflare had net income of $3.5 million, compared to a loss of $9.3 million in the year-ago quarter. For full-year 2022, Cloudflare expects to be profitable on a non-GAAP basis.

Importantly, and similarly to Twilio, Cloudflare is growing its customer base and providing valuable services that lead to customers spending more. In Q1, Cloudflare added 14,000 new customers, which was a quarterly record for the company. Additionally, Cloudflare's dollar-based net retention rate was 127%. 

The bottom line for investors

Both of these companies are growing revenue at impressive rates while increasing and monetizing their customers. Twilio's price-to-sales (P/S) ratio is currently 5.7, a multiple it's not seen since 2018. Cloudflare is much more expensive, with shares trading for 24 times sales. Investors are certainly paying a premium, but for believers in Cloudflare's business, the current valuation is more than 78% lower than its recent high, and below its average P/S of 44.

After the market sell-off of the last several months, both are more affordable than they have been in a while, making them compelling choices for stocks to buy in 2022 and beyond.