The S&P 500 has plunged 25% so far this year as I write this. While upsetting for investors, now is the ideal opportunity to pounce on solid stocks at low prices. A smart investment strategy is to buy and hold stocks of growing companies that have a good chance of beating the market over the long term.

The two I have in mind are visual-based social media company Pinterest (PINS 0.34%), and e-commerce retailer Etsy (ETSY -2.35%). These two businesses got a solid boost from pandemic lockdowns, when social media platforms and online shopping outlets lured in folks stuck at home. It is unreasonable to expect the companies to maintain the same momentum forever, but both are growing even in a challenging macroeconomic environment now. Let's take a closer look to see why these stocks look like fantastic long-term investments.

Dollar bills covered by orange leaves.

Image source: Getty Images.

1. Pinterest

The rumor that Alphabet could be interested in purchasing Pinterest has again sparked interest in the company and while investors will have to wait to see whether there is any truth to it, I believe Pinterest can thrive on its own in the long run. And I'm not put off by Pinterest stock's 74% decline from its all-time high.

Despite a dip in monthly active users (MAUs) in the second quarter, Pinterest's revenue got a boost. MAUs declined 8% in the U.S. and Canada year over year and fell 4% in Europe. However, its worldwide average revenue per user (ARPU) climbed 17% year over year to $1.54 per user, both in the U.S. and abroad. In Q2, total revenue increased 9% year over year to $666 million.

The social media company spent over $233 million on research and development while sales and marketing accounted for up to $212 million. This shows it is continuing to spend to improve its technology to increase user engagement and attract more advertisers.

In Q3 and Q4, the business anticipates a "moderate sequential increase" in worldwide monthly active users. The revenue increase in Q3 might be in the mid-single digits versus the year-ago quarter, according to the management.

Pinterest is developing strategies to provide more "inspirational" content on its platform. This, in turn, could help boost users' shopping experience and advertisers' success. It is also in good financial shape, ending the quarter with $1.6 billion in cash and cash equivalents.

Recently, Bill Ready, who oversaw the commerce, payments, and "next billion users" segments at Alphabet, became Pinterest's CEO. The sudden leadership change caught some investors off-guard, but I think it could work out well. It will be interesting to watch how the new CEO will take Pinterest to great heights given his experience in e-commerce and payments. This social media tech stock, with a price-to-sales ratio of 5.9, is cheap to buy now if you want to earn some big gains when it realizes its full potential.

2. Etsy

The pandemic helped Etsy flourish. Now, investor skepticism about whether the business can thrive post-pandemic has helped pulled the stock down 65% from its all-time high. But its consistent revenue growth is proving it is capable of becoming a thriving business in the long haul.

Etsy is a two-sided internet marketplace connecting buyers and sellers. It operates in the U.S., the U.K., Canada, Australia, Germany, France, India, and countries in Latin America. 

Although inflationary pressures may have affected its second-quarter results to an extent, the company nonetheless acquired 7 million new buyers. Consolidated gross merchandise sales (GMS) dipped by 0.4% to $3 billion but brought in revenue of $585 million, 10.6% year-over-year growth. However, according to the management, "increased employee compensation-related expenses" caused a 26% dip in net income from the year-ago quarter.

The company's strength is its a one-of-a-kind business model focusing on consumer personalization. It helps the company identify repeat consumer behavior or habitual buyers. Etsy's platform allows small, unique businesses to market their customized products.

In April, Etsy raised its seller transaction charge from 5% to 6.5%, which will  help generate more revenue as long as lots of sellers don't leave the platform. Etsy plans to use this additional income for marketing and seller tools.

Both of these stocks have a depressed price and lots of potential. The bigger picture is not to abandon the stock market when it's down, but rather carefully choose strong companies for a well-diversified portfolio.